Commit graph

9 commits

Author SHA1 Message Date
Ori Bernstein bf7e0791e1 seconds: remove junk from usage 2021-01-17 11:12:18 -08:00
Ori Bernstein e0278f6917 seconds: tolerate trailing whitespace in dates
This allows handling dates with leading and trailing whitespace,
including newlines.
2020-09-01 19:03:17 -07:00
Ori Bernstein c834f535b7 seconds: use new libc date api 2020-08-10 19:02:09 -07:00
cinap_lenrek febe84af75 libc: revert date change again. this is getting ridicuoulus.
this breaks the sample from the seconds manpage, and overall
produces funky results. this needs alot more testing.

term% seconds '23 may 2011'
seconds: tmparse: invalid date 23 may 2011 near 'may 2011'

term% seconds '2019-01-01 00:00:00'
-118370073600
2020-06-15 00:12:57 +02:00
Ori Bernstein 8b3efcfc4e libc, seconds: new time and date apis (try 2)
Redo date handling in libc almost entirely. This allows
handling dates and times from outside your timezones,
fixes timezone loading in multithreaded applications,
and allows parsing and formatting using custom format
strings.

As a test of the APIs, we replace the formatting code in
seconds(1), shrinking it massively.

The last commit missed a few removals, and made it
unnecessarily hard to do an update.
2020-06-14 09:33:32 -07:00
cinap_lenrek f380851ddb libc: reverting previous change until ori can fix it 2020-06-14 04:47:22 +02:00
Ori Bernstein e2ee991490 libc, seconds: new time and date apis.
Redo date handling in libc almost entirely. This allows
handling dates and times from outside your timezones,
fixes timezone loading in multithreaded applications,
and allows parsing and formatting using custom format
strings.

As a test of the APIs, we replace the formatting code in
seconds(1), shrinking it massively.
2020-06-13 12:38:49 -07:00
Ori Bernstein 2b67ee6312 hack around timezone issues. 2019-12-08 11:58:52 -08:00
cinap_lenrek f5dd576a50 add seconds(1) command 2012-05-22 05:16:23 +02:00