[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: date %d day question
From: |
Greg Wooledge |
Subject: |
Re: date %d day question |
Date: |
Tue, 29 Oct 2024 20:43:37 -0400 |
On Wed, Oct 30, 2024 at 01:17:28 +0100, #!microsuxx wrote:
> hm very weird
> i cant find googling or ai'ing once a reference ...
> i think we here learned in school , and it got used ( eg in years of my
> life )
> every 4 years theres one month with one more day eg 32
> .... ill tell u when i find out
> .. prolly an other day
February has 28 days, except in "leap years", where it has 29 days.
Leap years occur every 4th year, except for years ending in 00 which
aren't divisible by 400. In pseudocode, it works like this:
if (year % 400 == 0)
this is a leap year
else if (year % 100 == 0)
this is NOT a leap year
else if (year % 4 == 0)
this is a leap year
else
this is NOT a leap year
2024 is a leap year. 2000 was a leap year, but 2100 will not be.
The estimate of "every 4th year" was used before the Gregorian calendar,
and it turned out to be noticeably wrong. The adjustment to remove 3
leap years every 400 years is what differentiates the Gregorian calendar
from the Julian calendar that was used previously.
- date %d day question, #!microsuxx, 2024/10/29
- Re: date %d day question, Tapani Tarvainen, 2024/10/30
- Re: date %d day question, Jeffrey Walton, 2024/10/30
- Re: date %d day question, Tapani Tarvainen, 2024/10/30
- Re: date %d day question, Greg Wooledge, 2024/10/30
- Re: date %d day question, G. Branden Robinson, 2024/10/31