Template talk:Gregorian serial date

From Wikipedia, the free encyclopedia

[edit] Bug?

Something's odd with this. The most popular way to count days of the common era is day 1 = 0001-01-01.

{{ Gregorian serial date | year=1 | month=1 | day=1 }} gives 1

The only alternative I've ever heard of is to count days since 0001-01-01, therefore I expect to get 1 or 0 for this date, not -1. -- Omniplex 08:17, 21 June 2006 (UTC)

I'm checking this against The Calendar Converter, It seems that todays serial is correct, but it's having trouble with 1/1/01. Proably something to do with leapyears.

Found the bug, It always subtracts a day to deal with February having less than 30 days. No exception was written if we haven't reached February yet this year.--God Ω War 16:40, 21 June 2006 (UTC)

Checking today
{{ Gregorian serial date | year=2007 | month=04 | day=08 }} gives 732774
With REXX I get one less, that's fine, it counts days since 0001-01-01. -- Omniplex 21:00, 21 June 2006 (UTC)

[edit] Test

{{ Gregorian serial date | year=0 | month=3 | day=1 }} gives -304_ERROR - Can not handle dates before January 1, 1 A.D.
{{ Gregorian serial date | year=0 | month=1 | day=1 }} gives -364_ERROR - Can not handle dates before January 1, 1 A.D.

Testing if we get away with < 0 or really need < 1. -- Omniplex 22:21, 21 June 2006 (UTC) Nope, really wrong for March 1, 1 BC (= year 0). -- Omniplex 22:24, 21 June 2006 (UTC)

This is why I put in the error message. Year 0 does not exist, that would be a B.C date which needs extra coding to handle.--God Ω War 23:53, 21 June 2006 (UTC)

Year 0 as we count it today is simply 1 BC, it certainly "exists" in a proleptic Gregorian calendar, like 199 AD exists (also proleptic). Apparently they tuned it to be in sync with Julian from 0200-03-01 up to 0300-02-28. If you have a clue why they didn't calibrate it for year 1 please add it somewhere to the articles, it's puzzling. Why the third century instead of the first? -- Omniplex 01:57, 22 June 2006 (UTC)