English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

According to leap year calculations:
1. If a year is divisable by 4: then leap year, unless
2. Year is divisable by 100: then not leap year, except when
3. Year is divisable by 400: then leap year, if and only if
4. Year is not disisable by 4000 then not leap year.

Is step 4 used at all? I know 1-3 is for sure.

I am programming a leap year script; it's not like it will be important to me - I'll won't be able to live 1993 years to see it. Just curious.

2007-03-21 21:25:00 · 5 answers · asked by Omega F 2 in Science & Mathematics Other - Science

5 answers

I think step 4 had been proposed to improve the accuracy. Not sure if it is accepted internationally. But it is certainly correct.

If you choose not to implement it, just put a note somewhere that the routine works for years up to 3999.

2007-03-21 21:43:08 · answer #1 · answered by ideaquest 7 · 0 0

It is an interesting question. Most people believe that if th year is divisible by 4 than it is a leap year. But this is not true as you explain in your question. There is an interesting article in the Wilkipedia: ( http://en.wikipedia.org/wiki/Leap_year)
the following algorithm which is in agreement with your assumption. It is as follows:

if year modulus 400 is 0 then leap
else if year modulus 100 is 0 then no_leap
else if year modulus 4 is 0 then leap
else no_leap

It appears that year 4000 is a leap year if you believe Wilkipedia’s explanation. I hope this is helpful.

2007-03-22 23:44:57 · answer #2 · answered by East Ender 2 · 0 0

bool isLeapYear(int pY)
// Given: some year, pY
// Returns true if pY is a leap year, false if it is not
{
bool result=false;
if (pY % 400 == 0) result = true;
else if (pY % 100 == 0) result = false;
else if (pY % 4 == 0) result = true;
else result = false;
return result;
} // isLeapYear()


There is no such consideration regarding 4000 divisibility,


how ever actually

The accumulated difference between the Gregorian calendar and the vernal equinoctial year amounts to 1 day in about 8,000 years. This suggests that the calendar needs to be improved by another refinement to the leap year rule: perhaps by avoiding leap years in years divisible by 8,000.

(The most common such proposal is to avoid leap years in years divisible by 4,000 [1]. This is based on the difference between the Gregorian calendar and the mean tropical year. Others claim, erroneously, that the Gregorian calendar itself already contains a refinement of this kind [2].)

A system of 128-year-based leap years has been proposed, and it can be adopted directly without any modification to current leap year calculations until the year 2048.

However, there is little point in planning a calendar so far ahead because over a timescale of tens of thousands of years the number of days in a year will change for a number of reasons, most notably:

1. Precession of the equinoxes moves the position of the vernal equinox with respect to perihelion and so changes the length of the vernal equinoctial year.
2. Tidal acceleration from the sun and moon slows the rotation of the earth, making the day longer.

In particular, the second component of change depends on such things as post-glacial rebound and sea level rise due to climate change. We can't predict these changes accurately enough to be able to make a calendar that will be accurate to a day in tens of thousands of years.

2007-03-21 21:35:12 · answer #3 · answered by deep.kamal 2 · 0 1

If the 300 and sixty 5 days is divisible via 4 yet not whether that is divisible via one hundred till it is likewise divisible via 4 hundred. In different words 1700, 1800, and 1900 are actually not bounce years yet 2000 replaced right into a bounce 3 hundred and sixty 5 days. Z

2016-10-19 08:00:58 · answer #4 · answered by ? 4 · 0 0

I believe the accepted method is any year (full No. like 1996) divided by 4 is a leap year.

2007-03-22 07:46:21 · answer #5 · answered by Norrie 7 · 0 2

fedest.com, questions and answers