--- Begin Message ---
Subject: |
format-time-string year error |
Date: |
Sat, 01 Jan 2022 13:11:56 -0700 |
User-agent: |
Tuxedo/0.1 |
;; I ran this in the *scratch* buffer at lunch time in Denver.
;; The year is not right.
(defun doit ()
(format "%s\n%s\n%s"
(current-time)
(format-time-string "%d %b")
(format-time-string "%R %G")))
(doit)
"(25040 45621 647344 602000)
01 Jan
12:57 2021"
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#52934: format-time-string year error |
Date: |
Sun, 02 Jan 2022 09:32:49 +0200 |
> Date: Sat, 01 Jan 2022 16:01:21 -0700
> From: <david@ngdr.net>
> Cc: Eli Zaretskii <eliz@gnu.org>, <52934@debbugs.gnu.org>
>
> Now I have read about ISO 8601 in Wikipedia and, of course, your replies
> are correct; now I know that we are in week 52 of 2021.
>
> However, someone writing Emacs code to produce a timestamp for, e.g.,
> .html code, does not see the need to study an ISO specification to avoid a
> tripwire that is not even obvious - the problem only occurs, if it occurs,
> in a few days of the year. Otherwise there is no reason to suspect that
> personal code is faulty: it will perform correctly, including under test,
> for about 360 days of the year.
>
> I should like to suggest a note in the Emacs Info documentation that warns
> the reader that ISO weeks do not map nicely into the calendar that the
> reader lives by. That would be helpful. I am not suggesting that the
> Emacs documentation should describe ISO 8601, only that it warns of the
> potential problems, and, ideally, gives a reference to a description of the
> standard.
I enhanced the documentation, thanks. Pointing to the ISO standard
would not be useful, since it is not freely available, so I said
something about the rules instead.
I'm therefore closing this bug.
--- End Message ---