aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2017-10-17 18:25:18 -0700
committerPaul Eggert2017-10-17 18:26:01 -0700
commit8ca6fa585add53db66fb17b151e67029d68cc9ef (patch)
treedff09a39ff2611836ecae7d90a37503701cb87d9 /src
parent2e1b3522b8562f94a98fed07aeddb6b5ba0dbc6c (diff)
downloademacs-8ca6fa585add53db66fb17b151e67029d68cc9ef.tar.gz
emacs-8ca6fa585add53db66fb17b151e67029d68cc9ef.zip
Improve format-time-string doc
* doc/lispref/os.texi (Time Parsing): Fix some errors in the documentation for format-time-string. Document ^, #, %s, and %z with colons. Say that unrecognized sequences are output as-is. * src/editfns.c (Fformat_time_string): %S can stand for 60. Also mention unrecognized sequences.
Diffstat (limited to 'src')
-rw-r--r--src/editfns.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/editfns.c b/src/editfns.c
index e65bd34da87..f6f5ccc9480 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -2038,11 +2038,11 @@ by text that describes the specified date and time in TIME:
2038 only blank-padded, %l is like %I blank-padded. 2038 only blank-padded, %l is like %I blank-padded.
2039%p is the locale's equivalent of either AM or PM. 2039%p is the locale's equivalent of either AM or PM.
2040%q is the calendar quarter (1–4). 2040%q is the calendar quarter (1–4).
2041%M is the minute. 2041%M is the minute (00-59).
2042%S is the second. 2042%S is the second (00-59; 00-60 on platforms with leap seconds)
2043%N is the nanosecond, %6N the microsecond, %3N the millisecond, etc.
2044%Z is the time zone name, %z is the numeric form.
2045%s is the number of seconds since 1970-01-01 00:00:00 +0000. 2043%s is the number of seconds since 1970-01-01 00:00:00 +0000.
2044%N is the nanosecond, %6N the microsecond, %3N the millisecond, etc.
2045%Z is the time zone abbreviation, %z is the numeric form.
2046 2046
2047%c is the locale's date and time format. 2047%c is the locale's date and time format.
2048%x is the locale's "preferred" date format. 2048%x is the locale's "preferred" date format.
@@ -2052,7 +2052,8 @@ by text that describes the specified date and time in TIME:
2052%R is like "%H:%M", %T is like "%H:%M:%S", %r is like "%I:%M:%S %p". 2052%R is like "%H:%M", %T is like "%H:%M:%S", %r is like "%I:%M:%S %p".
2053%X is the locale's "preferred" time format. 2053%X is the locale's "preferred" time format.
2054 2054
2055Finally, %n is a newline, %t is a tab, %% is a literal %. 2055Finally, %n is a newline, %t is a tab, %% is a literal %, and
2056unrecognized %-sequences stand for themselves.
2056 2057
2057Certain flags and modifiers are available with some format controls. 2058Certain flags and modifiers are available with some format controls.
2058The flags are `_', `-', `^' and `#'. For certain characters X, 2059The flags are `_', `-', `^' and `#'. For certain characters X,