From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.devel Subject: Re: does Calendar understand DST rules for past years? Date: Sun, 24 Dec 2006 19:07:12 -0500 Message-ID: References: NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1167005261 28621 80.91.229.10 (25 Dec 2006 00:07:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 25 Dec 2006 00:07:41 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 25 01:07:41 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1GydNR-0007c2-Vu for ged-emacs-devel@m.gmane.org; Mon, 25 Dec 2006 01:07:38 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GydNR-0000ud-Im for ged-emacs-devel@m.gmane.org; Sun, 24 Dec 2006 19:07:37 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GydNC-0000sT-Iu for emacs-devel@gnu.org; Sun, 24 Dec 2006 19:07:22 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GydNA-0000qd-TJ for emacs-devel@gnu.org; Sun, 24 Dec 2006 19:07:21 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GydNA-0000qQ-LN for emacs-devel@gnu.org; Sun, 24 Dec 2006 19:07:20 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GydNA-00043r-Af for emacs-devel@gnu.org; Sun, 24 Dec 2006 19:07:20 -0500 Original-Received: from [127.0.0.1] (helo=localhost) by fencepost.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1GydN2-0000OD-V3; Sun, 24 Dec 2006 19:07:13 -0500 Original-To: rms@gnu.org X-Spook: strategic illuminati basement UFO Telex NASA genetic Glock X-Ran: QQ<(%qM)RQw75xGD]#kK2iPRud6&Je}i"Vu]@g:r>}S~$no^D^9BdIE.s81E{7l^,LZ|x= X-Hue: black X-Attribution: GM In-Reply-To: (Richard Stallman's message of "Thu, 21 Dec 2006 13:06:47 -0500") User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:64225 Archived-At: Richard Stallman wrote: > I asked Glenn Morris to look at this, but since he is away for a couple > of weeks, I ask if anyone else can figure out what is right here. I can at least reply to mail, even if I can't access CVS. > man/calendar.el says > > The dates used by Emacs for holidays are based on @emph{current > practice}, not historical fact. Historically, for instance, the start > of daylight savings time and even its existence have varied from year to > year, but present United States law mandates that daylight savings time > begins on the first Sunday in April. When the daylight savings rules > are set up for the United States, Emacs always uses the present > definition, even though it is wrong for some prior years. > > but the code seems to test calendar-dst-check-each-year-flag, which is > normally true. The above manual text is out of date following my recent changes to cal-dst (one month ago?). Above is how it used to work. Now if the flag is true (as you say), it checks each year as needed whenever the dst start/end dates for the year are first required. Then it caches the results for that year and reuses them if needed. If the flag is false, it works as the manual says. > I do not understand the code which that calls; it needs a lot more > comments. Can you please add comments? Comments not critical, can add those on my return. > But I can't see any sense in checking each year unless there is a > facility for recording the changes in rules between years. Results for each year stored in the cache variable I added a month or so ago. > In that case, the drawback which is documented is not reallky true. Not sure what drawback is. Above manual text is now incorrect when flag is true. Should have updated the manual when I made my changes, sorry.