Day of the week: Difference between revisions

From Rosetta Code
Content added Content deleted
(A task beginning with Y, and seasonal to boot!)
 
m (#See_also)
Line 4: Line 4:
'''In what years between 2008 and 2099 will the 25th of December be a Sunday?'''
'''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 [[http://en.wikipedia.org/wiki/Y2k y2k]] problems.
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 [[http://en.wikipedia.org/wiki/Y2k#See_also y2k]] problems.

Revision as of 14:11, 12 December 2008

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.