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.
Release files for pdate_cli 0.3.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 | |
|---|---|---|---|
| pdate_cli-0.3.0.tar.gz | 3.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pdate_cli-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.6 kB
Release files / pdate_cli-0.3.0.tar.gz
| Download URL | pdate_cli-0.3.0.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
353aa843199832eb8dd90a8217f4205535025689c5df1be2d26135fffe90e774
|
|
BLAKE2b-256 checksum How to use checksums |
51fb2424a6c729d519cbaad92891bbfb6907f7098060f55e64b80aaf7402b524
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.12 Darwin/25.3.0
|
Release files / pdate_cli-0.3.0-py3-none-any.whl
| Download URL | pdate_cli-0.3.0-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eccb6b59e4d3c4016efb0d3da95bfdba730432c67b5616f653f0d3bc222464d4
|
|
BLAKE2b-256 checksum How to use checksums |
5da8657fc992828e1e6ae2b3ded3b2ace47e7ffb13ebb1a29fc93e486f2267fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.12 Darwin/25.3.0
|