dead simple timestamp arithmetic 🕙
# ISO 8601 (default)
nanomath '2004-11-23T12:30:00 Australia/Sydney + 4Y - 10D - (12h + 30m)' # 2008-11-11T13:00:00Z
# or with given unit
nanomath --format ns '2004-11-23T12:30:00Z + 4Y - 10D - (12h + 30m)' # 1226448000000000000ns
# or even...
nanomath --format m '2008-11-12T00:00:00Z - 2004-11-23T12:30:00Z' # 2087250m
- Supports
ns
,us
,ms
,s
,m
,h
,D
,W
,M
andY
. - Timezone designators (according to the following TZ identifiers) are supported, albeit with minimal testing.
wget https://github.com/zdryan/nanomath/releases/download/v2024.02.03/nanomath-v2024.02.03-linux.tar.bz2
tar -C $HOME/.local/bin -xf nanomath-v2024.02.03-linux.tar.bz2 --strip-components=1
git clone https://github.com/zdryan/nanomath
cd nanomath
cmake --install . --config Release