Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #106237 > unrolled thread

Re: Set type for datetime intervals

Started byRandom832 <random832@fastmail.com>
First post2016-04-01 11:09 -0400
Last post2016-04-01 11:09 -0400
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Set type for datetime intervals Random832 <random832@fastmail.com> - 2016-04-01 11:09 -0400

#106237 — Re: Set type for datetime intervals

FromRandom832 <random832@fastmail.com>
Date2016-04-01 11:09 -0400
SubjectRe: Set type for datetime intervals
Message-ID<mailman.317.1459523397.28225.python-list@python.org>
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?

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web