diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-02-16 07:31:09 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-02-16 07:31:09 -0800 |
commit | 5ce43f94327ebf98b3eaff49fa6fcda8a88470fb (patch) | |
tree | 0952148efe10681275eaa0d5fac0f443821e0420 /txr.1 | |
parent | aeb76cfe860f14982fc97de262c343b94e11156a (diff) | |
download | txr-5ce43f94327ebf98b3eaff49fa6fcda8a88470fb.tar.gz txr-5ce43f94327ebf98b3eaff49fa6fcda8a88470fb.tar.bz2 txr-5ce43f94327ebf98b3eaff49fa6fcda8a88470fb.zip |
time: fix missing day-of-week and day-of-year.
The time code entirely neglects the tm_wday and tm_yday
fields of struct tm; they are missing from the Lisp time
structure, and not referenced anywhere.
* time.c (wday_s, yday_s): New symbol variables.
(tm_to_time_struct): Transfer tm_wday and tm_yday values to
Lisp struct.
(time_fields_to_tm): Take wday and yday parameters, convert
these and store in the given struct tm.
(time_struct_to_tm): Retrieve wday and yday slots, and pass
these values to time_fields_to_tm.
(make_time_impl): Pass nil for wday and yday arguments of
time_fields_to_tm, which is OK since mktime doesn't use those.
(time_init): Intern the wday and yday symbols. Add those slots
to the time structure.
* txr.1: Documented new slots.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -64898,8 +64898,9 @@ function. .coNP Structure @ time .synb .mets (defstruct time nil -.mets \ \ year month day hour min sec dst -.mets \ \ gmtoff zone) +.mets \ \ year month day hour min sec +.mets \ \ wday yday +.mets \ \ dst gmtoff zone) .syne .desc The @@ -64927,13 +64928,17 @@ uses a zero-based month. The slot is a \*(TL Boolean value. The slots .codn hour , .codn min , +.codn sec , +.code wday and -.code sec +.code yday correspond directly to .codn tm_hour , .codn tm_min , +.codn tm_sec , +.code tm_wday and -.codn tm_sec . +.codn tm_yday . The slot .code gmtoff |