Now you know how this method works.While performing this trick, you will first ask someone
for a date for which he/she will already know the day of week falling. Then you
will use the trick that you have learned so far and do the calculations and
present the output day to the person who gave the date. And that person will be
amazed to see that you have presented the correct date to him/her!!As simple as that!
But, sometimes people may ask the day for an invalid
date. By invalid date I mean a date that doesn't exist. Example of an invalid date is 29th Feb for a
year which is not a leap year!Another example of an invalid date would be 31st
April. Now, April will always have 30 days only. So, 31st April will
never come!
For our convenience we will classify these invalid dates
into two groups:
I. February will have either 28 or 29 days (in
case of leap year). So,
29th February will be an invalid date in case of all non-leap years!
II. Following months will always have 30 days
only:
- April
- June
- September
- November
So, if the person asks you for a day of a date then make
sure that before finding the day, the
date given is not an invalid date i.e. given date is not among any of the
invalid dates mentioned in the above two groups!
That is to it!
One important thing again- We are using this trick for the dates those fall in Gregorian
calendar only. And it is said that-Gregorian
calendar came into existence from 24th February 1582! So, we
will calculate the day of any date which is falling after 23rd
February 1582..!! To know more about Gregorian calendar, click here!
Before I finish up let me tell you something –
While using this trick you may fail several times, you may make mistakes. I know this because even I have
failed several times. I used to ask people for date of their choices (for which
they already knew the day falling on those dates) and used to end up calculating
the wrong day. And when I used to tell them the output; they used to laugh at
me. But I never gave up. I learnt from those mistakes. I used to dig out my
calculations and used to find out where I did the mistake. And I used to make
note of all such mistakes so that I would not repeat them again. And now I can
tell the day of any date accurately within few seconds…!!!
So, it’s my honest advice to you as
well, never ever give up. Whenever you fall, get up. Just keep on trying and
trying. And one day you will be amazed to see that you have mastered this trick...!!
Please send me source code written in Java or C + +.(Calendar-In-Mind )
ReplyDeleteThank you very much!
sake.iasi@gmail.com
I must admit that you have worked hard!
ReplyDeleteCongratulations and respect for the work!
Hi cos take, thanks a lot for your appreciation..!!
DeleteAbout source code- as now you know the complete logic behind the trick, I would suggest you to implement it in any programming language of your choice Java or C++ or any other...
All the best! :)