Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: What about my last date functions? there are some error? Date: Tue, 08 Nov 2016 12:11:58 -0800 Organization: None to speak of Lines: 28 Message-ID: References: <87d1i69r5w.fsf@bsb.me.uk> <871sym9dpv.fsf@bsb.me.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="e43f89eff67778d2e2548cd041b513fe"; logging-data="31840"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+KBQZHWJKjv4tait+6AtoD" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:2+0zHTxesIrmwGNI3A4Xhz5gFWY= sha1:D7rprzc6tUwYNA1YwDddFnY0w9E= Xref: csiph.com comp.lang.c:96128 jadill33@gmail.com writes: [...] > I'm curious, if you don't mind, what's your use-case on calculating a > Julian date when the Gregorian calendar is primarily what we use these > days? Confusingly, the word "Julian" is used for two different purposes in calendar discussions. The Julian calendar was the one that was replaced by the Gregorian calendar starting in 1582. The Julian calendar has a leap year every 4 years. The Gregorian calendar uses a formula that gives us 97 leap years in every 400 years, which is a much better (but still imperfect) approximation to reality. A Julian Day Number (JDN) is the whole number of days since noon, Jan 1, 4713 BCE. A Julian date is the same thing, but with an added fractional part. They're commonly used in astronomy, because they make calculations simpler (no leap years, no variable number of days per month). It plays a similar role to the Unix epoch time, the number of seconds since 1970-01-01 00:00:00 UTC, a representation optimized for ease of calculation rather than for human readability. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"