-
Notifications
You must be signed in to change notification settings - Fork 508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add period and interval concepts #44
Comments
Not an explicit non-goal for Chrono but I wouldn't pursue that neither. One big reason is that while Chrono closely follows ISO 8601 and other existing practices whenever applicable, there is no particular concensus about the non-regular duration arithmetics (ISO 8601 is a representation standard and does not define, say, the result of 2015-08-24 plus 1 month---it only standardizes that "an interval from 2015-08-24 to 2015-08-24 plus 1 month" can be alternatively written as Implementing that makes Chrono highly opinionated and I don't think that really justifiable. Such arithmetics should go into a separate library depending on Chrono; I wouldn't object but I don't plan to write one. |
Isn't this in https://en.wikipedia.org/wiki/ISO_8601#Time_intervals? |
Yes it is. I think Intervals will probably be part of the larger iterator story in the upcoming refactor. This is also related to #245 |
This is a proposal to add period and interval concepts like those used in Joda Time
cf.
http://www.joda.org/joda-time/key_period.html
http://www.joda.org/joda-time/key_interval.html
Those are distinct from but interoperable with the existing duration type, and make it possible to describe operations like "add 1 year to this date" (this might be a different number of seconds depending on the date)
Is this something that you would consider for this library?
The text was updated successfully, but these errors were encountered: