[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#52934: format-time-string year error
From: |
Andreas Schwab |
Subject: |
bug#52934: format-time-string year error |
Date: |
Sat, 01 Jan 2022 23:21:25 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.90 (gnu/linux) |
On Jan 01 2022, Eli Zaretskii wrote:
>> Date: Sat, 01 Jan 2022 13:11:56 -0700
>> From: <david@ngdr.net>
>>
>> ;; 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"
>
> The doc string of format-time-string says:
>
> %G is the year corresponding to the ISO week
>
> Isn't it true that the ISO week is still in 2021 today?
Week 52 of 2021 started on 2021-12-27, and ends on 2022-01-02.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."