BSD Ports

time/py-pytimeparse 1.1.8nb1 NetBSD

Time expression parser

System
NetBSD
Repository
pkgsrc
Maintainer
[email protected]
Last update
Commit
3138de8156
License
mit
Categories
time, python
Package size
14.8 KiB, 106.7 KiB installed

Description

A small Python library to parse various kinds of time expressions, inspired by a StackOverflow question.

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
1w 3d 2h 32m
1 w 3 d 2 h 32 m
...

In the other systems

SystemPortVersion
NetBSDtime/py-pytimeparse1.1.8nb1
DragonFlydevel/py-pytimeparse1.1.8_1

Install

Binary package:

pkgin install py311-pytimeparse

From pkgsrc:

cd /usr/pkgsrc/time/py-pytimeparse && make install clean

Dependencies

Run dependencies 1

Configuration

No options to configure.

Service scripts
none
Flavors
py312-pytimeparse-1.1.8nb1, py313-pytimeparse-1.1.8nb1, py314-pytimeparse-1.1.8nb1

Commit history 2

DateCommitCreditsLog message
3138de8156 adam py-pytimeparse: updated to 1.1.10
1.1.10 Handle multiline input during sign parsing Sum fractional units exactly so whole-second results are not truncated add type hints to make "mypy" happy about "import pytimeparse" Useless shebangs
4a5e9a135d adam py-pytimeparse: updated to 1.1.9
1.1.9 Py3 only slurm day clock remove pipe character from sign regex remove codecs.open guard against malformed floats and fix interpret-as-minutes bug