Re: Year 2000 is NOT a leap year
Posted in 1997
In article <5rb2qm$4g7@news.tamu.edu>, rjsparks@defiant.tamu.edu (Robert Sparks) wrote: > > In article <5r3jeq$2em@scottlee.mindspring.com>, > The Dad <scottlee@mindspring.com> wrote: > >I thought that the next term was 4000 (from something I read back when I > >thought that this was interesting... it's been a while). Someone then > >proceeded to correct me that this was an old wives' tail. I didn't know > >for sure, so I shut up. > > probably the most prudent thing to do around someone who mistakes > algorithms and anatomy... > > RjS I could give below a simple algorithm to compute day numbers (Julian days ?), to compute the count of days between two dates, or the day of the week for exemple: long julianday(int year, int month, int day) { if (month < 3) month +=12, year--; return (long)year * 365 + year % 4 - year % 100 + year % 400 + month * 1225 / 4 + day; } You may substract or add any constant to the formula above, for example the constant returned by this function for a known date, so that the formula will return the number of days since that known date. Does any one know about a formula for years of leap seconds that occur from time to time (like a few months ago this year, when we had a day of 24 hours plus a additional leap second) ? The concept has been created since the year when we have fixed the duration of the second by defining it with atomic clocks. ):-o Or do we have to trust astronoms that compute the drift of the rotation of the earth. As far as I know, there is no demonstrated algorithm for it because precise astronomic observation is not old enough to have an answer. Will it be predictable, or will it depend on comets, solar eruptions, meteorits, climatic changes in the atmosphere, air pollution, seas level, or volcano eruptions, or even political influences for the final decision, who knows ? ;-/ Can anybody also show up an algorithm for lunar cycles, or more useful: does anyone know of an algorithm for christian, days, which is of great economic importance because those days are closed in many countries ? I have heard about an official algorithms to compute the Sunday of Catholic Paques, which fixes all other varying dates in the Christian calendar ? I heard that we had to compute the lunar cycles near the equinoxes, plus a given number of sundays, but I'm not sure of it... May be I'll search in astronomic newsgroups... :-> -------------------==== Posted via Deja News ====----------------------- http://www.dejanews.com/ Search, Read, Post to Usenet