Calculations based on calendar

Problems based on calendar

We are supposed to find the day of the week on a given date. For this we use the concept of odd days.

1) Odd days : In a given period, the number of days more than the complete weeks are called odd days.

2) Leap year:

         Every year divisible by 4 is called a Leap year,if it is not century.

         Every 4th century is a leap year and no other century is a leap year

3) Ordinary year :The year which is not a leap year is called an ordinary year. An ordinary year has 365 days.

4) counting of odd days: 

       i) 1 ordinary year = 365days = (52 week +1day) = 1 ordinary year 1 odd day

      ii) 1 leap year =366 days (52 weeks + 2days) = 1 leap year has 2 odd days

     iii) 100 years = 76 ordinary years + 24 leap years

Note : Input date in calculation block in the form of "yyyy-mm-dd" or "yyyy/mm/dd" or "mm-dd-yyyy" or "mm/dd/yyyy"

          Example:  2017-12-07 , 2017-dec-07, 2017/12/07 , 12/17/2017 , 12-17-2017

Calculating day of the week on the given date

Input

Reset


Output

Day {{day}}
Posted on by