News for hackers. Stuff that matters.
Re:Microcentury (2020) by kqr on Wednesday November 03, 2021 @08:25AM (#29093650)
I agree. My rule of thumb for this situation ("how long is a year") is just 365.2425 days, which is an accurate enough statistical expectation for the most part, and doesn't depend on any information about which year is being discussed.

(Why 365.2425? It's 365 + 1/4 - 1/100 + 1/400, corresponding to how often leap years are supposed to occur.)

Edit: useful derived numbers:

- A month is 365.2425/12 = 30.436875 days, which in my head I have stored rounded off to 30.44 days.

- A month with no holidays contains 30.44*5/7 = 21.74 weekdays. (Though I'm actually not sure about this being true in practise – I know there are some weird phase synchronisations between the weekly, monthly, and yearly cycles that I haven't explored fully.)

Re:Microcentury (2020) by prepend on Wednesday November 03, 2021 @08:36AM (#29093739)
What’s with the fractions at the end? I get the 1/4, but not sure about the 1/100 and 1/400. It seems like to with the century year only being leap if mod 400, but I don’t understand the 100 part.
Re:Microcentury (2020) by icoder on Wednesday November 03, 2021 @08:50AM (#29093857)
Leap years occur every 4 years, except we skip one every 100 years, HOWEVER we skip that skip every 400 years.

2000 was the perfect example: /4 so leap year? well /100 so no leap year? well also /400 so no no = yes leap year.

Basically that one time in our lives we could have witnessed the /100 exception, it actually wasn't, so business (= leap year) as usual.

Re:Microcentury (2020) by debesyla on Wednesday November 03, 2021 @08:59AM (#29093955)
I wonder what we will use in 400 years - I think it's possible that this kind of skip is the last one we had... Maybe.
Re:Microcentury (2020) by modulusshift on Wednesday November 03, 2021 @11:52AM (#29096353)
Don't fix what ain't broke. the year 2000 was the second skipped skip after 1600. If the Gregorian calendar could make it through those four centuries, with the increasing rate of political and social upheaval, it's not going to change much now. We've got almost 3 more millennia before we've lost a full day compared to the tropical year.
Re:Microcentury (2020) by messe on Wednesday November 03, 2021 @09:11AM (#29094089)
1. Leap year every 4 years (+1/4)

2. But not if it's divisible by 100 (-1/100)

3. Unless it's divisible by 400 (+1/400)

Re:Microcentury (2020) by ajmurmann on Wednesday November 03, 2021 @08:42AM (#29093784)
If it's divisible by 100 but not 400 it's not a leap year.