[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-list
Subject:    Re: Standard class for time *period*?
From:       Cameron Simpson <cs () cskk ! id ! au>
Date:       2023-03-30 0:13:09
Message-ID: ZCTUFWpH42y35t3h () cskk ! homeip ! net
[Download RAW message or body]

On 30Mar2023 10:13, Cameron Simpson <cs@cskk.id.au> wrote:
> I do in fact have a `TimePartition` in my timeseries module; it 
> presently doesn't do comparisons because I'm not comparing them - I'm 
> just using them as slices into the timeseries data on the whole.
> 
> https://github.com/cameron-simpson/css/blob/0ade6d191833b87cab8826d7ecaee4d114992c45/lib/python/cs/timeseries.py#L2163
> 

On review it isn't a great match for a simple time range; it's aimed at 
expressing the time ranges into which my time series data files are 
broken up.

I think most of the code using this particular class just starts with a 
`start_unixtime` and `end_unixtime` and indexes whichever timeseries 
it's using, and these come into play internally to access the relevant 
files. There are a bunch of methods to take a pair of start/stop 
unixtimes and return time slot indices etc.

So even I don't have a purely time period class, right now anyway; 
passing around a pair of floats is so simple that I probably haven't 
elaborated on it. Just made ways to make that pair from what I'm given.

Cheers,
Cameron Simpson <cs@cskk.id.au>
-- 
https://mail.python.org/mailman/listinfo/python-list


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic