[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Convert from date to week number, howto?
From: |
Georges Ko |
Subject: |
Re: [O] Convert from date to week number, howto? |
Date: |
Fri, 03 Feb 2012 23:58:48 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.4 (windows-nt) Hamster/2.0.0.1 |
Jambunathan K <address@hidden> writes:
>> I sometimes have to convert from a date to a week number,
>
> Try this.
>
> (org-odt-format-date "<2011-12-31 Sat>" "%U")
> (org-odt-format-date "[2011-12-24 Sat]" "%U")
>
> You can steal the implementation. The functions have nothing to do with
> org-odt, btw.
Another way to get the week of the year is:
(require 'calendar)
(require 'cal-iso)
(car
(calendar-iso-from-absolute
(calendar-absolute-from-gregorian
(list month day year))))
--
Georges Ko address@hidden 2012-02-03