Pretty Timedelta. Convert your timedelta objects to pretty strings and vice versa.
Project description
ptimedelta
Convert time periods represented by strings to timedelta objects and vice versa.
Features
- Supports Python2.7, Python3+.
Warning
Project under a development.
Installation
$ pip install ptimedelta
Examples
>>> import ptimedelta as ptd
>>> ptd.to_timedelta("12m34s")
datetime.timedelta(seconds=754)
>>> ptd.to_seconds("3h23m4s", as_int=True)
12184
>>> ptd.to_seconds("3.96ms")
0.00396
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ptimedelta-0.1.2.tar.gz
(3.2 kB
view hashes)
Built Distribution
Close
Hashes for ptimedelta-0.1.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8de5617845dcc1228de9c4b887a048a170f8968804d924900269d51fa36e93c |
|
MD5 | a328f63cde6a75d46eb1c8787c581a5d |
|
BLAKE2b-256 | a37242aef52731aaac69189a2d74dcf22be80c919c279761fc8beb4a34dd10ff |