Convert time deltas into phrases like “5 minutes ago”, “3 hours ago”, “2 days ago” etc.
This package has a number of modules in it, each for separate language. It is standard that module pytimeago.X has function X, which accepts at least on argument – number of seconds between two events. It may also accept extra keywords, which should be documented in the docstring of the function. Returned is always unicode string.
Usage pattern:
from pytimeago.english import english from time import time, sleep
a = time() # …do something here… delta = int(time() - a) # could use sometimedetal.total_seconds() print “job started %s” % english(delta)
Prints, e.g.
job started 15 minutes ago
Available languages are:
from pytimeago.english import english from pytimeago.english import english_short from pytimeago.french import french
Licenced under GNU Lesser General Public License, you can get a copy at: http://www.gnu.org/licenses/lgpl.html
Written by Adomas Paltanavicius (adomas.paltanavicius@gmail.com). Packaged, french added, and computation enhanced by Stephane “Twidi” Angel (s.angel@twidi.com)
Metadata
Release files for pytimeago 2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pytimeago-2.0.tar.gz | 4.1 kB | Without provenance | Details for pytimeago-2.0.tar.gz |
Release files / pytimeago-2.0.tar.gz
| Download URL | pytimeago-2.0.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0fbd901c165686db911886105bcdccb88c022a8ec8241e8fb4f0dc840dfe4313
|
|
BLAKE2b-256 checksum How to use checksums |
7f0e364065b68fd2fd6cbfacce6e8e56a0f2a5497e109cfe1938929d3c2ce2a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pytimeago 2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.