ixc / python-edtf

MIT License
52 stars 19 forks source link

python-edtf module doesn't follow the latest draft revision of the EDTF spec #24

Closed apeters closed 3 weeks ago

apeters commented 6 years ago

The latest spec can be found here: http://www.loc.gov/standards/datetime/ISO_DIS%208601-2.pdf

Here are some differences I've noticed between the current implementation and the latest spec. (this list may not be complete):

  1. use of % to mean both uncertain and approximate (see 4.2 Uncertain and/or approximate date)
  2. use of capital X instead of lowercase u for unspecified digits (see 4.3 Unspecified)
  3. use of a blank instead of the keyword unknown (see 4.4 Enhanced time interval)
  4. use of .. instead of the keyword open (see 4.4 Enhanced time interval)
  5. use of a capital Y instead of a lowercase y (see 4.5 Year exceeding four digits)
  6. use of uppercase S instead of lowercase p to express significance (see 4.6 Significant digits)
  7. there's also a whole section on recurring dates that may or may not be applicable (see 5 Repeat rules for recurring time intervals)
koenedaele commented 6 years ago

Think the problem is that the version you're poiting to isn't final yet. They explicitly state that anything is still up for discussion in theory. Although in practice it should be relatively stable. See https://github.com/plk/biblatex/issues/656 for a good comparison of the two specs and a lot of background on EDTF.

apeters commented 6 years ago

@koenedaele You're right. The the link spec is still in draft form, but this library is based on an even older pre-submission from January 2012. There are a few changes that I think are quite important, especially eliminating the use of the English keywords unknown and open. I personally think this ticket is still valid and it would be nice to see this module track the changes in the latest draft revision.

koenedaele commented 6 years ago

True. I've been trying to follow the EDTF spec for a while now. It was never really clear to me when and if the new version was going to land and how much change it would still go through. For a long time the new draft was not even available (or rather hard to get). I think that most of the current implementations in Python and JS have gone with the 2012 version because at least that one was easy to find and stable.

For me the ideal scenario would be that the ISO version gets approved, all libraries switch to that format and we create a huge ecosystem where a whole lot of issues with historical dates are now finally solveable or at least uniformly describeable (very much agree that it's better to eliminate English keywords).

Not sure what the developers of this library plan to do?

ahankinson commented 6 years ago

+1 It would be great if this library could be updated to the latest draft, at least.

apeters commented 6 years ago

Sadly, the proposed standard "1SO DIS 8601" has been pulled at the request of the ISO. Not sure what's going on now. Quite frustrating...

https://www.loc.gov/standards/datetime/ https://www.loc.gov/standards/datetime/ISO_DIS%208601-2.pdf

koenedaele commented 6 years ago

Anyone know who to contact to find out what they're thinking?

ahankinson commented 6 years ago

You can find it on archive.org:

https://web.archive.org/web/20170926052706/https://www.loc.gov/standards/datetime/ISO_DIS%208601-2.pdf

apeters commented 5 years ago

It looks like a new spec has been published. https://www.loc.gov/standards/datetime/edtf.html It would be nice to see this library updated to reflect the changes from the earlier draft.

aweakley commented 3 weeks ago

This is resolved by #56