Comments (3)
This is probably intentional. '199X' is a single year in the 1990s, but it's not specified which one. This is semantically different from the decade which covers all the years of the 90s.
This library was written when EDTF was still a draft -- there were some changes to the syntax when it was adopted by ISO. I've updated the grammar since then, but only in edtf.js so far. I haven't had the time to update the Ruby library with the new grammar, but we had a PR for version 3.1 to align with some of the changes (including the X unspecified symbol). This is what caused the change.
At some point I'd like to update Ruby version using the grammar and API I use in edtf.js. There '199X' gives you an unspecified year (with a min/max range of 1990 to 1999). To get the decade you'd have to use the unfortunate (in my opinion) three-letter syntax '199' or the interval '1990/1999' which is probably more intuitive.
from edtf-ruby.
@inukshuk Thanks for your thoughtful reply. If I read the standard correctly as represented on the LoC page, what we want for our use case is probably the "set representation" [1990..1999]
. Confusion seems to arise in the distinctions between the "levels" of support. In Level 1, 199X
is possibly the closest you can get to the Level 2 "set representation", and it sounds like edtf.js could more or less give us that as you mention. I might try using the js lib in our Ruby code as a test.
from edtf-ruby.
Good point, the set representation is also a possibility. The difference between that and the interval syntax, I believe is that with the set you explicitly state that you mean those individual years, not the entire decade.
The way it's implemented in edtf.js they would be almost the same though. The idea is that each extended date can be mapped to an exact time range and also enumerated. For example, 1990/1999
will cover (in comparisons) the full range from 00:00 on 1990-01-01 to 24:00 1999-12-31 UTC. But since both ends have year precision, if you enumerate the interval, you will get a list of the individual years. Of course this is a tricky with mixed precisions, e.g. 1990/199-04
makes sense for comparisons, but when enumerating the current implementation would give you all the years and then also the month of April '99.
from edtf-ruby.
Related Issues (20)
- API support for multiple dates and one of a set
- L2 partial uncertain/approximate parsing
- RBX / Jruby compatibility HOT 3
- compatibility with ActiveSupport 4 HOT 2
- Fix Ruby warnings
- Typo on docs HOT 1
- Invalid zone offsets added when none given HOT 6
- Parsing sets introduces illegal spaces
- Incorrect parsing of unknown date HOT 5
- Implement parse and equality for intervals with open begin dates. HOT 7
- Reordering reversed intervals or do not accept them as valid intervals. HOT 2
- Formatting of dates with negative years is incompatible with the parser. HOT 2
- Interval comparisons
- unspecified masking for BCE years fails HOT 1
- Precision of date in set, when attribute later is true HOT 2
- Error in interval with unknown end date
- Impossible to use unspecified digits in intervals
- Support open ended time interval HOT 1
- Can't parse season intervals or the combination 'u?' HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from edtf-ruby.