Skip to content

Impossible to use unspecified digits in intervals  #31

Description

I found out empirically that you have to use 'x' for unspecified digits so that the date is typed as a century, and 'u' so that it is accepted in an interval: you can't do both at the same time.
So you can't say "from the 19th century to the 20th century."

> Date.edtf('19uu').class
=> Date
> Date.edtf('19xx').class
=> EDTF::Century
> Date.edtf('19xx/2000').class
=> NilClass
> Date.edtf!('19xx/2000').class
ArgumentError (failed to parse date: unexpected '/' at [#<EDTF::Century:0x00005580cf514c80 @year=1900>])
> Date.edtf('19uu/2000').class
=> EDTF::Interval
> Date.edtf('19uu/2000').from.class
=> Date

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions