Day of the week

From Rosetta Code
Revision as of 14:06, 12 December 2008 by rosettacode>Paddy3118 (A task beginning with Y, and seasonal to boot!)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Task
Day of the week
You are encouraged to solve this task according to the task description, using any language you may know.

A company decides that whenever Xmas falls on a Sunday that they will give their workers all extra paid holidays so that, together with any public holidays, workers will not have to work the following week (between the 25th of December and the first of January).

In what years between 2008 and 2099 will the 25th of December be a Sunday?

Using any standard date handling libraries of your programming language; compare the dates calculated with the output of other languages to discover any anomalies in the handling of dates which may be due to, for example, overflow in types used to represent dates/times similar to [y2k] problems.