Live data from Hacker News

Dates That Don't Exist (2015)

blog.yossarian.net

11–20 of 90 posts

Re: Dates That Don't Exist (2015)

#11
post #5
post #4

I suppose the Georgian calendar includes this gap officially? Or did the catholic world just jump from system to system? If it includes the gap officially, then yea, error is the right thing. But if we just moved to a new calendar, then arguably there should be no error. both calendars work for all dates continuously, and we could have conversion functions etc. The gap is just a big flag day (week.) imo, if i am usin…

The proper name for the calendar using the Gregorian system before the start of the Gregorian calendar is "the proleptic Gregorian calendar".

And indeed that's Python's calendar:

'A date object represents a date (year, month and day) in an idealized calendar, the current Gregorian calendar indefinitely extended in both directions.'

'This matches the definition of the “proleptic Gregorian” calendar in Dershowitz and Reingold’s book Calendrical Calculations.'

https://docs.python.org/3/library/datetime.html#id2 https://docs.python.org/3/library/datetime.html#id5

Whereas Ruby has proleptic Gregorian Time, but civic DateTime:

https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/DateTime....

Re: Dates That Don't Exist (2015)

#12
> The Eastern Orthodox church even continued well after that, only switching to the Gregorian calendar in 1929.

Technically, they switched to the Revised Julian[0] calendar, not the Gregorian. Also, it was only some of the churches making up Eastern Orthodoxy that switched; others remain on the Julian calendar to this day, and all of them still use the Julian calendar to calculate the date of Pascha.

[0] https://en.wikipedia.org/wiki/Revised_Julian_calendar

Re: Dates That Don't Exist (2015)

#13
post #7
post #4

I suppose the Georgian calendar includes this gap officially? Or did the catholic world just jump from system to system? If it includes the gap officially, then yea, error is the right thing. But if we just moved to a new calendar, then arguably there should be no error. both calendars work for all dates continuously, and we could have conversion functions etc. The gap is just a big flag day (week.) imo, if i am usin…

Contracts and other similar types of financial instruments existed by this time there must be some way they handled it because something that said that it happened on a date that never occurred - sounds like what lawyers live for. I’ll draft a Dubia so that when future popes change the calendar they will include a representative code sample and details about how we handle this. (It’s important to remember that the po…

If a contract dated to the 4th October 1582 specifies you have 15 days to make payment, you would indeed need to know where that contract was signed to determine on what day that deadline expired.

And if there is a contract dated to the 6th October 1582, that does raise questions about its legitimacy (though in general misdating a contract does not void it, it would merely be one point of evidence in your argument that it's a forgery, just like using a particular font in a modern printed contract)

Re: Dates That Don't Exist (2015)

#14
I ran into this in a Ruby on Rails test suite a few years ago and wrote up my findings here: https://gist.github.com/abachman/f97806e1c0fe8e4e1849e5f8412...

tl;dr - ActiveSupport::TimeWithZone used absolute seconds counting to determine dates while DateTime used a proper Gregorian calendar. This means dates before October 15, 1582 have different internal values when compared.

The behavior showed up because a test was using a DateTime value to set a MySQL DATETIME column to the DB minimum value, which is 1000-01-01 00:00:00, and then comparing the DB record attribute to the original variable used to set it.

Something like:

  date = DateTime.new(1000, 1, 1, 0, 0, 0, 'UTC')
  record.update(happened_at: date)
  record.happened_at == date # => false
I "discovered" the missing Gregorian dates when I wrote a loop counting forward in time from Jan 1, 1000 until the corresponding TimeWithZone and DateTime records returned true when compared with ==.

Re: Dates That Don't Exist (2015)

#15
Regarding computers and time, I always liked that in AmigaDOS, you could specify custom relative times.

It would natively display "Future" if the file timestamp was ahead of the system clock, but you could also add dates. I remember seeing directory listings like

  xyzzy.foo 49152 ----rw-d Christmas 1988

Re: Dates That Don't Exist (2015)

#16
The article is a bit old. It should have noted a new development in calendar technology if it was written half a year later.

> In A.D. 1582 Pope Gregory XIII found that the existing Julian calendar insufficiently represented reality, and changed the rules about calculating leap years to account for this. Similarly, in A.D. 2013 Rockchip hardware engineers found that the new Gregorian calendar still contained flaws, and that the month of November should be counted up to 31 days instead.

https://lwn.net/Articles/669022/

Re: Dates That Don't Exist (2015)

#18

> The Eastern Orthodox church even continued well after that, only switching to the Gregorian calendar in 1929. Technically, they switched to the Revised Julian[0] calendar, not the Gregorian. Also, it was only some of the churches making up Eastern Orthodoxy that switched; others remain on the Julian calendar to this day, and all of them still use the Julian calendar to calculate the date of Pascha. [0] https://en.w…

A primary reason for the Catholic Church changing the calendar was to bring the date of Easter back into conformance with the decree of the Council of Nicaea on the topic. There was a controversy in the early Church on this, there were even miracles worked concerning the correct date -- see Dom Gueranger's "Liturgical Year" for some of the accounts.

Re: Dates That Don't Exist (2015)

#19

> The Eastern Orthodox church even continued well after that, only switching to the Gregorian calendar in 1929. Technically, they switched to the Revised Julian[0] calendar, not the Gregorian. Also, it was only some of the churches making up Eastern Orthodoxy that switched; others remain on the Julian calendar to this day, and all of them still use the Julian calendar to calculate the date of Pascha. [0] https://en.w…

Fun related fact, many dates -- for example, birth dates on headstones -- of people born in countries observing Eastern Orthodox Christianity will have the prefix O.S. (old style) to disambiguate dates using the original Julian and either the Georgian or Revised Julian calendars which were in effect at that person's death.

Re: Dates That Don't Exist (2015)

#20
Dates really are a headache.

In our Dip (in house db) client library, we built what we called a policy that auto selects partitions based on every crud operations. The policies can be specified once for each collection in collections.json based on fields or query.

So for policies where partition involves the date type fields, be it range or fixed dates, it was incredibly hard to generate universal date names from ranges.

The policy mechanism was finished fairly quickly as Dip is inherently distributed first. But reasoning about date names was so incredibly hard.

The missing dates mentioned in the article did come up during development adding to the woes.

But the upside now is that application code no longer worries about the distributed partitions. Policy handles that. Some sort of architecture as code. Don't know whether AAC is an existing term or whether we coined it.

Post reply on HN