Live data from Hacker News

The leap year is February 29, not December 32 due to a Roman calendar quirk

theconversation.com

41–50 of 61 posts

Re: The leap year is February 29, not December 32 due to a Roman calendar quirk

#41

Funny story about the year 2000 that does not involve Y2K: "Everyone" knows that leap years occur on year divisible by 4 ('first rule'). The second rule to them is that if a year is divisible by 100 (1800, 1900, …2000), then it is not a leap year. So a lot of folks did not have their systems/software have February 29 in the year 2000. But there is a third rule: if the year is divisible by 400 (like 1600… and 2000) it…

Umm, this does involve Y2K. It's the title of the Wikipedia entry you linked to.

Re: The leap year is February 29, not December 32 due to a Roman calendar quirk

#42
Julius Caesar reformed the calendar in part because it had historically been manipulated for political reasons. Roman magistrates were elected for a period of years, and the Pontifex Maximus (chief priest) was in charge of the calendar, so he would often shorten the years when his political opponents were in power and lengthen the years of his political allies.

Re: The leap year is February 29, not December 32 due to a Roman calendar quirk

#45
post #31

Earlier quoted context omitted.

Wow the way this is presented is super confusing, to the point that your description includes a contradiction. Specifically, of a year is divisible by 400 it's also divisible by 100, so it's both a leap year and not leap year! Instead of showing rules as a linear list, I'd suggest it's easier to visualise it as a tree, or simpler still, as a series of nested ifs.

I mean, that contradiction is also in the first two rules. It's a leap year if it's divisible by 4, but not if it's divisible by 100, so what about 200? Best to describe it as a flowchart * Is the year divisible by 400? YES -> Leap year * NO -> Is the year divisible by 100? YES -> Not leap year * NO -> Is the year divisible by 4? YES -> Leap year * NO -> Not leap year

Pedantic but this drives me nuts - this algorithm has to do 3 divisions for almost every year. If you flip it upside down, it's significantly faster.

* Is the year divisible by 4? NO -> not leap year

* YES -> Is the year divisible by 100? NO -> leap year

* YES -> Is the year divisible by 400? NO -> not leap year

* YES -> leap year

This way you do only 1 division for 75% of years.

Re: The leap year is February 29, not December 32 due to a Roman calendar quirk

#47

Earlier quoted context omitted.

I would really like to go back to the earlier system, where there was no January or February, and we just stop having time in the winter until someone important announces it is the new Year in March.

Just when you think timezone databases can handle absolutely every weird thing somebody proposed somewhere...

I don't know why software engineers are always in favor of simplifying timekeeping systems.

Don't they know what side their bread is buttered on?

Re: The leap year is February 29, not December 32 due to a Roman calendar quirk

#48

Funny story about the year 2000 that does not involve Y2K: "Everyone" knows that leap years occur on year divisible by 4 ('first rule'). The second rule to them is that if a year is divisible by 100 (1800, 1900, …2000), then it is not a leap year. So a lot of folks did not have their systems/software have February 29 in the year 2000. But there is a third rule: if the year is divisible by 400 (like 1600… and 2000) it…

Who are these people and did they not learn these in school?

Me? First time reading about these 3 rules. Maybe not actually, but must have forgotten

Re: The leap year is February 29, not December 32 due to a Roman calendar quirk

#49

Earlier quoted context omitted.

Just when you think timezone databases can handle absolutely every weird thing somebody proposed somewhere...

I don't know why software engineers are always in favor of simplifying timekeeping systems. Don't they know what side their bread is buttered on?

It's not as if we're in danger of running out of useful things we could work on, instead of yet another change in timekeeping systems.

Re: The leap year is February 29, not December 32 due to a Roman calendar quirk

#50
post #31

Earlier quoted context omitted.

I mean, that contradiction is also in the first two rules. It's a leap year if it's divisible by 4, but not if it's divisible by 100, so what about 200? Best to describe it as a flowchart * Is the year divisible by 400? YES -> Leap year * NO -> Is the year divisible by 100? YES -> Not leap year * NO -> Is the year divisible by 4? YES -> Leap year * NO -> Not leap year

Pedantic but this drives me nuts - this algorithm has to do 3 divisions for almost every year. If you flip it upside down, it's significantly faster. * Is the year divisible by 4? NO -> not leap year * YES -> Is the year divisible by 100? NO -> leap year * YES -> Is the year divisible by 400? NO -> not leap year * YES -> leap year This way you do only 1 division for 75% of years.

Fortunately, it's not a very big N. ;)
Post reply on HN