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


Groups > comp.lang.python > #106237

Re: Set type for datetime intervals

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Random832 <random832@fastmail.com>
Newsgroups comp.lang.python
Subject Re: Set type for datetime intervals
Date Fri, 01 Apr 2016 11:09:54 -0400
Lines 24
Message-ID <mailman.317.1459523397.28225.python-list@python.org> (permalink)
References <56FE0625.5030901@shopzeus.com>
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
Content-Transfer-Encoding quoted-printable
X-Trace news.uni-berlin.de gkQneoW7LXuxdg6kWHT/JgjUO6vht7JP/xWp72+VL3+w==
Return-Path <random832@fastmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.012
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'received:internal': 0.09; 'python': 0.10; '::=': 0.16; 'element2,': 0.16; 'message- id:@webmail.messagingengine.com': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:io': 0.16; 'received:messagingengine.com': 0.16; 'received:psf.io': 0.16; 'sense,': 0.16; 'subject:type': 0.16; 'wrote:': 0.16; 'element': 0.18; 'thoughts': 0.18; '(the': 0.22; 'sets': 0.23; 'this:': 0.23; 'implemented': 0.24; 'header:In-Reply-To:1': 0.24; 'compare': 0.27; 'fri,': 0.27; 'mathematical': 0.27; 'skip:( 20': 0.28; 'operations': 0.31; 'fixed': 0.31; 'maybe': 0.33; 'useful': 0.33; 'though.': 0.33; 'open': 0.33; 'handle': 0.34; 'could': 0.35; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'two': 0.37; 'difference': 0.38; 'received:66': 0.38; 'version': 0.38; 'rather': 0.39; 'to:addr:python.org': 0.40; 'hello,': 0.40; 'header:Message-Id:1': 0.61; 'skip:n 10': 0.62; 'nagy': 0.84; 'resolution,': 0.84; 'union,': 0.84; 'subject:Set': 0.91
DKIM-Signature v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=MSYLpzdvqdRM8xa2YplSwEr2s+s=; b=n70SnM +UMYxxq/2ucQCMAXUbiRong3AX2dwzQwXvcsnNpiva14D68D4xZbxInfOkSjC4P2 R/w0eHN54pPhl1agunTdkLe1UY1JXeJJ20nJfQM/9v8SCSVna8suZZa2AeWzBX7Z tTd3O2drf2jQ2hWJWHXrW4NQaEjUQmvP6Gulg=
DKIM-Signature v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=MSYLpzdvqdRM8xa 2YplSwEr2s+s=; b=HFsIPy6xO1jAeMvs6U5pBgOnHIbBx/okudwjANrOomSpC1G OiI5cEe/C+bKh+3v/k8irMuL4W4MYEewe8gTofzksPyiNWtfBG2w9yfPROZHI5Hj w4VWByaxG4b5rpLfB+n9TvZOQNXgvuGIEKbzscfKyVgcsR186mFIpNYtRi9A=
X-Sasl-Enc ScOUMiCk0Hc4KWA9EI6+AhqBsTEVDAPQEcrsz43iazjy 1459523394
X-Mailer MessagingEngine.com Webmail Interface - ajax-2373d6a1
In-Reply-To <56FE0625.5030901@shopzeus.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.21
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Xref csiph.com comp.lang.python:106237

Show key headers only | View raw


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


Thread

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

csiph-web