diff options
| author | Joakim Verona | 2012-12-16 03:17:05 +0100 |
|---|---|---|
| committer | Joakim Verona | 2012-12-16 03:17:05 +0100 |
| commit | 81f3c762d2f43e60ec209af57758d1bddc78f3e1 (patch) | |
| tree | 0e7080af9e5f01ab028e49dd1de37db14f618cdf | |
| parent | 24d4008252f7c8e0d9fc4c55b46d25276b9a10c9 (diff) | |
| parent | b9d8175e56d6e6a9acd336863f420bf7cd5a471a (diff) | |
| download | emacs-81f3c762d2f43e60ec209af57758d1bddc78f3e1.tar.gz emacs-81f3c762d2f43e60ec209af57758d1bddc78f3e1.zip | |
auto upstream
| -rw-r--r-- | doc/misc/ChangeLog | 6 | ||||
| -rw-r--r-- | doc/misc/calc.texi | 95 |
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 @@ | |||
| 1 | 2012-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 | |||
| 1 | 2012-12-14 Michael Albinus <michael.albinus@gmx.de> | 7 | 2012-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 | |||
| 13417 | functions, your date formats should avoid using the @samp{#} character. | 13417 | functions, 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 | ||
| 13431 | The same date can be written down in different formats and Calc tries | ||
| 13432 | to allow you to choose your preferred format. Some common formats are | ||
| 13433 | ambiguous, however; for example, 10/11/2012 means October 11, | ||
| 13434 | 2012 in the United States but it means November 10, 2012 in | ||
| 13435 | Europe. To help avoid such ambiguities, the International Organization | ||
| 13436 | for Standardization (ISO) provides the ISO-8601 standard, which | ||
| 13437 | provides three different but easily distinguishable and unambiguous | ||
| 13438 | ways to represent a date. | ||
| 13439 | |||
| 13440 | The ISO-8601 calendar date representation is | ||
| 13441 | |||
| 13442 | @example | ||
| 13443 | @var{YYYY}-@var{MM}-@var{DD} | ||
| 13444 | @end example | ||
| 13445 | |||
| 13446 | @noindent | ||
| 13447 | where @var{YYYY} is the four digit year, @var{MM} is the two-digit month | ||
| 13448 | number (01 for January to 12 for December), and @var{DD} is the | ||
| 13449 | two-digit day of the month (01 to 31). (Note that @var{YYYY} does not | ||
| 13450 | correspond to Calc's date formatting code, which will be introduced | ||
| 13451 | later.) The year, which should be padded with zeros to ensure it has at | ||
| 13452 | least four digits, is the Gregorian year, except that the year before | ||
| 13453 | 0001 (1 AD) is the year 0000 (1 BC). The date October 11, 2012 is | ||
| 13454 | written 2012-10-11 in this representation and November 10, 2012 is | ||
| 13455 | written 2012-11-10. | ||
| 13456 | |||
| 13457 | The ISO-8601 ordinal date representation is | ||
| 13458 | |||
| 13459 | @example | ||
| 13460 | @var{YYYY}-@var{DDD} | ||
| 13461 | @end example | ||
| 13462 | |||
| 13463 | @noindent | ||
| 13464 | where @var{YYYY} is the year, as above, and @var{DDD} is the day of the year. | ||
| 13465 | The date December 31, 2011 is written 2011-365 in this representation | ||
| 13466 | and January 1, 2012 is written 2012-001. | ||
| 13467 | |||
| 13468 | The ISO-8601 week date representation is | ||
| 13469 | |||
| 13470 | @example | ||
| 13471 | @var{YYYY}-W@var{ww}-@var{D} | ||
| 13472 | @end example | ||
| 13473 | |||
| 13474 | @noindent | ||
| 13475 | where @var{YYYY} is the ISO week-numbering year, @var{ww} is the two | ||
| 13476 | digit week number (preceded by a literal ``W''), and @var{D} is the day | ||
| 13477 | of the week (1 for Monday through 7 for Sunday). The ISO week-numbering | ||
| 13478 | year is based on the Gregorian year but can differ slightly. The first | ||
| 13479 | week of an ISO week-numbering year is the week with the Gregorian year's | ||
| 13480 | first Thursday in it (equivalently, the week containing January 4); | ||
| 13481 | any day of that week (Monday through Sunday) is part of the same ISO | ||
| 13482 | week-numbering year, any day from the previous week is part of the | ||
| 13483 | previous year. For example, January 4, 2013 is on a Friday, and so | ||
| 13484 | the first week for the ISO week-numbering year 2013 starts on | ||
| 13485 | Monday, December 31, 2012. The day December 31, 2012 is then part of the | ||
| 13486 | Gregorian year 2012 but ISO week-numbering year 2013. In the week | ||
| 13487 | date representation, this week goes from 2013-W01-1 (December 31, | ||
| 13488 | 2012) to 2013-W01-7 (January 6, 2013). | ||
| 13489 | |||
| 13490 | All three ISO-8601 representations arrange the numbers from most | ||
| 13491 | significant to least significant; as well as being unambiguous | ||
| 13492 | representations, they are easy to sort since chronological order in | ||
| 13493 | this formats corresponds to lexicographical order. The hyphens are | ||
| 13494 | sometimes omitted. | ||
| 13495 | |||
| 13496 | The ISO-8601 standard uses a 24 hour clock; a particular time is | ||
| 13497 | represented by @var{hh}:@var{mm}:@var{ss} where @var{hh} is the | ||
| 13498 | two-digit hour (from 00 to 24), @var{mm} is the two-digit minute (from | ||
| 13499 | 00 to 59) and @var{ss} is the two-digit second. The seconds or minutes | ||
| 13500 | and seconds can be omitted, and decimals can be added. If a date with a | ||
| 13501 | time is represented, they should be separated by a literal ``T'', so noon | ||
| 13502 | on 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. | |||
| 13463 | Year: ``1991'' for 1991, ``23'' for 23 AD. | 13542 | Year: ``1991'' for 1991, ``23'' for 23 AD. |
| 13464 | @item YYYY | 13543 | @item YYYY |
| 13465 | Year: ``1991'' for 1991, ``+23'' for 23 AD. | 13544 | Year: ``1991'' for 1991, ``+23'' for 23 AD. |
| 13545 | @item ZYYY | ||
| 13546 | Year: ``1991'' for 1991, ``0023'' for 23 AD., ``0000'' for 1 BC. | ||
| 13547 | @item IYYY | ||
| 13548 | Year: ISO-8601 week-numbering year. | ||
| 13466 | @item aa | 13549 | @item aa |
| 13467 | Year: ``ad'' or blank. | 13550 | Year: ``ad'' or blank. |
| 13468 | @item AA | 13551 | @item AA |
| @@ -13511,6 +13594,8 @@ Day: ``07'' for 7th day of month. | |||
| 13511 | Day: `` 7'' for 7th day of month. | 13594 | Day: `` 7'' for 7th day of month. |
| 13512 | @item W | 13595 | @item W |
| 13513 | Weekday: ``0'' for Sunday, ``6'' for Saturday. | 13596 | Weekday: ``0'' for Sunday, ``6'' for Saturday. |
| 13597 | @item w | ||
| 13598 | Weekday: ``1'' for Monday, ``7'' for Sunday. | ||
| 13514 | @item WWW | 13599 | @item WWW |
| 13515 | Weekday: ``SUN'' for Sunday. | 13600 | Weekday: ``SUN'' for Sunday. |
| 13516 | @item Www | 13601 | @item Www |
| @@ -13521,12 +13606,16 @@ Weekday: ``sun'' for Sunday. | |||
| 13521 | Weekday: ``SUNDAY'' for Sunday. | 13606 | Weekday: ``SUNDAY'' for Sunday. |
| 13522 | @item Wwww | 13607 | @item Wwww |
| 13523 | Weekday: ``Sunday'' for Sunday. | 13608 | Weekday: ``Sunday'' for Sunday. |
| 13609 | @item Iww | ||
| 13610 | Week number: ISO-8601 week number, ``W01'' for week 1. | ||
| 13524 | @item d | 13611 | @item d |
| 13525 | Day of year: ``34'' for Feb. 3. | 13612 | Day of year: ``34'' for Feb. 3. |
| 13526 | @item ddd | 13613 | @item ddd |
| 13527 | Day of year: ``034'' for Feb. 3. | 13614 | Day of year: ``034'' for Feb. 3. |
| 13528 | @item bdd | 13615 | @item bdd |
| 13529 | Day of year: `` 34'' for Feb. 3. | 13616 | Day of year: `` 34'' for Feb. 3. |
| 13617 | @item T | ||
| 13618 | Letter: Literal ``T''. | ||
| 13530 | @item h | 13619 | @item h |
| 13531 | Hour: ``5'' for 5 AM; ``17'' for 5 PM. | 13620 | Hour: ``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 |