A company decides that whenever Xmas falls on a Sunday 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).



Task

In what years between 2008 and 2121 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   type problems.




report zday_of_week
data: lv_start type i value 2007,
      lv_n type i value 114,
      lv_date type sy-datum,
      lv_weekday type string,
      lv_day type c,
      lv_year type n length 4.
 
write 'December 25 is a Sunday in: '.
do lv_n times.
   lv_year = lv_start + sy-index.
   concatenate lv_year '12' '25' into lv_date.
   call function 'DATE_COMPUTE_DAY'
    exporting date = lv_date
    importing day  = lv_day.
 
   select single langt from t246 into lv_weekday
     where sprsl = sy-langu and
     wotnr = lv_day.
 
   if lv_weekday eq 'Sunday'.
     write / lv_year.
   endif.
enddo.
 