Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #106237
| From | Random832 <random832@fastmail.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Set type for datetime intervals |
| Date | 2016-04-01 11:09 -0400 |
| Message-ID | <mailman.317.1459523397.28225.python-list@python.org> (permalink) |
| References | <56FE0625.5030901@shopzeus.com> |
On Fri, Apr 1, 2016, at 01:24, Nagy László Zsolt wrote:
>
> Hello,
>
> I need to compare sets of datetime intervals, and make set operations on
> them: intersect, union, difference etc. One element of a set would be an
> interval like this:
Two thoughts on this: Such an object is not precisely a set* of
datetimes, rather it is a set of nonintersecting intervals. It could
also be useful to have one for numbers (the datetime version could even
maybe be implemented in terms of it)
*in the python sense. in the mathematical sense, it is a set with
infinite* cardinality
**well, datetimes have a fixed resolution, so it's not _really_
infinite. Numbers don't, though.
> element ::= (start_point_in_time, end_point_in_time)
> intervalset ::= { element1, element2, .... }
Are these open intervals or closed intervals?
Also, how are you going to handle daylight savings?
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Set type for datetime intervals Random832 <random832@fastmail.com> - 2016-04-01 11:09 -0400
csiph-web