PDate
PDate make dates and times human-readable.
Install
pip install pdate_cli
Features
Quick check
$ pdate --now
1753307983
$ pdate --now --date
Wednesday, July 23, 2025 05:04:09 PM CDT
Convert: flexible input formats
# Most formats accepted, e.g. ISO-8601, RFC-2822, etc.
$ pdate 2024-11-25T20:10:46Z
Monday, November 25, 2024 02:10:46 PM CST
$ pdate 12 hours ago
Wednesday, July 23, 2025 12:07:13 AM CDT
Convert: choice of output format
$ pdate 2024-11-25T20:10:46Z --human
7 months ago
$ pdate 2024-11-25T20:10:46Z --precise
7 months, 26 days, 1 hour, 58 minutes and 24.89 seconds ago
$ pdate 2024-11-25T20:10:46Z --date --precise
Monday, November 25, 2024 02:10:46 PM CST
7 months, 26 days, 1 hour, 58 minutes and 46.01 seconds ago
Batch: read from stdin, sort, etc.
$ echo 100000000 | pdate
Saturday, March 03, 1973 03:46:40 AM CST
$ echo -e '2024-11-25T20:10:46Z\n2024-11-25T20:10:46Z\n100000000' | pdate --sort
Saturday, March 03, 1973 03:46:40 AM CST
Monday, November 25, 2024 02:10:46 PM CST
Monday, November 25, 2024 02:10:46 PM CST
Library usage
from pdate_cli.cli import parse
print(parse("10 minutes ago"))
Help pages
$ pdate --help
Usage: pdate [OPTIONS] [ARG]...
Parse ARG and format it as a local, human-readable date.
If ARG is missing
- If --now: print current date (default format: Unix timestamp)
- Else: read from stdin (default format: human-readable date)
Supported ARG formats
- Most date formats, e.g. ISO-8601, RFC-2822, etc.
- Unix timestamp
Timezone considerations
- For dates without timezone info, UTC is assumed
- For timestamps, local timezone is assumed
Options:
--now Print just current date.
--ts Format output as Unix timestamp.
--date Format output as human-readable date.
--human Format output as human-readable date.
--precise Format output as precise human-readable date.
--verbose Print debug information.
--sort Sort output by date. Implies --stdin.
--12 Use 12-hour format.
-h, --help Show this message and exit.
Metadata
Release files for pdate_cli 0.3.1
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 |
|---|---|---|---|---|
| pdate_cli-0.3.1.tar.gz | 3.9 kB | Without provenance | Details for pdate_cli-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pdate_cli-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for pdate_cli-0.3.1-py3-none-any.whl |
Total release size: 8.7 kB
Release files / pdate_cli-0.3.1.tar.gz
| Download URL | pdate_cli-0.3.1.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
852a530a683b6d324abbd713fc91e737055e1a8417a1e12901950c9cd03063ec
|
|
BLAKE2b-256 checksum How to use checksums |
4749b943eb0ddea0aa6ffad8c6632498740ae22d7df70e25001c6197ffffa3f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.12 Darwin/25.6.0
|
Release files / pdate_cli-0.3.1-py3-none-any.whl
| Download URL | pdate_cli-0.3.1-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
358e336ff3f02a6fc6d7d20aa94093f6ea21016dfaed5a087cae2c4013abc609
|
|
BLAKE2b-256 checksum How to use checksums |
a1e5d189ae3b9c0af48f831a2499bca30b28fad5c5f92a7b7f2668c7837027ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.12 Darwin/25.6.0
|
Security for pdate_cli 0.3.1
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.