Mercurial > emacs
comparison man/calc.texi @ 76555:a66dd73ee29f
(Time Zones): Mention the 2007 rule change.
author | Jay Belanger <jay.p.belanger@gmail.com> |
---|---|
date | Mon, 19 Mar 2007 03:36:17 +0000 |
parents | 7e6954829f0c |
children | 69d482cf1871 c0409ee15cee |
comparison
equal
deleted
inserted
replaced
76554:cabce7b4c4cc | 76555:a66dd73ee29f |
---|---|
17377 @kbd{t U}, @kbd{t J}, @kbd{t N}, and @kbd{t C}, but not by any other | 17377 @kbd{t U}, @kbd{t J}, @kbd{t N}, and @kbd{t C}, but not by any other |
17378 commands. In particular, @samp{<may 1 1991> - <apr 1 1991>} evaluates | 17378 commands. In particular, @samp{<may 1 1991> - <apr 1 1991>} evaluates |
17379 to exactly 30 days even though there is a daylight-saving | 17379 to exactly 30 days even though there is a daylight-saving |
17380 transition in between. This is also true for Julian pure dates: | 17380 transition in between. This is also true for Julian pure dates: |
17381 @samp{julian(<may 1 1991>) - julian(<apr 1 1991>)}. But Julian | 17381 @samp{julian(<may 1 1991>) - julian(<apr 1 1991>)}. But Julian |
17382 and Unix date/times will adjust for daylight saving time: | 17382 and Unix date/times will adjust for daylight saving time: using Calc's |
17383 default daylight saving time rule (see the explanation below), | |
17383 @samp{julian(<12am may 1 1991>) - julian(<12am apr 1 1991>)} | 17384 @samp{julian(<12am may 1 1991>) - julian(<12am apr 1 1991>)} |
17384 evaluates to @samp{29.95834} (that's 29 days and 23 hours) | 17385 evaluates to @samp{29.95833} (that's 29 days and 23 hours) |
17385 because one hour was lost when daylight saving commenced on | 17386 because one hour was lost when daylight saving commenced on |
17386 April 7, 1991. | 17387 April 7, 1991. |
17387 | 17388 |
17388 In brief, the idiom @samp{julian(@var{date1}) - julian(@var{date2})} | 17389 In brief, the idiom @samp{julian(@var{date1}) - julian(@var{date2})} |
17389 computes the actual number of 24-hour periods between two dates, whereas | 17390 computes the actual number of 24-hour periods between two dates, whereas |
17499 non-daylight-saving time. | 17500 non-daylight-saving time. |
17500 | 17501 |
17501 @vindex math-daylight-savings-hook | 17502 @vindex math-daylight-savings-hook |
17502 @findex math-std-daylight-savings | 17503 @findex math-std-daylight-savings |
17503 By default Calc always considers daylight saving time to begin at | 17504 By default Calc always considers daylight saving time to begin at |
17504 2 a.m.@: on the second Sunday of March, and to end at 2 a.m.@: on the | 17505 2 a.m.@: on the second Sunday of March (for years from 2007 on) or on |
17505 first Sunday of November. This is the rule that has been in effect | 17506 the last Sunday in April (for years before 2007), and to end at 2 a.m.@: |
17506 in North America since 2007. If you are in a country that uses | 17507 on the first Sunday of November. (for years from 2007 on) or the last |
17507 different rules for computing daylight saving time, you have two | 17508 Sunday in October (for years before 2007). These are the rules that have |
17508 choices: Write your own daylight saving hook, or control time | 17509 been in effect in much of North America since 1966 and takes into |
17509 zones explicitly by setting the @code{TimeZone} variable and/or | 17510 account the rule change that began in 2007. If you are in a |
17511 country that uses different rules for computing daylight saving time, | |
17512 you have two choices: Write your own daylight saving hook, or control | |
17513 time zones explicitly by setting the @code{TimeZone} variable and/or | |
17510 always giving a time-zone argument for the conversion functions. | 17514 always giving a time-zone argument for the conversion functions. |
17511 | 17515 |
17512 The Lisp variable @code{math-daylight-savings-hook} holds the | 17516 The Lisp variable @code{math-daylight-savings-hook} holds the |
17513 name of a function that is used to compute the daylight saving | 17517 name of a function that is used to compute the daylight saving |
17514 adjustment for a given date. The default is | 17518 adjustment for a given date. The default is |