unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* US daylight savings for 2007
@ 2006-12-20 22:04 Kevin Ryde
  2006-12-21 12:22 ` Robert J. Chassell
  0 siblings, 1 reply; 4+ messages in thread
From: Kevin Ryde @ 2006-12-20 22:04 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 1059 bytes --]

I noticed a couple of spots in the code and manual with US daylight
savings rule as first sunday in April, which I believe is changing for
2007.

2006-12-20  Kevin Ryde  <user42@zip.com.au>

	* calendar/cal-dst.el (calendar-dst-starts): Default to second Sunday
	in March.
	(calendar-dst-ends): Default to first Sunday in November.
	These are new US rules commencing 2007, per tzdata
	ftp://elsie.nci.nih.gov/pub/.

and in the manual:

	* calendar.texi (Holidays): US daylight savings begins second Sunday
	in March for 2007 onwards.
	(Daylight Savings): Show new US default daylight savings rules, 2nd
	Sun in Mar to 1st Sun in Nov, now in cal-dst.el.

I'm not sure why daylight savings is mentioned in the "Holidays" node.
What it says about always using only the present definition isn't true
any more is it?  I'd be tempted to reduce the last paragraph to just
its first sentence.

	The dates used by Emacs for holidays are based on _current
	practice_, not historical fact.

Unless someone can think of a holiday where the rule has varied
historically.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: cal-dst.el.us-daylight-2007.diff --]
[-- Type: text/x-diff, Size: 1295 bytes --]

*** cal-dst.el.~1.26.~	2006-12-15 07:15:51.000000000 +1100
--- cal-dst.el	2006-12-20 15:55:22.000000000 +1100
***************
*** 346,352 ****
                      (nth 4 calendar-current-time-zone-cache))))
          (if expr (eval expr)))
        (and (not (zerop calendar-daylight-time-offset))
!            (calendar-nth-named-day 1 0 4 year))))
  
  (defun calendar-dst-ends (year)
    "Return the date of YEAR on which Daylight Saving Time ends.
--- 346,352 ----
                      (nth 4 calendar-current-time-zone-cache))))
          (if expr (eval expr)))
        (and (not (zerop calendar-daylight-time-offset))
!            (calendar-nth-named-day 2 0 3 year))))
  
  (defun calendar-dst-ends (year)
    "Return the date of YEAR on which Daylight Saving Time ends.
***************
*** 356,362 ****
                      (nth 5 calendar-current-time-zone-cache))))
          (if expr (eval expr)))
        (and (not (zerop calendar-daylight-time-offset))
!            (calendar-nth-named-day -1 0 10 year))))
  
  
  ;;;###autoload
--- 356,362 ----
                      (nth 5 calendar-current-time-zone-cache))))
          (if expr (eval expr)))
        (and (not (zerop calendar-daylight-time-offset))
!            (calendar-nth-named-day 1 0 11 year))))
  
  
  ;;;###autoload

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: calendar.texi.us-daylight-2007.diff --]
[-- Type: text/x-diff, Size: 2041 bytes --]

*** calendar.texi.~1.50.~	2006-12-15 07:16:58.000000000 +1100
--- calendar.texi	2006-12-20 16:01:19.000000000 +1100
***************
*** 530,536 ****
  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.
  
--- 530,536 ----
  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 second Sunday in March.  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.
  
***************
*** 1593,1606 ****
    The values for Cambridge, Massachusetts are as follows:
  
  @example
! (calendar-nth-named-day 1 0 4 year)
! (calendar-nth-named-day -1 0 10 year)
  @end example
  
  @noindent
! That is, the first 0th day (Sunday) of the fourth month (April) in
! the year specified by @code{year}, and the last Sunday of the tenth month
! (October) of that year.  If daylight savings time were
  changed to start on October 1, you would set
  @code{calendar-daylight-savings-starts} to this:
  
--- 1593,1606 ----
    The values for Cambridge, Massachusetts are as follows:
  
  @example
! (calendar-nth-named-day 2 0 3 year)
! (calendar-nth-named-day 1 0 11 year)
  @end example
  
  @noindent
! That is, the second 0th day (Sunday) of the third month (March) in
! the year specified by @code{year}, and the first Sunday of the eleventh month
! (November) of that year.  If daylight savings time were
  changed to start on October 1, you would set
  @code{calendar-daylight-savings-starts} to this:
  

[-- Attachment #4: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-12-24 17:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-20 22:04 US daylight savings for 2007 Kevin Ryde
2006-12-21 12:22 ` Robert J. Chassell
2006-12-24  0:59   ` Kevin Ryde
2006-12-24 17:09     ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).