[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Computing week number

From: tomas
Subject: Re: Computing week number
Date: Mon, 10 Aug 2020 10:38:17 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Aug 10, 2020 at 09:12:27AM +0200, claude fuhrer wrote:
> Hi everybody
> It seems that I don't understand how to compute the week number in emacs.

There's no such thing as "the week number in emacs". Or... there are
at least three.

Cribbed from the docs (C-h i format-time-string):

 "%U is the week number starting on Sunday, %W starting on Monday,
  %V according to ISO 8601."

The thing is there are many meaningful ways to define such a thing
as a "week number", and several of them are in current use. See,
e.g. [1] for even more fun :-)

Once you know what kind of results you want, the rest tends to be

Of course, some people pick "whatever Excel does". Don't do that ;)


[1] https://en.wikipedia.org/wiki/Week_number#Week_numbering
 - t

Attachment: signature.asc
Description: Digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]