Giter Club home page Giter Club logo

Comments (3)

inukshuk avatar inukshuk commented on June 9, 2024 1

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.

dchandekstark avatar dchandekstark commented on June 9, 2024

@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.

inukshuk avatar inukshuk commented on June 9, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.