unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#45608: 28.0.50; calendar-iso-date-string: "Day 6 of week 53 of 2020"
@ 2021-01-02 11:03 Jean Louis
  2021-01-02 11:32 ` Alan Third
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Jean Louis @ 2021-01-02 11:03 UTC (permalink / raw)
  To: 45608


(calendar-iso-date-string) gives following information on this day:
"Day 6 of week 53 of 2020" which I consider wrong as it is 2021 and
the year has 52 weeks normally, the days at begin of the new year
should not be considered past year.





In GNU Emacs 28.0.50 (build 4, x86_64-pc-linux-gnu, X toolkit, cairo version 1.14.8, Xaw3d scroll bars)
 of 2021-01-01 built on protected.rcdrun.com
Repository revision: 30a1d5da7a43d51a97cbe8d91add9a26dd99df90
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.11907000
System Description: Hyperbola GNU/Linux-libre

Configured using:
 'configure --prefix=/package/text/emacs --with-modules
 --with-x-toolkit=lucid
 PKG_CONFIG_PATH=/home/data1/protected/GNUstep/Library/Libraries/pkgconfig:/usr/lib/pkgconfig'

Configured features:
XAW3D XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB
NOTIFY INOTIFY ACL GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF
ZLIB TOOLKIT_SCROLL_BARS LUCID X11 XDBE XIM MODULES THREADS JSON
PDUMPER LCMS2

Important settings:
  value of $LC_ALL: en_US.UTF-8
  value of $LANG: de_DE.UTF-8
  value of $XMODIFIERS: @im=exwm-xim
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction


Memory information:
((conses 16 1107464 508288)
 (symbols 48 47280 1)
 (strings 32 278217 50104)
 (string-bytes 1 7843359)
 (vectors 16 110520)
 (vector-slots 8 2338233 151130)
 (floats 8 846 1198)
 (intervals 56 48809 42517)
 (buffers 984 206))


-- 
Thanks,
Jean Louis
⎔ λ 🄯 𝍄 𝌡 𝌚





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#45608: 28.0.50; calendar-iso-date-string: "Day 6 of week 53 of 2020"
  2021-01-02 11:03 bug#45608: 28.0.50; calendar-iso-date-string: "Day 6 of week 53 of 2020" Jean Louis
@ 2021-01-02 11:32 ` Alan Third
  2021-01-02 11:33 ` Lars Ingebrigtsen
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Alan Third @ 2021-01-02 11:32 UTC (permalink / raw)
  To: Jean Louis; +Cc: 45608

On Sat, Jan 02, 2021 at 12:03:16PM +0100, Jean Louis wrote:
> 
> (calendar-iso-date-string) gives following information on this day:
> "Day 6 of week 53 of 2020" which I consider wrong as it is 2021 and
> the year has 52 weeks normally, the days at begin of the new year
> should not be considered past year.

You'd best take that up with ISO, as this is how ISO dates work.

-- 
Alan Third





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#45608: 28.0.50; calendar-iso-date-string: "Day 6 of week 53 of 2020"
  2021-01-02 11:03 bug#45608: 28.0.50; calendar-iso-date-string: "Day 6 of week 53 of 2020" Jean Louis
  2021-01-02 11:32 ` Alan Third
@ 2021-01-02 11:33 ` Lars Ingebrigtsen
  2021-01-02 17:17   ` Drew Adams
  2021-01-02 11:40 ` Eli Zaretskii
  2021-01-02 12:42 ` Andreas Schwab
  3 siblings, 1 reply; 7+ messages in thread
From: Lars Ingebrigtsen @ 2021-01-02 11:33 UTC (permalink / raw)
  To: Jean Louis; +Cc: 45608

Jean Louis <bugs@gnu.support> writes:

> (calendar-iso-date-string) gives following information on this day:
> "Day 6 of week 53 of 2020" which I consider wrong as it is 2021 and
> the year has 52 weeks normally, the days at begin of the new year
> should not be considered past year.

https://en.wikipedia.org/wiki/ISO_week_date

"An ISO week-numbering year (also called ISO year informally) has 52 or
53 full weeks. That is 364 or 371 days instead of the usual 365 or 366
days. The extra week is sometimes referred to as a leap week, although
ISO 8601 does not use this term. Weeks start with Monday. Each week's
year is the Gregorian year in which the Thursday falls. The first week
of the year, hence, always contains 4 January. ISO week year numbering
therefore slightly deviates from the Gregorian for some days close to 1
January."

Closing.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#45608: 28.0.50; calendar-iso-date-string: "Day 6 of week 53 of 2020"
  2021-01-02 11:03 bug#45608: 28.0.50; calendar-iso-date-string: "Day 6 of week 53 of 2020" Jean Louis
  2021-01-02 11:32 ` Alan Third
  2021-01-02 11:33 ` Lars Ingebrigtsen
@ 2021-01-02 11:40 ` Eli Zaretskii
  2021-01-02 12:42 ` Andreas Schwab
  3 siblings, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2021-01-02 11:40 UTC (permalink / raw)
  To: Jean Louis; +Cc: 45608

> Date: Sat, 02 Jan 2021 12:03:16 +0100
> From: Jean Louis <bugs@gnu.support>
> 
> (calendar-iso-date-string) gives following information on this day:
> "Day 6 of week 53 of 2020" which I consider wrong as it is 2021 and
> the year has 52 weeks normally, the days at begin of the new year
> should not be considered past year.

When a week starts in year Y and ends in year Y+1, what would you want
to see instead?  Saying "week 1 of 2021" would be wrong for the same
reason.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#45608: 28.0.50; calendar-iso-date-string: "Day 6 of week 53 of 2020"
  2021-01-02 11:03 bug#45608: 28.0.50; calendar-iso-date-string: "Day 6 of week 53 of 2020" Jean Louis
                   ` (2 preceding siblings ...)
  2021-01-02 11:40 ` Eli Zaretskii
@ 2021-01-02 12:42 ` Andreas Schwab
  3 siblings, 0 replies; 7+ messages in thread
From: Andreas Schwab @ 2021-01-02 12:42 UTC (permalink / raw)
  To: Jean Louis; +Cc: 45608

On Jan 02 2021, Jean Louis wrote:

> the year has 52 weeks normally

That is not possible, as 52 weeks can only cover 364 days.

Andreas.

-- 
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."





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#45608: 28.0.50; calendar-iso-date-string: "Day 6 of week 53 of 2020"
  2021-01-02 11:33 ` Lars Ingebrigtsen
@ 2021-01-02 17:17   ` Drew Adams
  2021-01-02 18:00     ` Jean Louis
  0 siblings, 1 reply; 7+ messages in thread
From: Drew Adams @ 2021-01-02 17:17 UTC (permalink / raw)
  To: Lars Ingebrigtsen, Jean Louis; +Cc: 45608

> > (calendar-iso-date-string) gives following information on this day:
> > "Day 6 of week 53 of 2020" which I consider wrong as it is 2021 and
> > the year has 52 weeks normally, the days at begin of the new year
> > should not be considered past year.
> 
> https://urldefense.com/v3/__https://en.wikipedia.org/wiki/ISO_week_date__;!!G
> qivPVa7Brio!LxlLxRzS6V8fuHzPVAnAczqQvPR708E_qdx6x3He2wfh95sRUnSwi7xVfdtCWDxz$
> 
> "An ISO week-numbering year (also called ISO year informally) has 52 or
> 53 full weeks. That is 364 or 371 days instead of the usual 365 or 366
> days. The extra week is sometimes referred to as a leap week, although
> ISO 8601 does not use this term. Weeks start with Monday. Each week's
> year is the Gregorian year in which the Thursday falls. The first week
> of the year, hence, always contains 4 January. ISO week year numbering
> therefore slightly deviates from the Gregorian for some days close to 1
> January."

Very cool.  Interesting.  Thanks for citing that, Lars.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#45608: 28.0.50; calendar-iso-date-string: "Day 6 of week 53 of 2020"
  2021-01-02 17:17   ` Drew Adams
@ 2021-01-02 18:00     ` Jean Louis
  0 siblings, 0 replies; 7+ messages in thread
From: Jean Louis @ 2021-01-02 18:00 UTC (permalink / raw)
  To: Drew Adams; +Cc: Lars Ingebrigtsen, 45608

Alright, thank you all for references.

ISO date was kind of interesting in communication with people I know
and I used it for quite a long time.

I will now start using normalized version like:

(calendar-date-string (calendar-current-date))
"Saturday, January 2, 2021"

Jean





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-01-02 18:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-02 11:03 bug#45608: 28.0.50; calendar-iso-date-string: "Day 6 of week 53 of 2020" Jean Louis
2021-01-02 11:32 ` Alan Third
2021-01-02 11:33 ` Lars Ingebrigtsen
2021-01-02 17:17   ` Drew Adams
2021-01-02 18:00     ` Jean Louis
2021-01-02 11:40 ` Eli Zaretskii
2021-01-02 12:42 ` Andreas Schwab

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).