help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: date %d day question


From: #!microsuxx
Subject: Re: date %d day question
Date: Wed, 30 Oct 2024 01:45:25 +0100

hm k ... ill ask a mate about this 32 day i remember ... thank you very
many times !

On Wed, Oct 30, 2024, 01:44 Greg Wooledge <greg@wooledge.org> wrote:

> 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.
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]