Skip to content

zdryan/nanomath

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nanomath

dead simple timestamp arithmetic 🕙

CircleCI License: Unlicense

# 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 and Y.
  • Timezone designators (according to the following TZ identifiers) are supported, albeit with minimal testing.

Download

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

Install (cmake)

git clone https://github.com/zdryan/nanomath
cd nanomath
cmake --install . --config Release