aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Verona2012-12-16 03:17:05 +0100
committerJoakim Verona2012-12-16 03:17:05 +0100
commit81f3c762d2f43e60ec209af57758d1bddc78f3e1 (patch)
tree0e7080af9e5f01ab028e49dd1de37db14f618cdf
parent24d4008252f7c8e0d9fc4c55b46d25276b9a10c9 (diff)
parentb9d8175e56d6e6a9acd336863f420bf7cd5a471a (diff)
downloademacs-81f3c762d2f43e60ec209af57758d1bddc78f3e1.tar.gz
emacs-81f3c762d2f43e60ec209af57758d1bddc78f3e1.zip
auto upstream
-rw-r--r--doc/misc/ChangeLog6
-rw-r--r--doc/misc/calc.texi95
2 files changed, 100 insertions, 1 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index ecf3619db4b..1ca638bb7fe 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,9 @@
12012-12-16 Jay Belanger <jay.p.belanger@gmail.com>
2
3 * calc.texi (ISO-8601): New section.
4 (Date Formatting Codes): Mention new codes.
5 (Standard Date Formats): Mention new formats.
6
12012-12-14 Michael Albinus <michael.albinus@gmx.de> 72012-12-14 Michael Albinus <michael.albinus@gmx.de>
2 8
3 * tramp.texi (External methods): Move `adb' method here. 9 * tramp.texi (External methods): Move `adb' method here.
diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi
index 5ed5212ad25..138ed23eae9 100644
--- a/doc/misc/calc.texi
+++ b/doc/misc/calc.texi
@@ -13417,12 +13417,91 @@ dates. @xref{Specifying Operators}. To avoid confusion with nameless
13417functions, your date formats should avoid using the @samp{#} character. 13417functions, your date formats should avoid using the @samp{#} character.
13418 13418
13419@menu 13419@menu
13420* ISO-8601::
13420* Date Formatting Codes:: 13421* Date Formatting Codes::
13421* Free-Form Dates:: 13422* Free-Form Dates::
13422* Standard Date Formats:: 13423* Standard Date Formats::
13423@end menu 13424@end menu
13424 13425
13425@node Date Formatting Codes, Free-Form Dates, Date Formats, Date Formats 13426@node ISO-8601, Date Formatting Codes, Date Formats, Date Formats
13427@subsubsection ISO-8601
13428
13429@noindent
13430@cindex ISO-8601
13431The same date can be written down in different formats and Calc tries
13432to allow you to choose your preferred format. Some common formats are
13433ambiguous, however; for example, 10/11/2012 means October 11,
134342012 in the United States but it means November 10, 2012 in
13435Europe. To help avoid such ambiguities, the International Organization
13436for Standardization (ISO) provides the ISO-8601 standard, which
13437provides three different but easily distinguishable and unambiguous
13438ways to represent a date.
13439
13440The ISO-8601 calendar date representation is
13441
13442@example
13443 @var{YYYY}-@var{MM}-@var{DD}
13444@end example
13445
13446@noindent
13447where @var{YYYY} is the four digit year, @var{MM} is the two-digit month
13448number (01 for January to 12 for December), and @var{DD} is the
13449two-digit day of the month (01 to 31). (Note that @var{YYYY} does not
13450correspond to Calc's date formatting code, which will be introduced
13451later.) The year, which should be padded with zeros to ensure it has at
13452least four digits, is the Gregorian year, except that the year before
134530001 (1 AD) is the year 0000 (1 BC). The date October 11, 2012 is
13454written 2012-10-11 in this representation and November 10, 2012 is
13455written 2012-11-10.
13456
13457The ISO-8601 ordinal date representation is
13458
13459@example
13460 @var{YYYY}-@var{DDD}
13461@end example
13462
13463@noindent
13464where @var{YYYY} is the year, as above, and @var{DDD} is the day of the year.
13465The date December 31, 2011 is written 2011-365 in this representation
13466and January 1, 2012 is written 2012-001.
13467
13468The ISO-8601 week date representation is
13469
13470@example
13471 @var{YYYY}-W@var{ww}-@var{D}
13472@end example
13473
13474@noindent
13475where @var{YYYY} is the ISO week-numbering year, @var{ww} is the two
13476digit week number (preceded by a literal ``W''), and @var{D} is the day
13477of the week (1 for Monday through 7 for Sunday). The ISO week-numbering
13478year is based on the Gregorian year but can differ slightly. The first
13479week of an ISO week-numbering year is the week with the Gregorian year's
13480first Thursday in it (equivalently, the week containing January 4);
13481any day of that week (Monday through Sunday) is part of the same ISO
13482week-numbering year, any day from the previous week is part of the
13483previous year. For example, January 4, 2013 is on a Friday, and so
13484the first week for the ISO week-numbering year 2013 starts on
13485Monday, December 31, 2012. The day December 31, 2012 is then part of the
13486Gregorian year 2012 but ISO week-numbering year 2013. In the week
13487date representation, this week goes from 2013-W01-1 (December 31,
134882012) to 2013-W01-7 (January 6, 2013).
13489
13490All three ISO-8601 representations arrange the numbers from most
13491significant to least significant; as well as being unambiguous
13492representations, they are easy to sort since chronological order in
13493this formats corresponds to lexicographical order. The hyphens are
13494sometimes omitted.
13495
13496The ISO-8601 standard uses a 24 hour clock; a particular time is
13497represented by @var{hh}:@var{mm}:@var{ss} where @var{hh} is the
13498two-digit hour (from 00 to 24), @var{mm} is the two-digit minute (from
1349900 to 59) and @var{ss} is the two-digit second. The seconds or minutes
13500and seconds can be omitted, and decimals can be added. If a date with a
13501time is represented, they should be separated by a literal ``T'', so noon
13502on December 13, 2012 can be represented as 2012-12-13T12:00
13503
13504@node Date Formatting Codes, Free-Form Dates, ISO-8601, Date Formats
13426@subsubsection Date Formatting Codes 13505@subsubsection Date Formatting Codes
13427 13506
13428@noindent 13507@noindent
@@ -13463,6 +13542,10 @@ Year: ``91'' for 1991, `` 7'' for 2007, ``+23'' for 23 AD.
13463Year: ``1991'' for 1991, ``23'' for 23 AD. 13542Year: ``1991'' for 1991, ``23'' for 23 AD.
13464@item YYYY 13543@item YYYY
13465Year: ``1991'' for 1991, ``+23'' for 23 AD. 13544Year: ``1991'' for 1991, ``+23'' for 23 AD.
13545@item ZYYY
13546Year: ``1991'' for 1991, ``0023'' for 23 AD., ``0000'' for 1 BC.
13547@item IYYY
13548Year: ISO-8601 week-numbering year.
13466@item aa 13549@item aa
13467Year: ``ad'' or blank. 13550Year: ``ad'' or blank.
13468@item AA 13551@item AA
@@ -13511,6 +13594,8 @@ Day: ``07'' for 7th day of month.
13511Day: `` 7'' for 7th day of month. 13594Day: `` 7'' for 7th day of month.
13512@item W 13595@item W
13513Weekday: ``0'' for Sunday, ``6'' for Saturday. 13596Weekday: ``0'' for Sunday, ``6'' for Saturday.
13597@item w
13598Weekday: ``1'' for Monday, ``7'' for Sunday.
13514@item WWW 13599@item WWW
13515Weekday: ``SUN'' for Sunday. 13600Weekday: ``SUN'' for Sunday.
13516@item Www 13601@item Www
@@ -13521,12 +13606,16 @@ Weekday: ``sun'' for Sunday.
13521Weekday: ``SUNDAY'' for Sunday. 13606Weekday: ``SUNDAY'' for Sunday.
13522@item Wwww 13607@item Wwww
13523Weekday: ``Sunday'' for Sunday. 13608Weekday: ``Sunday'' for Sunday.
13609@item Iww
13610Week number: ISO-8601 week number, ``W01'' for week 1.
13524@item d 13611@item d
13525Day of year: ``34'' for Feb. 3. 13612Day of year: ``34'' for Feb. 3.
13526@item ddd 13613@item ddd
13527Day of year: ``034'' for Feb. 3. 13614Day of year: ``034'' for Feb. 3.
13528@item bdd 13615@item bdd
13529Day of year: `` 34'' for Feb. 3. 13616Day of year: `` 34'' for Feb. 3.
13617@item T
13618Letter: Literal ``T''.
13530@item h 13619@item h
13531Hour: ``5'' for 5 AM; ``17'' for 5 PM. 13620Hour: ``5'' for 5 AM; ``17'' for 5 PM.
13532@item hh 13621@item hh
@@ -13700,6 +13789,10 @@ command (@pxref{Mode Settings}).
13700@samp{j<, h:mm:ss>} (Julian day plus time) 13789@samp{j<, h:mm:ss>} (Julian day plus time)
13701@item 9 13790@item 9
13702@samp{YYddd< hh:mm:ss>} (Year-day format) 13791@samp{YYddd< hh:mm:ss>} (Year-day format)
13792@item 10
13793@samp{ZYYY-MM-DD Www< hh:mm>} (Org mode format)
13794@item 11
13795@samp{IYYY-Iww-w< Thh:mm:ss>} (ISO-8601 week numbering format)
13703@end table 13796@end table
13704 13797
13705@node Truncating the Stack, Justification, Date Formats, Display Modes 13798@node Truncating the Stack, Justification, Date Formats, Display Modes