On 16 August 2010 02:49, anonymous <ya6iod1e_AT_lavabit.com> wrote:
> I don't think this should be written in shell scripting language: it
> is not too easy to calculate what date it will be tomorrow without
> libc and it should be very fast.
I wanted to do some date manipulation in rc awhile back and ended up
writing some utils to manipulate ISO8601 dates.
% 8601/date #current date in YYYY-MM-DDTHH:MM:SS+TZ:TZ
% 8601/delta `{8601/date} + P1DT #gives tomorrows date (the P1DT is
an 8601 "period" format, in this case 1 Day. could equivalently use
PT24H or PT86400S. or PT12H43200S if you were so inclined...)
Never got around to licensing it but feel free to use it,
http://sqweek.dnsdojo.org/hg/8601/
-sqweek
Received on Mon Aug 23 2010 - 00:27:03 CEST
This archive was generated by hypermail 2.2.0 : Mon Aug 23 2010 - 00:36:02 CEST