Warning: session_start(): open(/tmp/sess_e90b87ec749bb041c333f86dba71f127, O_RDWR) failed: Disk quota exceeded (122) in /home/quickerm/public_html/wp-content/plugins/accesspress-social-share/accesspress-social-share.php on line 105
CALCULATE THE DAY OF THE WEEK FOR ANY DATE

Zeller’s Rule: Day on any date in the calendar

Zeller’s Rule : With this technique named after its founder Zeller, you can solve any ‘Dates and Calendars’ problems.

Zellers rule can be used to find the day on any particular date in the calendar in the history. All you have to know is the formula given below and how to use it.

Zeller’s Rule Formula:

F = K + [(13xM – 1)/5] + D + [D/4] + [C/4] – 2C

K = Date => for 25/3/2009, we take 25
In Zeller’s rule months start from march.
M = Month no. => Starts from March.
March = 1, April = 2, May = 3
Nov. = 9, Dec = 10, Jan = 11
Feb. = 12
D = Last two digits of the year, using previous year for January and February. Thus for 2009 = 09
C = The first two digits of century => for 2009 = 20

Example: 25/03/2009

F = 25 + [{(13 x1)- 1}/5] + 09 + 09/4 + 20/4 – (2 x 20)
= 25 + 12/5 + 09 + 09/4 + 20/4  – 2×20
=25+2+09+2+5-40 [ We will just consider the integral value and ignore the value after decimal]
= 43 – 40 =

Replace the number with the day using the information given below.
1 = Monday
2 = Tuesday
3 = Wednesday
4 = Thursday
5 = Friday
6 = Saturday
7 or 0 = Sunday

So it’s Wednesday on 25th march, 2009.

If the number is more than 7, divide the no. by 7. The remainder will give you the day.

I shall be very grateful if anyone of you can provide me the java script for this formula, so that I can post it here for everyone’s convenience.

Thanks in advance. I hope you will find the above method very useful.

you may find another post named, cyclicity very interesting.

Vineet Patawari – PGDM, ACA, B.COM (H)

52 Comments
  1. P J Sagar
  2. Ching
  3. sravani
  4. EffyCoder
    • Pragyansh Chaturvedi
      • Pragyansh Chaturvedi
      • Pragyansh Chaturvedi
    • Sachin mishra
    • Sachin mishra
  5. Harshit Lahoti
  6. abhik
  7. manoj sharma
  8. Ashwani Kumar
  9. Mose
  10. Lloyd Wallace
    • P.P. Sudhakaran
  11. Lloyd Wallace
  12. RoyAvi
  13. dla rozwoju
  14. Rahul
    • Lloyd Wallace
    • P.P. Sudhakaran
  15. Neesha
  16. prathyusha
    • Lloyd Wallace
  17. gdv
    • Dr. Dinh, Tat Dac
      • prashanth purastu
    • jeet
    • P.P. Sudhakaran
  18. RAJASEKHAR V S S TOLETY
  19. RAJASEKHAR V S S TOLETY
    • Pragyansh Chaturvedi
  20. Akash
  21. pankaj rawat
  22. Pankaj KUmar
    • pankaj rawat
    • shubhangi ashtikar
      • ashtikar shubhangi
  23. sankeerth
  24. ADITYA
    • knn mayya
  25. Nandeesh
  26. admin
  27. bharat
  28. Mahesh
  29. swati
  30. abhimanyu
    • admin
      • parv
      • sravani
  31. priya

Leave a Reply

Your email address will not be published. Required fields are marked *