all messages for Emacs-related lists mirrored at yhetil.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

* Re: US daylight savings for 2007
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Robert J. Chassell @ 2006-12-21 12:22 UTC (permalink / raw)
  Cc: emacs-devel

According to 
    http://www.answers.com/topic/daylight-saving-time
on 2006 Mar 25

    In 1987 federal legislation fixed the period of daylight saving
    time in the United States as the first Sunday (previously the last
    Sunday) in April to the last Sunday in October; it was expanded in
    2005 (effective 2007) to extend from the second Sunday in March to
    the first Sunday in November. Arizona, Hawaii, and sections of
    Indiana do not use daylight saving time.

Thus, if you are in the US, in your .emacs file, put the following:

;; effective 2007, in the US, daylight saving time extends from
;; the second Sunday in March to the first Sunday in November.
;;   In 2007, daylight time begins on March 11 and ends on November 4. 
;;   In 2008, daylight time begins on March 9  and ends on November 2.

;; second Sunday in March 
(setq calendar-daylight-savings-starts '(calendar-nth-named-day 2 0 3 year))
;; first Sunday in November
(setq calendar-daylight-savings-ends '(calendar-nth-named-day 1 0 11 year))

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

* Re: US daylight savings for 2007
  2006-12-21 12:22 ` Robert J. Chassell
@ 2006-12-24  0:59   ` Kevin Ryde
  2006-12-24 17:09     ` Richard Stallman
  0 siblings, 1 reply; 4+ messages in thread
From: Kevin Ryde @ 2006-12-24  0:59 UTC (permalink / raw)


"Robert J. Chassell" <bob@rattlesnake.com> writes:
>
> ;; second Sunday in March 
> (setq calendar-daylight-savings-starts '(calendar-nth-named-day 2 0 3 year))
> ;; first Sunday in November
> (setq calendar-daylight-savings-ends '(calendar-nth-named-day 1 0 11 year))

Yes.  I was proposing to make that the default in the code, following
the way the manual says that the code defaults to current US rules.
(Not that the default in the code will be often reached these days,
certainly it's not on a gnu system.)

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

* Re: US daylight savings for 2007
  2006-12-24  0:59   ` Kevin Ryde
@ 2006-12-24 17:09     ` Richard Stallman
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Stallman @ 2006-12-24 17:09 UTC (permalink / raw)
  Cc: emacs-devel

I installed your changes.  Thanks.

^ 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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.