dateq
Meant to replace and collect all my dozens of tiny date scripts that do custom, little things
A command line date/time processor (pronounced, like jq; date-q)
Installation
Requires python3.10+
To install with pip, run:
pip install git+https://github.com/purarue/dateq
Usage
Usage: dateq parse [OPTIONS] DATE...
Pass dates as arguments, or - to parse from STDIN
Options:
--force-tz TZ timezone to use for naive dates (parsed dates without a timezone)
--utc convert to UTC
-L, --localize localize time to your current timezone
-F, --format
[date | date_ | day |
day_of_year | epoch | epoch_milliseconds |
human | month | python_strftime_string |
time | usdate | week_of_year |
weekday | weekday_name | year]
format for date string
--strict / --no-strict raise an error if the date string could not be parsed [default: strict]
--dateparser-settings JSON a json settings object to be used by the dateparser library
-h, --help Show this message and exit.
Examples
$ dateq parse now
2025-03-20T01:31:11.093906
$ dateq parse -Fepoch '3 hours ago'
1742448701
$ dateq parse -Ftime 'in 3 hours'
04:32:02
$ dateq parse -F'%H:%M' 'in 3 hours'
04:32
$ dateq parse -Fhuman '2025-03-20T01:31:11'
a minute ago
$ echo '1742459605' | dateq parse -
2025-03-20T01:33:25
$ dateq parse 'saturday at 3pm'
2025-03-15T15:00:00
$ dateq parse --dateparser-settings '{"PREFER_DATES_FROM": "future"}' 'saturday at 3pm'
2025-03-22T15:00:00
Tests
git clone 'https://github.com/purarue/dateq'
cd ./dateq
pip install '.[testing]'
flake8 ./dateq
mypy ./dateq
Metadata
Release files for dateq 0.1.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 | |
|---|---|---|---|
| dateq-0.1.1.tar.gz | 7.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dateq-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.1 kB
Release files / dateq-0.1.1.tar.gz
| Download URL | dateq-0.1.1.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0a8bd073048a6621c8c571512321333e780379136a0c3aa8abecd4b646e6c4f5
|
|
BLAKE2b-256 checksum How to use checksums |
81a6f540dff18cf4ddf1ccffa066642a48a9222508928cd88afbcc5bac72f74e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.11
|
Release files / dateq-0.1.1-py3-none-any.whl
| Download URL | dateq-0.1.1-py3-none-any.whl |
|---|---|
| Size | 8.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
daffa8244099566dccedeb55efa5ef801f797e50e3c6148cfb063f180e18c35c
|
|
BLAKE2b-256 checksum How to use checksums |
f6ac7c331a874aebae73cb2135f6422f269355f5868876a863bd2d743b2fe0df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.11
|