×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

The Math of Leap Days

samzenpus posted more than 2 years ago | from the extra-days-extra-credit dept.

Math 225

The Bad Astronomer writes "We have leap days every four years because the Earth's day and year don't divide evenly. But there's more to it than that... a lot more. A year isn't exactly 365.25 days long, and that leads to needing more complicated math and rules for when we do and don't have a leap year. If you've ever wanted to see that math laid out, now's your chance, and it only comes along every four years. Except every hundred years. Except every four hundred years."

cancel ×
This is a preview of your comment

No Comment Title Entered

Anonymous Coward 1 minute ago

No Comment Entered

225 comments

Duh. (3, Funny)

masternerdguy (2468142) | more than 2 years ago | (#39201603)

There are no leap years. It's a conspiracy to cause IT nightmares and bratty kids who claim their age /= 4.

Length of year, day, etc. (2)

AliasMarlowe (1042386) | more than 2 years ago | (#39201755)

A year is not even exactly 365.2422 days long (if we could actually agree how long a "day" is).

Re:Length of year, day, etc. (2)

WebManWalking (1225366) | more than 2 years ago | (#39202673)

The 3/1000 difference from .2425 to .2422 results in a Y30K problem. After 30,000 AD, we can relax for a while.

Re:Duh. (2)

jellomizer (103300) | more than 2 years ago | (#39202083)

Not that much of a Nightmare, at least with modern Data classes. You take the month and year you are looking at. date(Year, Month+1, Day = 1) - 1 day. Then you get the last day of every month. Leap Year isn't the nightmare, The nightmare is the normal Month system with different days each month.

Re:Duh. (0)

Anonymous Coward | more than 2 years ago | (#39202179)

Except those same Date classes also have a function that tells you the number of dates in a given month of a given year, so no nightmare there at all.

Re:Duh. (4, Informative)

kirkb (158552) | more than 2 years ago | (#39202649)

No, the REAL nightmare for programmers is daylight savings time. Especially in the spring, when local times jump back and repeat. Ugh.

Re:Duh. (5, Insightful)

egamma (572162) | more than 2 years ago | (#39202717)

No, the REAL nightmare for programmers is daylight savings time. Especially in the spring, when local times jump back and repeat. Ugh.

That's why you should save the time in UTC format, and then let the OS help you translate that into a display time.

Complicated? (5, Insightful)

Anonymous Coward | more than 2 years ago | (#39201621)

I think we have different definitions of complicated.

Re:Complicated? (4, Funny)

Meshach (578918) | more than 2 years ago | (#39201769)

I think we have different definitions of complicated.

Evidently spelling and grammar top the list for the /. editors.

Re:Complicated? (0)

Anonymous Coward | more than 2 years ago | (#39201775)

Agreed. I had to write an algorithm for checking if a year was a leap year. It can be done in one, non-wrapping, line of code.

Re:Complicated? (0)

Talderas (1212466) | more than 2 years ago | (#39201839)

if (year % 4 == 0) ?

Re:Complicated? (2, Interesting)

Anonymous Coward | more than 2 years ago | (#39201877)

unless it's the turn of the century, cuz those aren't leap years. Unless it's every fourth turn of the century, because those ones are. Hence why 2000 was a leap year, even though according to the century rule it wasn't supposed to be one. 2100 won't be a leap year.

Re:Complicated? (1)

mattack2 (1165421) | more than 2 years ago | (#39202637)

No 'turn of the century year' is a leap year, since the 'turn of the century' is from XY0 -> XY1.

You're referring to the "odometer multiple digit rollover" years.

Re:Complicated? (1)

19thNervousBreakdown (768619) | more than 2 years ago | (#39202227)

Posts like this are why I'm glad stories like this are posted every four years or so.

inLeapYear = year % 4 == 0 && (!(year % 100 == 0) || (year % 400 == 0))

The real fun starts when you try calculating pre-Gregorian dates.

Re:Complicated? (1)

viperidaenz (2515578) | more than 2 years ago | (#39202423)

Calendar cal = Calendar.getInstance(); cal.set(year, Calendar.FEBRUARY, 1); boolean leap = cal.getActualMaximum(Calendar.MONTH) == 29; As long as your timezone data in the JVM is correct, will work for any year post or pre gregorian

Re:Complicated? (0)

Anonymous Coward | more than 2 years ago | (#39202465)

I use the Mayan calendar, you insensitive clod!

Re:Complicated? (2)

neokushan (932374) | more than 2 years ago | (#39202461)

Pre-Gregorian was the Julian Calendar which WAS just "year % 4 == 0". The 100/400 year exceptions were what the Gregorian Calendar changed.
Unless you mean calculating a Julian date from a gregorian date....

Revised Julian Calendar (4, Informative)

uigrad_2000 (398500) | more than 2 years ago | (#39202963)

And, not everyone has changed to the Gregorian calendar yet.

There's a few areas of European that refused to change from the Julian to the Gregorian, not because of any scientific reason, but because of a political reason. You see for quite a while, the main purpose of a complicated calendar was to keep track of when exactly Easter should be celebrated, and the different Orthodox churches quibbled about this. For a while, there was two different Easters, one for people on the Julian calendar, and one for people using the Gregorian.

The whole world changed to Gregorian, so they had to compromise. The compromise is one of the most hilarious developments in time tracking: the Revised Julian Calendar [wikipedia.org]

Those who follow the Revised Julian Calendar [wikipedia.org] never obey the "every 400 years" rule. Instead, they celebrate leap years every 4, unless the year is divisible by 100, unless the year is mod 900 is 200 or 600

The net result is that those countries were in agreemet with us retroactively in 1600, and in 2000, but the system will fall apart in 2400. The designers then get to live knowing that their principles have not been compromised, yet it will leave the fallout of the difference to their descendants.

Re:Complicated? (0)

Anonymous Coward | more than 2 years ago | (#39202307)

( ((year)>0) && !((year)%4) && ( ((year)%100) || !((year)%400) ) )

Re:Complicated? (1)

19thNervousBreakdown (768619) | more than 2 years ago | (#39202441)

Now wait a minute, if you're concerned about years prior to 1, you need to be concerned about the fact that leap days as we know it didn't come about until the Gregorian calendar. At the very least, you should change that > 0 to > 1582 or so (depending on where you're calculating dates). The Julian calendar is a simple % 4, without the % 100 and % 400 stuff.

Re:Complicated? (0)

Anonymous Coward | more than 2 years ago | (#39202805)

If you're worried about Gregorian calendar vs. Julian calendar, you have a bigger problem.

Re:Complicated? (2, Insightful)

Anonymous Coward | more than 2 years ago | (#39202031)

In APL I could do it in four characters without any of those wimpy spaces and other noise.

Re:Complicated? (1)

KiloByte (825081) | more than 2 years ago | (#39201921)

Well, even when it was just a leap year every 4 years, folks managed to get it wrong, and only in 4AD someone pointed out the error in how the recommendations of mathematicians/astronomers employed by Julius Caesar had been interpreted. Between the reform (45BC) and 4AD leap years happened once per 3 years.

Totally agree. (0)

Anonymous Coward | more than 2 years ago | (#39202105)

I wrote a leap-day calculator in PIC16 ASM about a decade ago as part of a weekday-on-a-given-date calculation. I don't think it was any more than 20 op-codes with one of the most limited ISA's that exists.

It's not complicated at all. Programmers only make mistakes because they don't do their research as to what exactly they're trying to calculate.

Re:Totally agree. (5, Interesting)

jc42 (318812) | more than 2 years ago | (#39202521)

What I like to do when people seem confused about leap-year calculation is quote them the text in Pope Gregory's definition in the February 24, 1582 document "Inter Gravissimas":

"Deinde, ne in posterum a XII kalendas aprilis aequinoctium recedat, statuimus bissextum quarto quoque anno (uti mos est) continuari debere, praeterquam in centesimis annis; qui, quamvis bissextiles antea semper fuerint, qualem etiam esse volumus annum MDC, post eum tamen qui deinceps consequentur centesimi non omnes bissextiles sint, sed in quadringentis quibusque annis primi quique tres centesimi sine bissexto transigantur, quartus vero quisque centesimus bissextilis sit, ita ut annus MDCC, MDCCC, MDCCCC bissextiles non sint. Anno vero MM, more consueto dies bissextus intercaletur, februario dies XXIX continente, idemque ordo intermittendi intercalandique bissextum diem in quadringentis quibusque annis perpetuo conservetur."

This quote should make the algorithm clear to any competent programmer. Note that it contains the explicit example that in the year 2000, February contains 29 days.

Of course, it can be expressed in many fewer characters in most programming languages. But the pope's astronomer didn't have any programming languages available back in 1582.

It can be fun to point out that the above Latin passage is still the "official" definition of the leap year scheme, since no standards body has tried to revise it. As far as I've been able to determine, that is; let me know if this has ever actually happened. It'd be especially fun if some standards body had tried to rephrase this in a modern language, but got it wrong. If so, they were probably shocked to discover that a 16th-century pope's edict trumped their scientific calcuations.

(The /. software guys might be able to block posting in Russian or Chinese or Arabic, but it's a lot harder to prevent people from using Latin. ;-)

U.S. GDP predicted to rise .3% in 2012 (0)

Anonymous Coward | more than 2 years ago | (#39201631)

There's an extra working day! Woohoo!

Re:U.S. GDP predicted to rise .3% in 2012 (1)

nitehawk214 (222219) | more than 2 years ago | (#39201797)

There's an extra working day! Woohoo!

Actually there is more like 5/7 of a working day, right?

Re:U.S. GDP predicted to rise .3% in 2012 (1)

nedlohs (1335013) | more than 2 years ago | (#39202429)

No there's an extra working day.

We get an extra Monday this year - if it wasn't a leap year then Dec 31 would be Sunday and that Monday would be part of next year.

Re:U.S. GDP predicted to rise .3% in 2012 (1)

arth1 (260657) | more than 2 years ago | (#39202367)

There's an extra working day! Woohoo!

Also one more day before you need to pay the monthly mortgages and bills. February can be hard on people who are on a tight budget.

Now's your chance? (1)

LMacG (118321) | more than 2 years ago | (#39201699)

I'm pretty sure the math doesn't go anywhere. It's not Brigadoon.

In fact I'm going to take the URL and put it in my calendar for next June.

Will report back ....

In English ... (-1)

Anonymous Coward | more than 2 years ago | (#39201709)

In English it's spelled 'four' not 'for' but, like me, you may not be a native English speaker ;)

Bad font! (1)

Stickybombs (1805046) | more than 2 years ago | (#39201731)

Does anyone else really dislike the way that font represents numbers, constantly bouncing up and down above and below the rest?

Re:Bad font! (1)

Sique (173459) | more than 2 years ago | (#39201845)

It's fine with me. The main part of the number is the same size than the lowercase letters, and some of the numbers have ascenders and descenders - making them very similar in their typographic character than normal english text with lots of lowercase letters, some of them with ascenders and descenders, and a few uppercase letters thrown in for good measure.

Re:Bad font! (1)

arth1 (260657) | more than 2 years ago | (#39202251)

Which font are you talking about?
That's how numerals used to be. It does make the numbers fit better with lower case text, which does the same thing. The "modern" variety with 0123456789 all the same height are more like "upper case" numbers.
Granted, a lot of the time when we use figures, it's in a context where upper case makes sense, but not always. Inside a text, it may very well be more readable if 3-4-5-7-9 dip down just like some letters do.
Then again, if you grew up with a font where g-j-p-q-y didn't have descenders, you might think otherwise. We could decrease line spacing if it wasn't for those five pesky letters...

Re:Bad font! (1)

mattack2 (1165421) | more than 2 years ago | (#39202685)

Then again, if you grew up with a font where g-j-p-q-y didn't have descenders, you might think otherwise. We could decrease line spacing if it wasn't for those five pesky letters...

Was that a common occurrence? The situations I seem to remember running into it were lowercase mods for Apple ][ / ][+, and perhaps non-Apple 80 column cards for //es.

Lets use the Myan Calendar (1)

na1led (1030470) | more than 2 years ago | (#39201739)

Oh wait, it ends in 2012!

Re:Lets use the Myan Calendar (4, Funny)

spidercoz (947220) | more than 2 years ago | (#39201829)

did your "Myans" invent the number "for"?

Re:Lets use the Myan Calendar (1)

jellomizer (103300) | more than 2 years ago | (#39202211)

Or So says the Evangelical Christians. However I am not sure why they are basing their information on a Pagan Calendar.

Our whole calendar is messed up. (0)

Oswald McWeany (2428506) | more than 2 years ago | (#39201741)

Our whole calendar is messed up. First- Jan 1st is a poor start date.

I suspect the original pioneers intended the year to start on the Winter Solstice- which is more like Dec 21st most years on our calendar.

So- The year should start on Dec21st.

Then- our months are supposed to be based on cycles of the moon (Approx every 28 days)- but because there were 13 and superstitious nitwits didn't like 13 we have 12 months with varying days.

Our current concept of a month is meaningless. The whole 7 day week is rather random too- based on some out-of-date dogma that is probably mistranslated. (the original word in Genesis translated as "day" was more accurately "a period of time" although it was often "day" but not necessarily) - so we force the meaning of "day" onto it and have a 7 day week. Silly number.

Let's make a week 10 days- a much more logical number.

So we have 36 weeks in a year. If we MUST have a bigger break- we can divide these into 9 months of 4 weeks each.

We would then have 5 or 6 days at the end- a "half week" - we would determine if it would be 5 or 6 days depending on how many days it took to reach the winter solstice since that would be the definition of new year.

Not perfect- but based more on logic than our current system and no-silly formulas needed (other than determining the solstice)

Re:Our whole calendar is messed up. (5, Insightful)

dmt0 (1295725) | more than 2 years ago | (#39201821)

The whole 7 day week is rather random too- based on some out-of-date dogma that is probably mistranslated. (the original word in Genesis translated as "day" was more accurately "a period of time" although it was often "day" but not necessarily) - so we force the meaning of "day" onto it and have a 7 day week. Silly number.

Let's make a week 10 days- a much more logical number.

Actually 7-day week makes sense if you have a 28-day month.

Re:Our whole calendar is messed up. (1)

Fast Thick Pants (1081517) | more than 2 years ago | (#39202767)

Great, for the 6% of months that are 28 days. Otherwise, not so much.

Actually I'm pretty fond of the 7-day week, but maybe months should be a nice round number of days, like 32. Then we'd get an extra day of weekend.

Re:Our whole calendar is messed up. (1)

eht (8912) | more than 2 years ago | (#39202827)

Every month has 28 days.

Re:Our whole calendar is messed up. (1)

Fast Thick Pants (1081517) | more than 2 years ago | (#39202913)

Not in my new scheme; the short month would be down to 13, or 14 on leap years. I don't want February to be short though -- it's been short long enough. Calculations would be a lot simpler all around if the *last* month were the short one.

That's right -- a war on Chistmas!

Re:Our whole calendar is messed up. (2)

JackPepper (1603563) | more than 2 years ago | (#39202817)

I have been ranting about a 13 month year to my coworkers for about a year now. 12 months would have 28 days. The last month would have 29 days. Every leap year the last month would have 30 days. A lot of companies would be giving an extra day of vacation every four years.

Re:Our whole calendar is messed up. (1)

icebike (68054) | more than 2 years ago | (#39201885)

Why is it everyone has their own scheme for rebuilding Calendars?

And why so much significance tied to the winter solstice? That hardly matters anymore in a global economy.

Re:Our whole calendar is messed up. (1)

Anonymous Coward | more than 2 years ago | (#39202081)

Let's just switch to stardates and be done with it!

Re:Our whole calendar is messed up. (0)

Anonymous Coward | more than 2 years ago | (#39202149)

Because Dec 21 is close to Jan 1.

Re:Our whole calendar is messed up. (1)

Oswald McWeany (2428506) | more than 2 years ago | (#39202263)

Solstice is significant because it is not an arbitrary day- it is a measurable location on earth's flight. Jan 1 is just arbitrary with no scientific marker. It is very likely when the calendar were first created they intended it to be on the solstice- but human ineptitude made it drift to what is Jan 1 today.

Re:Our whole calendar is messed up. (2)

DragonWriter (970822) | more than 2 years ago | (#39202845)

Solstice is significant because it is not an arbitrary day- it is a measurable location on earth's flight. Jan 1 is just arbitrary with no scientific marker. It is very likely when the calendar were first created they intended it to be on the solstice- but human ineptitude made it drift to what is Jan 1 today.

The oldest known version of the Roman calendar that became the calendar we have now had its start date fixed to the vernal equinox, actually.

Jan. 1 wasn't reached by the date floating because the calendar wasn't pinned to the solar year, it was reached by Roman Republican practice of naming years after the consuls in office, which resulted in the year (for documentary purposes) starting on whatever date consular terms switched, which eventually got ended up being Jan. 1. This start date then stuck even after Roman consular terms became irrelevant.

Its not like all this isn't well documented, perhaps you should bother to read up on what is known about a topic before trumpeting assumptions as likely-to-be-true that are based on nothing more than your speculation about dates that happen to be near each other.

Re:Our whole calendar is messed up. (1)

jimbolauski (882977) | more than 2 years ago | (#39202459)

Do you remember the shitstorm when daylight savings time got longer, all the problems with clocks not adjusting properly and meetings being missed, and that was just an hour. Imagine a whole day being removed from the calendar every 4 years, the panic will be worse then Y2K. What about the people that were born on Feb 29, do we just say you no longer get a birthday when the calendars are updated? Will entering your birthday as Feb 29 break the system? Our system sucks but it's our system and there is no going back now.

Re:Our whole calendar is messed up. (4, Insightful)

icebike (68054) | more than 2 years ago | (#39202597)

Exactly my point.
Nobody's going to listen to any ideas of changing this at this point because there is no need, and a lot of pain involved.

If you planned it for 10 years you would still have 50% of our automated infrastructure stuck on old time keepers. Bazillions of contracts, deeds, etc would need rewrite, and virtually all historical texts would need corrections.

The only place where there is anything to gain is in date computations in computers, and we have that solved.

Its a mess, but not a debilitating one.

Converting to any other system would be all pain, and zero gain.

Re:Our whole calendar is messed up. (1)

Pokermike (896718) | more than 2 years ago | (#39202315)

Let's make a week 10 days- a much more logical number.

We could call it the metric week, and every country but the US could switch to it. Sweet.

Re:Our whole calendar is messed up. (1)

operagost (62405) | more than 2 years ago | (#39202479)

Its already been done, but I think the French ended up killing a bunch of people first.

Re:Our whole calendar is messed up. (0)

Anonymous Coward | more than 2 years ago | (#39202435)

For someone who pretends to know so much, I'm surprised you don't know that originally there were ten months: Dec{imal,ember). December, according to its name is supposed to be the tenth month.

But thanks to some caesar named Augustus we have one extra. I'll leave the origin of the other added month as an exercise for you.

And in early Roman times the year used to start in March, closer to the Vernal equinox, which seems like it might have had more significance than the Winter solstice. You know, the whole spring planting thing.

And I like ten months, with 36 days each and five days of year end holiday (because nobody _really_ works at Christmas-time anyway.)

Re:Our whole calendar is messed up. (1)

mooingyak (720677) | more than 2 years ago | (#39202595)

You jump back and forth between wrong and right.

For someone who pretends to know so much, I'm surprised you don't know that originally there were ten months: Dec{imal,ember). December, according to its name is supposed to be the tenth month.

Correct

But thanks to some caesar named Augustus we have one extra. I'll leave the origin of the other added month as an exercise for you.

Often repeated, but not correct. There had been twelve months long before Augustus was born.

And in early Roman times the year used to start in March, closer to the Vernal equinox,

And back to correct.

They originally had 10 months of roughly 30 days each, plus a period called 'winter' that was just kind of there to fill in the rest of it. Some time around 700BC give or take (pre-Republic, still during the Monarchy) 'winter' was converted to the months of January and February, which were added to the beginning of the year.

The months of July and August were always there, they were simply renamed from what in English would be Quintember and Sextember.

Re:Our whole calendar is messed up. (0)

Anonymous Coward | more than 2 years ago | (#39202819)

Sextember

The sexiest month!

Re:Our whole calendar is messed up. (5, Informative)

Guppy06 (410832) | more than 2 years ago | (#39202661)

Our whole calendar is messed up. First- Jan 1st is a poor start date.

I suspect the original pioneers intended the year to start on the Winter Solstice-

Yes, but Julius Caesar decided to start it on the first new moon following. And based on the best data available at the time, every 19th year would have started on a new moon (see below).

which is more like Dec 21st most years on our calendar.

More like Dec 25 at the time, hence the date of Christmas.

So- The year should start on Dec21st.

It took almost 2500 years for everyone to agree to start their year with January (instead of March). George Washington himself was fuzzy on what year he was born. Now, after just getting things straightened out (on a relative time scale), you want to fuck with it again?

Then- our months are supposed to be based on cycles of the moon (Approx every 28 days)-

29.5 days. The usual approximation is alternating months of 29 days and 30 days in length.

but because there were 13 and superstitious nitwits didn't like 13 we have 12 months with varying days.

13-month years work for all the cultures with a lunar calendar, e. g. the Jews and the Chinese. The biggest problem is reckoning when the 13th month gets added. If you treat the tropical year as 365 days, you have to add an extra synodic month 7 times in 19 years (Metonic cycle). If you use 365.25 days for a tropical year, it's more accurate to say that 28 are added in 76 years (Callippic cycle). And if you're using the even-more-accurate 365.2425-day approximation... well, go search for the term "epact."

The whole 7 day week is rather random too-

Try counting the number of days between the first visibility of the new crescent moon and first quarter. Only your eyes and your ability to estimate the illumination of the moon are allowed.

based on some out-of-date dogma that is probably mistranslated. (the original word in Genesis translated as "day" was more accurately "a period of time" although it was often "day" but not necessarily)

If you're referring to chapter 1, note that "day" is always paired with "night."

Let's make a week 10 days- a much more logical number.

Revolutionary France called, they want their "decades" back.

Regardless, (365 mod 7) = 1 while (365 mod 10) = 5.

So we have 36 weeks in a year. If we MUST have a bigger break- we can divide these into 9 months of 4 weeks each.

Even Revolutionary France understood the importance of the four seasons, with agriculture being the foundation of modern civilization and all.

We would then have 5 or 6 days at the end- a "half week"

Coptic Egyptians want their "epagomenal days" back.

Not perfect- but based more on logic than our current system and no-silly formulas needed (other than determining the solstice)

And you would once again have devised a calendar system that focuses on rationalism at the expense of pragmatism and utility, using many ideas have have been tried for centuries or even millennia. Here's what you'd be abandoning:

  • 1.) It is currently trivial to determine what day of the week successive years start on.
  • 2.) All solstices and equinoxes roughly occur the same number of days before the end of their respective months.
  • 3.) Equinoxes and solstices are treated as dates rather than instants (at this instant, it's February 29 in North America and March 1 in Asia).
  • 4.) All days are allotted to a month.
  • 5.) All days are allotted to a week.
  • 6.) Intercalary days follow a simple mathematical pattern with once-in-a-lifetime exceptions.

In fact, 2, 4 and 6 above were deliberate design choices on the part of Julius Caesar specifically to keep things simple.

Re:Our whole calendar is messed up. (1)

mattack2 (1165421) | more than 2 years ago | (#39202725)

I'll take you up on your rebuilt calendar, after you get all mail servers and mail clients to use a replacement for SMTP, to prevent spam (or at least make it 100% reliably traceable/non-forgeable, and not have to need filters on the client end).

Re:Our whole calendar is messed up. (2)

Rhacman (1528815) | more than 2 years ago | (#39202733)

Pff, base 10 logical? I propose we cut off everyones pinky fingers and transition everything to base-8 which is a nice power of 2. We should also probably be working on speeding up the rotation of the earth so that there are 512 days in a year. Once we do all that we can have exactly; 8 months to a year, 8 weeks to a month, and 8 days to a week.

Re:Our whole calendar is messed up. (1)

JazzHarper (745403) | more than 2 years ago | (#39202765)

Our whole calendar is messed up. First- Jan 1st is a poor start date.

I suspect the original pioneers intended the year to start on the Winter Solstice...

Good guess, but there is not a lot of evidence to support that theory. In pre-Roman cultures, the Vernal Equinox was more commonly selected as the start of the year. The Calendar of Romulus, from about 753 BC, used the Vernal Equinox as the start of the year. It ran for ten months (304 days), followed by a number of days of winter, which were not considered part of any month. The Julian Calendar, starting in 45 BC, used January 1 as the start of the civil calendar year but the calendar was designed with the Vernal Equinox as a reference, so that it would fall on March 25th. Different dates, coinciding with various religious holidays, were used as the beginning of the year during the Middle Ages. For a while, the Anglo-Saxon custom was to use Christmas Day, which is indeed close to the Winter Solstice (and may have been influenced by earlier pagan custom), but that was changed after the Norman Conquest. In Britain and its colonies, from about 1155 until the adoption of the Gregorian Calendar in 1752, the civil calendar year began on March 25th, which coincides with the Annunciation and is close to the Vernal Equinox.

Re:Our whole calendar is messed up. (2)

DragonWriter (970822) | more than 2 years ago | (#39202795)

Our whole calendar is messed up. First- Jan 1st is a poor start date.

All start dates are equally arbitrary, so Jan. 1 is as good as anything else.

I suspect the original pioneers intended the year to start on the Winter Solstice

No, The starting day of the year under the old Roman Republican system (from which our modern system evolved by way of the Julian and Gregorian reforms) was whatever day happened to start the Roman consular term (since years weren't numbered, they were named after the consuls in office), this moved more than once during the life of the Roman Republic and came to rest at January 1 in 153 B.C.

The starting date stuck in most places using the Julian calendar (at least in common usage as to what was "New Years Day"; though lots of places moved the official starting date for the numbered year to some church holiday, and which holiday was chosen varied from place to place) and eventually became a universal norm.

Then- our months are supposed to be based on cycles of the moon (Approx every 28 days)- but because there were 13 and superstitious nitwits didn't like 13 we have 12 months with varying days.

Actually, no, the ancient Roman Calendar had ten months of 30 to 31 days, the months in it were never aligned to cycles of the moon, and there weren't 13 of them. It started on the vernal equinox (not the winter solistice, as you've suggested must be the case), and had a number of days added outside of any month at the end to make sure the next year started on a vernal equinox (and, since it only had 304 days in its 10 months, there were a bunch of those days.)

A later reform brought it up to 12 months, all of which (except February) had an odd number of days (29 or 31) because odd numbers were considered lucky. February was addressed by splitting it into to pieces, each of which had an odd number of days (23 and 5), and whenever a leap month (the basic calendar was 354 days long) was added to align it with the equinoxes, the leap month was added after the first part of February and incorporated the last part of February.

Our current concept of a month is meaningless. The whole 7 day week is rather random too- based on some out-of-date dogma that is probably mistranslated.

Actually, the 7-day week makes sense as 1/4 of the 28-day lunar cycle; its quite likely that that shaped the creation story you are referring to rather than the other way around.

Let's make a week 10 days- a much more logical number.

Its a completely arbitrary number. Matching up with the median number of fingers a human has doesn't make it a "logical number".

Not perfect- but based more on logic than our current system and no-silly formulas needed (other than determining the solstice)

Actually, its based on no more logic than the worst of the older calendars -- its just pick some arbitrary numbers as a basis for the basic schedule based on criteria that have no fundamental utility except aesthetic appeal to the designer, and then when it doesn't match to its basic goal (aligning with the cycle of equinoxes) add however many days necessary outside the regular cycles to fix that

Re:Our whole calendar is messed up. (2)

JazzHarper (745403) | more than 2 years ago | (#39202877)

Let's make a week 10 days- a much more logical number.

So we have 36 weeks in a year. If we MUST have a bigger break- we can divide these into 9 months of 4 weeks each.

The French Republic did exactly that. Their calendar had 10 days in a week, 3 weeks in a month, 12 months in a year. That calendar remained in effect for 12 years, until it was abolished by Napoleon.

They also introduced decimal time (100 seconds in a minute, 100 minutes in an hour, 10 hours in a day).

Knowing the rules (and not just for leap day) (4, Interesting)

RyoShin (610051) | more than 2 years ago | (#39201757)

One of my first projects in Computing and Algorithms I in college was to make a calendar that would print out in console with days correctly placed on the day of the week. The instructions specified to take special care for leap day; everyone thought they understood leap day, so no one bothered to check on the rules. The fact that round centuries do not include a leap day except when (year mod 400 = 0) meant that every one of our calendars[1] was wrong for certain years (but right for others, IIRC). And our professor docked us points as such. Back then, the entire class (along with myself) felt that we were misled or cheated, but looking back on it now that was an important lesson on project management, specifically researching requirements and checking with the interested party about how things are.

I reckon this lesson was missed by many, which leads to the various issues we see for software on Leap Day, including Microsoft's Azure as mentioned in a recent /. article.

[1] For the half of the class that completed the project, this 101 class was used to weed out those who couldn't actually program for crap and the EEs just needed a C to meet their requirement.

Four days too late! (4, Informative)

Guppy06 (410832) | more than 2 years ago | (#39201831)

The extra, or "bissextile" day is actually inserted immediately after February 23.

The Romans picked up the Egyptians' idea of treating a common year as 360+5 days, since 360 is a highly composite number and all (the Mayans ended up doing the same). But instead of treating the extra 5 days as "epagomenal" (outside any month), they were treated as the last five days before the first month of spring, i. e. the last five days of February.

Treating the five-day block of Feb 24 through Feb 28 as inviolate meant inserting the extra day (previously an extra month) before it.

This is why the Christian feast of Saint Matthias has historically been observed on February 24 in common years and February 25 in leap years; it's always the fifth ("sixth," if you lack an understanding of zero) day before the calends of March.

leap days make ood codeing bugs show up some times (2)

Joe_Dragon (2206452) | more than 2 years ago | (#39201897)

Re:leap days make ood codeing bugs show up some ti (0)

Anonymous Coward | more than 2 years ago | (#39202619)

odd spelling too

Misidentifying the source of the problem (1)

DragonWriter (970822) | more than 2 years ago | (#39202905)

leap days make ood codeing bugs show up some times

When code does not correctly model the problem domain, the error isn't with the domain.

Who are we kidding? The real reason for leap days: (2)

EmagGeek (574360) | more than 2 years ago | (#39202057)

To give first-time programming students a fun and interesting homework assignment.

We're all going to die... (1)

docilespelunker (1883198) | more than 2 years ago | (#39202061)

Hopefully no time soon, but almost certainly before 2100, when the next leap year doesn't happen. If due to lots of exercise, few pizzas and a whole bunch of luck we do survive that long, then we'll all be too dotty to know what day it is anyway. Glad this is sorted. All we have to know is that it happens every 4 years and will do for the entire rest of ever, so long as we care. Lets get coding and hardwire in a leap year to make the 2100 bug!

Re:We're all going to die... (1)

sconeu (64226) | more than 2 years ago | (#39202557)

Ashamed to admit it, but in 1988 took advantage of the fact that 2000 was a leap year, and the fact that I doubted my system (an artillery control system) would still be in use in 2100 to simplify some leap year logic to simply year % 4.

Turns out I wasn't pessimistic enough... Obsoleted by 1998.

WTH? (1)

geekoid (135745) | more than 2 years ago | (#39202099)

Whats with all the leap stuff?
Yes, I know it's a leap year, but the only other time I remember seeing so much stuff about it being circulated was in 2000.
Still, why are adults explaining it to other adults? Is this one different? Is the world getting so mellow that a leap year is no an excuse for a lengthy discussion on a reletivly trivial event? Trivial in that the rules are pretty simple. Not trivial as in little impact.

Just make the second a little longer (-1)

Anonymous Coward | more than 2 years ago | (#39202127)

by a factor of 365.2421904/365. Then each year could have exactly 365 days.

Re:Just make the second a little longer (1)

arth1 (260657) | more than 2 years ago | (#39202325)

Won't work. The orbital period around the sun isn't constant. We're not (yet) locked in a fractional orbital sync with Jupiter, so its pull affects the nominal year length.
365.2421904 is a good approximation for right now, and the 4*25*4 rule is "good enough" for a while - locking it wouldn't make things better.

Plus, you don't really want the day to be in sync with the orbital year. Midday would not not occur at noon anymore, but shift, because perhelion doesn't happen at the same time of day every year.

Re:Just make the second a little longer (1)

alva_edison (630431) | more than 2 years ago | (#39202629)

Where do you live that midday occurs at noon. The only guarantee is that midday and noon are within two hours of each other. This is due to timezones (roughly an hour wide) and daylight saving (shifting things off by an hour).

Re:Just make the second a little longer (1)

alva_edison (630431) | more than 2 years ago | (#39202647)

Although, you're talking about shift, which over time would put it further out of sync than it already is. I view that as a possibly good thing, then we can get rid of the timezones, and everyone uses GMT. That also means no more DST.

Programming Professors Pay Attention! (1)

_0x783czar (2516522) | more than 2 years ago | (#39202299)

The answer to every programming Professor's favorite Intro. to Programming project assignment has now been leaked on the web! What will become of all the students who can now look up the formula to that mind-bending programming challenge of making a calendar application.

A modest proposal (1)

StikyPad (445176) | more than 2 years ago | (#39202507)

There's a very, very simple solution to this, and that is: At some value UTC, we all light model rocket engines with the exhaust facing east, and slow down the day such that its length goes evenly into a year. Any over/undershoot in the quantity or duration of burns can be adjusted on a much smaller scale. After that we just perform regular burns in the opposite direction to maintain angular momentum. Voila!

Re:A modest proposal (0)

Anonymous Coward | more than 2 years ago | (#39202691)

A simpler solution which doesn't harm the environment nearly as much, costs less money, gets everyone into shape, and takes care of the obligatory XKCD reference for this thread: Angular Momentum [xkcd.com]

drop astronomy for Planck units (1)

peter303 (12292) | more than 2 years ago | (#39202621)

Chose an aribitrary starting time, say the origin of this universe about 8 x 10^60 Plank units ago.

Re:drop astronomy for Planck units (0)

Anonymous Coward | more than 2 years ago | (#39202825)

I did once. I worked out the number of days since the atom was first split (can't remember when, exactly) and then split it into "decadays". This gave me 'Stardate: 1124.5" or something like that. Filled in many a boring maths lesson back at school.

And yes, I was into Star Trek at the time. Why do you ask?

Load More Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Sign up for Slashdot Newsletters
Create a Slashdot Account

Loading...