Date: Mon, 27 Oct 1997 10:50:44 -0800 (PST) From: "Jonathan M. Bresler" <jmb> To: steve@visint.co.uk (Stephen Roome) Cc: jmb@FreeBSD.ORG, freebsd-questions@FreeBSD.ORG Subject: Re: 2000 Compliance / dates / time libs Message-ID: <199710271850.KAA14191@hub.freebsd.org> In-Reply-To: <Pine.BSF.3.95.1000229045221.14383D-100000@dylan.visint.co.uk> from "Stephen Roome" at Feb 29, 0 04:57:07 am
next in thread | previous in thread | raw e-mail | index | archive | help
Stephen Roome wrote:
>
> On Mon, 27 Oct 1997, Jonathan M. Bresler wrote:
>
> > Stephen Roome wrote:
> > >
> > >
> > > I just set my clock to february 29 2000. Is this valid ?
> >
> > the algorithm, as i understand it is:
> >
> > if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
> > it is a leap year.
> >
> > this is only good back till the switch from julian to gregorian
> > calendars.
>
> [You stole this from k&r didn't you =), well, that's the only place I
> remember seeing this, especially in this format in C.]
hrummmmp! absolutely not! i started with
if ((year % 400 == 0) || (year % 100 != 0 && year % 4 == 0))
then switched it around ot get the most frequent test case up front.
> So when (or if) does the julian/gregorian switch take place and have you
> got any hints where I should "point my browser and surf to", or perhaps a
> slightly reliable source of information such as a book.
from man cal(1)
The Gregorian Reformation is assumed to have occurred in 1752 on the 3rd
of September. By this time, most countries had recognized the reforma-
tion (although a few did not recognize it until the early 1900's.) Ten
days following that date were eliminated by the reformation, so the cal-
endar for that month is a bit unusual.
>
> I've heard (I don't trust this source though!) that there maybe an ISO
> committee for this.
sure there is, their report will be ready on june 15th 2003. ;)
jmb
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199710271850.KAA14191>
