DateTimeRange is a Python library to handle a time range.
copied from cf-post-staging / datetimerangeCheck whether a time is within the time range, get the intersection of time ranges, truncating a time range, iterate through a time range, and so forth.