-
Notifications
You must be signed in to change notification settings - Fork 594
Description
A Period data structure is similar to a Duration, except that it has a specific start date. For example, one might have a period of 21 days, starting from January 1, 2020, which would have a start date/time of 2020-01-01 00:00:00 and an end date/time of 2020-01-22 00:00:00. (Obviously, these don't have timezones/offsets, so they are more likely to be NaivePeriod objects.
I am working on an implementation for this in a branch of chrono. The reason I am thinking this might be useful within the chrono library itself is that, given a NaivePeriod object, we can then determine if there is overlap with another NaivePeriod, or whether it contains a NaiveDateTime. I personally am working on a scheduling app, and thus this is a useful use case for me. That said, I'm not sure it belongs within the chrono library - perhaps a separate, add-on library would be more useful.
Thanks for your feedback!