/usr/lib/s9fes/help/time-add is in scheme9 2010.11.13-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | S9 LIB (time-add list1 list2) ==> list
(time-subtract list1 list2) ==> list
(time-difference list1 list2) ==> list
(time-before? list1 list2) ==> boolean
(time-after? list1 list2) ==> boolean
(load-from-library "time-ops.scm")
TIME-ADD adds the <interval> LIST2 to the <time> LIST1 and returns
a new time that is in the future of LIST1, where
<time> := (weekday year month day hour minute second)
<interval> := (days hours minutes seconds)
The WEEKDAY part is ignored in input, but set correctly in output.
See the description of the UNIX-TIME->TIME procedure for further
details.
TIME-SUBTRACT subtracts the interval LIST2 from the time LIST1 and
returns a new time that is in the past of LIST1. Both TIME-ADD and
TIME-SUBTRACT return a value of the <time> form.
TIME-DIFFERENCE returns an <interval> specifying the difference
between the times LIST1 and LIST2. The order of the times does
not matter, the difference is always positive.
TIME-BEFORE? returns a boolean indicating whether the time LIST1
is in the past of LIST2. TIME-AFTER? is the inverse operation of
TIME-BEFORE?.
(time-add '(0 2010 10 06 12 30 00) '(10 7 30 0))
==> (5 2010 10 16 20 0 0)
(time-difference '(0 2010 10 06 12 30 00)
'(5 2010 10 16 20 00 00))
==> (10 7 30 0)
(time-after? '(5 2010 10 16 20 00 00)
'(0 2010 10 06 12 30 00))
==> #t
|