Hi every one please
Can some one help me to find a formula to get how many days are between two dates.
For example: date1- November 07, 2007
date2- March 02, 1995.
I did once sit down and write an algorithm (not a formula) that would, for example, give me the day of the week when Christ was supposedly born. (He was born on a Thursday, the same day of the week as me!) If I can write such an algorithm I can't see why you couldn't write one to find the number of days between two dates.
I would start with the years: Find the difference in the number of years and you've got 365 days for each year. Then break it down into how many months and which months they are. etc.
how accurate did you get? did you account for leap years and things like that?
(I'm a day ahead of you, I was born on a Wednesday)
remember the mnemonic: 30 days have September, April, June and November. All the rest have 31, except February, which has 28 days clear, and 29 in each leap year
I accounted for leap years and that extra day every 100 years that isn't a leap year. I think they've abandoned that one with the advent of the atomic clocks. They reset the clocks a little bit each year, or something, to account for that day.
Besides, I was using the Gregorian calendar (I think it's called that), which didn't exist until, what? 1500 or so?