This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author belopolsky
Recipients barry, belopolsky, p-ganssle, tim.peters, vstinner
Date 2018-01-09.19:09:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1515524967.1.0.467229070634.issue32522@psf.upfronthosting.co.za>
In-reply-to
Content
The problem that I have with the round/truncate proposal is that it is not general enough.  Days, hours, minutes etc. are just arbitrary intervals that became popular for obscure historical and astronomical reasons.  In practice, you are as likely to encounter 1 second timeseries as say 10 second timeseries.  Hourly timeseries are as likely to use the "top of the hour" (0 minutes) as they are to use the "bottom of the hour" (30 minutes).  In general, you want to have a kind of "snap to grid" functionality on the time axis where "the grid" is an arbitrary RRULE.

Looking at the dateutil, I don't see a truncate to rrule function.  Maybe a good starting point would be to implement that in dateutil and if some simpler pattern emerges that can be proposed for stdlib, we can discuss it then.
History
Date User Action Args
2018-01-09 19:09:27belopolskysetrecipients: + belopolsky, tim.peters, barry, vstinner, p-ganssle
2018-01-09 19:09:27belopolskysetmessageid: <1515524967.1.0.467229070634.issue32522@psf.upfronthosting.co.za>
2018-01-09 19:09:27belopolskylinkissue32522 messages
2018-01-09 19:09:27belopolskycreate