stuckyb / gcdl

6 stars 2 forks source link

dates interface #60

Closed stuckyb closed 2 years ago

stuckyb commented 2 years ago

We've recently discussed the interface for specifying dates and landed on the following:

The last day in a month or year can be specified by using N instead of an integer. For example: 1,10,N, 1:N, 20:N.

Ranges are inclusive of their endpoints unless the endpoint does not correspond with the step size increment.

If dates is provided, the other date parameters will be ignored.

Date grain is inferred from the specificity of dates or, for the YMD parameters, as follows:

stuckyb commented 2 years ago

This is fully implemented as described by f82dc11d1b225d01e and earlier commits. I am leaving this open for now because we need to update the documentation.

stuckyb commented 2 years ago

More changes after further discussion: replacing date_start and date_end with a single dates parameter and using : as the sequence operator. I've updated the initial comment accordingly.

stuckyb commented 2 years ago

The changes described in the previous comment are now fully implemented. One other enhancement I'd like to add before closing this is to make leading 0s in dates optional. E.g., either "2020-1" or "2020-01" would be acceptable. That would be a bit more user-friendly and make the dates number formatting consistent with months and days, where leading 0s are not required.

stuckyb commented 2 years ago

This is now complete with 8c2134323c181c0e42. I will close this issue and create a separate issue for user documentation.