ixc / python-edtf

MIT License
52 stars 19 forks source link

Return a numerical value based on years for sorting #5

Closed cogat closed 4 years ago

cogat commented 7 years ago

The current lower_ and upper_ methods return date objects, and are thus limited to date.min and date.max. This is limiting when it comes to long years, and means that all dates before 0 sort at the same amount.

It's probably better to define a method to return an integer form of EDTF lower and upper bounds to use for sorting.

Where only year is available, return a (long) integer. Where month and day are available, return a float according to the fraction of the year.

jmurty commented 4 years ago

The underlying issue – lack of support for far past or future dates – was solved in #26