devel/py-pytimeparse 1.1.8_1 DragonFly
Small Python module to parse various kinds of time expressions
- System
- DragonFly
- Repository
- DPorts
- Maintainer
- [email protected] (as in FreeBSD)
- License
- MIT
- Categories
- devel, python
- Package size
- 13.9 KiB, 106.9 KiB installed
Description
The single function pytimeparse.timeparse.timeparse, defined in the library, (also available as pytimeparse.parse) parses time expressions like the following:
32m 2h32m 3d2h32m 1w3d2h32m
...
It returns the time as a number of seconds (an integer value if possible, otherwise a floating-point number):
>>> from pytimeparse import parse >>> parse('1.2 minutes') 72
In the other systems
| System | Port | Version |
|---|---|---|
| DragonFly | devel/py-pytimeparse | 1.1.8_1 |
| FreeBSD | devel/py-pytimeparse | 1.1.8_1 |
| NetBSD | time/py-pytimeparse | 1.1.8nb1 |
Install
Binary package:
pkg install py311-pytimeparse
From DPorts:
cd /usr/dports/devel/py-pytimeparse && make install clean