No description
Find a file
2020-04-22 20:53:57 -04:00
.github/workflows Add matrix testing 2020-04-22 20:53:57 -04:00
src Upgrade to work with nimble and nim 1.2.0 2020-04-22 17:52:50 -04:00
tests Upgrade to work with nimble and nim 1.2.0 2020-04-22 17:52:50 -04:00
.gitignore initial impl 2014-10-19 20:38:54 -04:00
eternity.nimble Release 0.3.0 2020-04-22 18:01:34 -04:00
LICENSE Upgrade to work with nimble and nim 1.2.0 2020-04-22 17:52:50 -04:00
README.md Add nimble example 2020-04-22 19:21:55 -04:00

nim-eternity

CI badge

Library to convert delta times into a human or bot readable formats.

This is a new version that is compatibile with nimble and nim 1.2.0.

Find the latest version on nimble

nimble search eternity --ver

Usage

import eternity as e

echo e.humanize(3600.0)          # 1h
echo e.humanize_trunc(3600.0)    # 1h
echo e.robotize(3600.0)          # 1h 0m 0s 0ms

echo e.humanize(36.125)          # 36s 125ms
echo e.humanize_trunc(36.125)    # 36s
echo e.robotize(36.125)          # 0h 0m 36s 125ms

echo e.humanize(60.002)          # 1m 2ms
echo e.humanize_trunc(60.002)    # 1m
echo e.robotize(60.002)          # 0h 1m 0s 2ms