emacs-devel
[Top][All Lists]
Advanced

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

Re: calendar problem: week number


From: Tassilo Horn
Subject: Re: calendar problem: week number
Date: Thu, 7 Aug 2008 11:38:58 +0200
User-agent: KMail/1.10.0 (Linux/2.6.26-gentoo; KDE/4.1.60; x86_64; ; )

On Thursday 07 August 2008 11:15:11 Werner LEMBERG wrote:

Hi Werner,

> Companies in German are used to refer to the `Kalenderwoche' (the
> current number of the week counted from the beginning of the year).
> For example, this week is the 32nd week.  Can I configure `calendar'
> to make it display, eg., like in the attached image?  I haven't found
> a hint in the info file.

I use this custom code to do that:

--8<---------------cut here---------------start------------->8---
(add-to-list 'calendar-mode-line-format
             '(let ((day (nth 1 date))
                    (month (nth 0 date))
                    (year (nth 2 date)))
                (format-time-string "Week of year: %V"
                                    (encode-time 1 1 1 day month 
year))))
--8<---------------cut here---------------end--------------->8---

Bye,
Tassilo





reply via email to

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