Skip to main content

No project description provided

Project description


Build Status

A timestamp generator.


You can use pip to install from the repository

pip install tsenum

or download sources and run pip from this directory

git clone
pip install .

Usage (CLI)

Parameter description:

usage: tsenum [-h] [-u] -o OFFSET -c COUNT -s {week,day,hour,minute,second} -p

Timestamp enumerator Count timestamps with different step sizes. A reference
time is used to add/ subtract an offset to enumerate the timestamps. To format
the timestamp strftime formating style is used.

optional arguments:
  -h, --help            show this help message and exit
  -u, --utc             Current time is in UTC
  -o OFFSET, --offset OFFSET
                        Offset to enumerate from
  -c COUNT, --count COUNT
                        Count to enumerate
  -s {week,day,hour,minute,second}, --step {week,day,hour,minute,second}
                        Step width
  -p PATTERN, --pattern PATTERN
                        Date pattern to use (see Python's strftime in

Count 7 days back from yesterday.

tsenum --offset -1 --count -7 --step day --pattern "%Y-%m-%d: Hello world!"
2016-05-27: Hello world!
2016-05-28: Hello world!
2016-05-29: Hello world!
2016-05-30: Hello world!
2016-05-31: Hello world!
2016-06-01: Hello world!
2016-06-02: Hello world!

Count 3 weeks into future starting from now:

tsenum --offset 0 --count 3 --step day --pattern "Week %V"
Week 22
Week 22
Week 23

Usage as module

Count 7 days back from yesterday.

import tsenum
from datetime import datetime

tsenum.enumerate_times(, -1, -7, tsenum.STEP_DAY, '%Y-%m-%d')

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for tsenum, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size tsenum-1.0.1-py3.7.egg (8.1 kB) File type Egg Python version 3.7 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page