diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-08-22 21:08:14 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-08-22 21:08:14 -0700 |
commit | abd55f06d231eaa918a3ee99a17101005f751e84 (patch) | |
tree | 77b4022afa0c2c8eaf37504e46221a4b6c957cf4 /txr.1 | |
parent | 2ac1a60fa62041345bc461edb3e7d0d74a0055cd (diff) | |
download | txr-abd55f06d231eaa918a3ee99a17101005f751e84.tar.gz txr-abd55f06d231eaa918a3ee99a17101005f751e84.tar.bz2 txr-abd55f06d231eaa918a3ee99a17101005f751e84.zip |
New time-string method on time struct.
* lib.c (time_string_s): New symbol variable.
(time_fields_to_tm, time_struct_to_tm): New static functions.
(make_time_impl): Replace bunch of code with call to
time_fields_to_tm.
(time_string_meth): New static function.
(time_init): Initialize time_string_s. Add time-string
static slot to time struct. Register time-string
method.
* txr.1: Documented.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -36579,6 +36579,28 @@ which are applied to or .codn make-time-utc . +.coNP Method @ time-string +.synb +.mets << time-struct .(time-string << format ) +.syne +.desc +The +.code time +structure has a method called +.codn time-string . + +This method accepts a +.meta format +string argument, which it uses to convert +the fields to a character string representation +which is returned. + +The +.meta format +argument is a string, and follows exactly the same conventions as +the format string of the C library function +.codn strftime . + .coNP Functions @ make-time and @ make-time-utc .synb .mets (make-time < year < month < day < hour < minute < second << dst-advice ) |