From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xavier Maillard Newsgroups: gmane.emacs.help Subject: Re: Week number Date: Tue, 14 Oct 2008 22:25:05 +0200 Organization: GNU's Not UNIX! Message-ID: <200810142025.m9EKP5DO005068@zogzog.maillard.mobi> References: Reply-To: Xavier Maillard NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1224016190 22341 80.91.229.12 (14 Oct 2008 20:29:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 14 Oct 2008 20:29:50 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Charles Sebold Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Oct 14 22:30:47 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KpqXV-0001Y9-1Y for geh-help-gnu-emacs@m.gmane.org; Tue, 14 Oct 2008 22:30:45 +0200 Original-Received: from localhost ([127.0.0.1]:42349 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KpqWP-000813-5V for geh-help-gnu-emacs@m.gmane.org; Tue, 14 Oct 2008 16:29:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KpqW7-0007zl-9O for help-gnu-emacs@gnu.org; Tue, 14 Oct 2008 16:29:19 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KpqW5-0007zO-O8 for help-gnu-emacs@gnu.org; Tue, 14 Oct 2008 16:29:18 -0400 Original-Received: from [199.232.76.173] (port=38377 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KpqW5-0007zK-KH for help-gnu-emacs@gnu.org; Tue, 14 Oct 2008 16:29:17 -0400 Original-Received: from master.uucpssh.org ([193.218.105.66]:56264) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KpqW5-0008Qm-AP for help-gnu-emacs@gnu.org; Tue, 14 Oct 2008 16:29:17 -0400 Original-Received: by master.uucpssh.org (Postfix, from userid 10) id DE453F513D; Tue, 14 Oct 2008 22:28:43 +0200 (CEST) Original-Received: from zogzog.maillard.mobi (IDENT:1000@localhost [127.0.0.1]) by zogzog.maillard.mobi (8.14.2/8.13.8) with ESMTP id m9EKP6JT005069; Tue, 14 Oct 2008 22:25:06 +0200 Original-Received: (from xma@localhost) by zogzog.maillard.mobi (8.14.2/8.13.8/Submit) id m9EKP5DO005068; Tue, 14 Oct 2008 22:25:05 +0200 In-reply-to: (message from Charles Sebold on Tue, 14 Oct 2008 07:53:41 -0500) User-Agent: Rmail in GNU Emacs 23.0.60.12 on GNU/Linux Jabber-ID: xma01@jabber.fr X-uucpssh: Found to be clean X-uucpssh-SpamCheck: not spam, SpamAssassin (not cached, score=-4.4, required 4.6, autolearn=not spam, ALL_TRUSTED -1.80, BAYES_00 -2.60, SPF_HELO_PASS -0.00) X-uucpssh-From: xma@gnu.org X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:58777 Archived-At: Hi, On 14 Oct 2008, Charles Sebold wrote: > Here's how org-mode does it: Sorry, this is really what you were asking for, then: (defun crs-iso-week (&optional date) Thank you very much. I have a question though. I compared the results of your function and the result from a simple (format-time-string "%W") for the current date and I got week 42 for the former and week 41 for the latter. Can you explain this ? Regards Xavier -- http://www.gnu.org http://www.april.org http://www.lolica.org