toki pona (English version below)
ilo ni li ilo pi tenpo pi toki pona. ona li pana e tenpo lon toki linja pi ilo sona. nasin ni li tan lipu Leti ni. nimi pi tenpo mun ale li tan lipu Leti ni. ona li kepeken toki ilo Nim.
kin la, tenpo pini la, mi pali e ilo sama lon toki ilo GForth. ilo ni li tan ona kin.
wile:
pali e ilo: ./build.sh
pali en alasa pona: ./test.sh
pona ilo li lukin sama ni:
PASS: tests/tenpolib/tCreateValidTenpo.nim C ( 0.67 sec)
PASS: tests/tenpolib/tDaysInMonth.nim C ( 0.67 sec)
PASS: tests/tenpolib/tDaysInYear.nim C ( 0.67 sec)
...
taso, ona li suli.
$ ./build/tenpo
tenpo sike 20
tenpo mun Pipi
$ ./build/tenpo -so 140.5
20/Pipi/3
$ ./build/tenpo -h
tenpo pi toki pona
Outputs the current date and/or time in toki pona
Usage:
tenpo [options] [<longitude>]
Options:
-h --help this helptext
-v --version version info
-s include day number
-o one-line output
ilo tenpo ante pi toki pona li pana e tenpo ante. taso, tenpo open pi ilo ni li ante: 2001/03/25 01:21:37 UTC+0. lipu ni li jo e sona mute.
English (nasin pi toki pona li sewi ni)
A terminal-based calendar, based on the toki pona luni-solar calendar found in this reddit thread, with month names from this other reddit thread. Written in Nim.
Based also on my previous attempt in GForth.
Requirements:
Build: ./build.sh
Build with tests and immediately run them: ./test.sh
Expected output:
PASS: tests/tenpolib/tCreateValidTenpo.nim C ( 0.67 sec)
PASS: tests/tenpolib/tDaysInMonth.nim C ( 0.67 sec)
PASS: tests/tenpolib/tDaysInYear.nim C ( 0.67 sec)
...
etc.
$ ./build/tenpo
tenpo sike 20
tenpo mun Pipi
$ ./build/tenpo -so 140.5
20/Pipi/3
$ ./build/tenpo -h
tenpo pi toki pona
Outputs the current date and/or time in toki pona
Usage:
tenpo [options] [<longitude>]
Options:
-h --help this helptext
-v --version version info
-s include day number
-o one-line output
If you're comparing to other toki pona calendar tools, note that this one uses a different dateline and slightly different origin time: 2001/03/25 01:21:37 UTC+0. More details in the wiki.