Skip to content

One of a set only works with full year #79

Closed

Description

@rettinghaus

Trying to parse a set with a range of values doesn't work when the dates are not just years, e.g.:

  • [1774-11..1774-12]
  • [1785-07-30..1785-08-06]

From my understanding these sets are valid and should be parsed as such.

Activity

  1. timjmansfield commented on Jun 19, 2025

    @timjmansfield
    Member

    I think you're right @rettinghaus

    That's the way I read the Set representation section in Level 2 of the standard

    1. Double-dots indicates all the values between the two values it separates, inclusive.
    2. Double-dot at the beginning or end of the list means "on or before" or "on or after" respectively.
    3. Elements immediately preceeding and/or following as well as the elements represented by a double-dot, all have the same precision. Otherwise, different elements may have different precisions
  2. rettinghaus commented on Jul 13, 2025

    @rettinghaus
    ContributorAuthor

    Interistingly it works for Consecutives with only one boundary:

    >>> edtf.parse_edtf("[2011-08..]")
    OneOfASet: '[2011-08..]'
    >>> edtf.parse_edtf("[1999-12-12..]")
    OneOfASet: '[1999-12-12..]'
    >>> edtf.parse_edtf("[..1908-03]")
    OneOfASet: '[..1908-03]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions