emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Computing week number
@ 2020-08-10  7:12 claude fuhrer
  2020-08-10  8:38 ` tomas
  0 siblings, 1 reply; 2+ messages in thread
From: claude fuhrer @ 2020-08-10  7:12 UTC (permalink / raw)
  To: emacs-orgmode

Hi everybody

It seems that I don't understand how to compute the week number in emacs.

I use emacs 26.3 and org mode version 9.3.7 (release_9.3.7-705-gea9463


1) When I display the agenda (command "org-agenda" + "a"), today 10th of 
august I have a header like:

"Monday     10 August 2020 W33      (I suppose that W33 means week 33)"


2) In my lisp configuration file I have a command like :

(insert (format-time-string " %d %B %Y (CW %W)\n" (current-time))).


This line display something like


"10 August 2020 (CW 32)"



Do you have an idea what I done wrong ? Thank you in advance for your help!




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

* Re: Computing week number
  2020-08-10  7:12 Computing week number claude fuhrer
@ 2020-08-10  8:38 ` tomas
  0 siblings, 0 replies; 2+ messages in thread
From: tomas @ 2020-08-10  8:38 UTC (permalink / raw)
  To: claude fuhrer; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 800 bytes --]

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

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

Cheers

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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

end of thread, other threads:[~2020-08-10  8:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-10  7:12 Computing week number claude fuhrer
2020-08-10  8:38 ` tomas

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

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).