From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Convert from date to week number, howto? Date: Thu, 02 Feb 2012 11:32:30 -0500 Message-ID: <11073.1328200350@alphaville> References: <87liol1a8z.fsf@iro.umontreal.ca> Reply-To: nicholas.dokos@hp.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:41671) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RszaT-0001hq-MZ for emacs-orgmode@gnu.org; Thu, 02 Feb 2012 11:32:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RszaM-0008A3-1j for emacs-orgmode@gnu.org; Thu, 02 Feb 2012 11:32:41 -0500 Received: from g1t0029.austin.hp.com ([15.216.28.36]:21914) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RszaL-00089Z-Tg for emacs-orgmode@gnu.org; Thu, 02 Feb 2012 11:32:33 -0500 In-Reply-To: Message from pinard@iro.umontreal.ca (=?us-ascii?Q?=3D=3Futf-?= =?us-ascii?Q?8=3FQ=3FFran=3DC3=3DA7ois=3F=3D?= Pinard) of "Thu\, 02 Feb 2012 11\:16\:28 EST." <87liol1a8z.fsf@iro.umontreal.ca> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?us-ascii?Q?=3D=3Futf-8=3FQ=3FFran=3DC3=3DA7?= =?us-ascii?Q?ois=3F=3D?= Pinard Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org Fran=C3=A7ois Pinard wrote: > Hi, Orger friends :-) >=20 > I sometimes have to convert from a date to a week number, for when I am > shift-arrowing a clock table summarizing weeks. It was easy at the > beginning of the year, but I see it requires more thought as year > advance. I can write little programs to do so, but I wonder if someone > has an easy trick in Org mode (or in Emacs)? >=20 The agenda shows it in the daily/weekly view, so you can go to the date of interest and do a day view: vd. Or you can crib the code that calculates it and incorporate it into your own function (org-days-to-iso-week does it but it requires a day number since BCE I think, so you have to do some figuring). Nick