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.
The current
lower_
andupper_
methods returndate
objects, and are thus limited todate.min
anddate.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.