From 91ff0e396787dd80a11dfb7b633db20058c3963a Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 10 Sep 2013 22:45:40 +0000 Subject: datetime (10sep13) git-svn-id: svn://tug.org/texlive/trunk@31622 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/datetime/CHANGES | 10 + Master/texmf-dist/doc/latex/datetime/README | 8 +- .../doc/latex/datetime/datetime-manual.css | 106 +- .../doc/latex/datetime/datetime-manual.html | 2605 ++++++++++---------- .../doc/latex/datetime/datetime-manual.tex | 20 +- Master/texmf-dist/doc/latex/datetime/datetime.pdf | Bin 265756 -> 308386 bytes .../doc/latex/datetime/samples/dt-lang.pdf | Bin 0 -> 30826 bytes .../doc/latex/datetime/samples/dt-lang.tex | 64 + .../doc/latex/datetime/samples/dt-sampl.pdf | Bin 0 -> 64283 bytes .../doc/latex/datetime/samples/dt-sampl.tex | 172 ++ 10 files changed, 1644 insertions(+), 1341 deletions(-) create mode 100644 Master/texmf-dist/doc/latex/datetime/samples/dt-lang.pdf create mode 100644 Master/texmf-dist/doc/latex/datetime/samples/dt-lang.tex create mode 100644 Master/texmf-dist/doc/latex/datetime/samples/dt-sampl.pdf create mode 100644 Master/texmf-dist/doc/latex/datetime/samples/dt-sampl.tex (limited to 'Master/texmf-dist/doc/latex') diff --git a/Master/texmf-dist/doc/latex/datetime/CHANGES b/Master/texmf-dist/doc/latex/datetime/CHANGES index 766dcd017f3..23292708813 100644 --- a/Master/texmf-dist/doc/latex/datetime/CHANGES +++ b/Master/texmf-dist/doc/latex/datetime/CHANGES @@ -1,5 +1,15 @@ datetime.sty history +Version 2.59: + + * Made \ordinaldate robust. + + * Renamed \ifleapyear to \ifDTleapyear to help avoid name clash + with other packages. (If \ifleapyear hasn't been defined, + it's defined to \ifDTLleapyear for backward compatibility.) + + * New: \DTifDefLoaded, \DTloadDefIfNotLoadedButExists + Version 2.58: * Added Polish days of the week (supplied by Piotr Kempa). diff --git a/Master/texmf-dist/doc/latex/datetime/README b/Master/texmf-dist/doc/latex/datetime/README index b4500574e16..c4d3134c89c 100644 --- a/Master/texmf-dist/doc/latex/datetime/README +++ b/Master/texmf-dist/doc/latex/datetime/README @@ -1,6 +1,6 @@ -LaTeX Package : datetime v 2.57 +LaTeX Package : datetime v2.59 -Last Modified : 6 Feb 2010 +Last Modified : 2013-09-10 Author : Nicola Talbot @@ -21,7 +21,7 @@ To extract the code do: latex datetime.ins -This will create datetime.sty and lots of dt-*.def files, +This will create datetime.sty datetime-defaults.sty and lots of dt-*.def files, (NB it may take a while to extract if you have a slow computer!) Move the .sty and .def files to somewhere LaTeX will find it @@ -50,4 +50,4 @@ This material is subject to the LaTeX Project Public License. See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html for the details of that license. -http://theoval.cmp.uea.ac.uk/~nlct/ +http://www.dickimaw-books.com/ diff --git a/Master/texmf-dist/doc/latex/datetime/datetime-manual.css b/Master/texmf-dist/doc/latex/datetime/datetime-manual.css index 1e03683653c..d295e3be6dc 100644 --- a/Master/texmf-dist/doc/latex/datetime/datetime-manual.css +++ b/Master/texmf-dist/doc/latex/datetime/datetime-manual.css @@ -1,38 +1,77 @@ /* start css.sty */ -.cmmi-10{font-style: italic;} -.cmr-17{font-size:170%;} -.cmr-12{font-size:120%;} -.cmr-8{font-size:80%;} -.cmsy-8{font-size:80%;} -.cmtt-12{font-size:120%;font-family: monospace;} -.cmtt-12{font-family: monospace;} -.cmtt-12{font-family: monospace;} -.cmtt-12{font-family: monospace;} -.cmtt-10{font-family: monospace;} -.cmtt-10{font-family: monospace;} -.cmtt-10{font-family: monospace;} -.cmtt-10{font-family: monospace;} -.cmti-10{ font-style: italic;} -.cmss-10{ font-family: sans-serif;} -.cmss-10{ font-family: sans-serif;} -.cmss-10{ font-family: sans-serif;} -.cmtt-9{font-size:90%;font-family: monospace;} -.cmtt-9{font-family: monospace;} -.cmtt-9{font-family: monospace;} -.cmtt-9{font-family: monospace;} -.cmr-9{font-size:90%;} -.cmss-8{font-size:80%; font-family: sans-serif;} -.cmss-8{ font-family: sans-serif;} -.cmss-8{ font-family: sans-serif;} -.cmbx-10{ font-weight: bold;} -.cmtt-8{font-size:80%;font-family: monospace;} -.cmtt-8{font-family: monospace;} -.cmtt-8{font-family: monospace;} -.cmtt-8{font-family: monospace;} -.cmssbx-10{ font-family: sans-serif; font-weight: bold;} -.cmssbx-10{ font-family: sans-serif; font-weight: bold;} -.cmssbx-10{ font-family: sans-serif; font-weight: bold;} +.futr8t-x-x-109{} +.ecss-1095{ font-family: sans-serif;} +.ecss-1095{ font-family: sans-serif;} +.ecss-1095{ font-family: sans-serif;} +.ecss-1095{ font-family: sans-serif;} +.ecss-1095{ font-family: sans-serif;} +.ecss-1095{ font-family: sans-serif;} +.ecss-1095{ font-family: sans-serif;} +.ecss-1095{ font-family: sans-serif;} +.ecsx-1095{ font-weight: bold;} +.ecsx-1095{ font-weight: bold;} +.ecsx-1095{ font-weight: bold;} +.ecsx-1095{ font-weight: bold;} +.ecsx-1095{ font-weight: bold;} +.ecsx-1095{ font-weight: bold;} +.ecsx-1095{ font-weight: bold;} +.ecsx-1095{ font-weight: bold;} +.ecsx-2074{font-size:181%; font-weight: bold;} +.ecsx-2074{ font-weight: bold;} +.ecsx-2074{ font-weight: bold;} +.ecsx-2074{ font-weight: bold;} +.ecsx-2074{ font-weight: bold;} +.ecsx-2074{ font-weight: bold;} +.ecsx-2074{ font-weight: bold;} +.ecsx-2074{ font-weight: bold;} +.futr8t-x-x-144{font-size:130%;} +.futr8t-{font-size:90%;} +.ectt-1440{font-size:127%; font-family: monospace;} +.ectt-1440{ font-family: monospace;} +.ectt-1440{ font-family: monospace;} +.ectt-1440{ font-family: monospace;} +.ectt-1440{ font-family: monospace;} +.ectt-1440{ font-family: monospace;} +.ectt-1440{ font-family: monospace;} +.ectt-1440{ font-family: monospace;} +.ectt-1095{ font-family: monospace;} +.ectt-1095{ font-family: monospace;} +.ectt-1095{ font-family: monospace;} +.ectt-1095{ font-family: monospace;} +.ectt-1095{ font-family: monospace;} +.ectt-1095{ font-family: monospace;} +.ectt-1095{ font-family: monospace;} +.ectt-1095{ font-family: monospace;} +.futmii-x-x-109{} +.futsy-x-x-109{} +.futri8t-x-x-109{} +.ectt-1000{font-size:90%; font-family: monospace;} +.ectt-1000{ font-family: monospace;} +.ectt-1000{ font-family: monospace;} +.ectt-1000{ font-family: monospace;} +.ectt-1000{ font-family: monospace;} +.ectt-1000{ font-family: monospace;} +.ectt-1000{ font-family: monospace;} +.ectt-1000{ font-family: monospace;} +.futr8t-x-x-90{font-size:81%;} +.ecss-0900{font-size:81%; font-family: sans-serif;} +.ecss-0900{ font-family: sans-serif;} +.ecss-0900{ font-family: sans-serif;} +.ecss-0900{ font-family: sans-serif;} +.ecss-0900{ font-family: sans-serif;} +.ecss-0900{ font-family: sans-serif;} +.ecss-0900{ font-family: sans-serif;} +.ecss-0900{ font-family: sans-serif;} +.futb8t-x-x-109{} +.ectt-0900{font-size:81%; font-family: monospace;} +.ectt-0900{ font-family: monospace;} +.ectt-0900{ font-family: monospace;} +.ectt-0900{ font-family: monospace;} +.ectt-0900{ font-family: monospace;} +.ectt-0900{ font-family: monospace;} +.ectt-0900{ font-family: monospace;} +.ectt-0900{ font-family: monospace;} p.noindent { text-indent: 0em } td p.noindent { text-indent: 0em; margin-top:0em; } p.nopar { text-indent: 0em; } @@ -141,6 +180,7 @@ div.thanks{text-align:left; margin-left:10%; font-size:85%; font-style:italic; } .quotation {margin-bottom:0.25em; margin-top:0.25em; margin-left:1em; } .abstract p {margin-left:5%; margin-right:5%;} div.abstract {width:100%;} +span.footnote-mark sup.textsuperscript, span.footnote-mark a sup.textsuperscript{ font-size:80%; } table.multicols { width:100%; margin-left:1em; margin-top:1em; margin-bottom:1em; } div.important { background-color:red; } /* end css.sty */ diff --git a/Master/texmf-dist/doc/latex/datetime/datetime-manual.html b/Master/texmf-dist/doc/latex/datetime/datetime-manual.html index 4fb4601e7a9..e269968cea4 100644 --- a/Master/texmf-dist/doc/latex/datetime/datetime-manual.html +++ b/Master/texmf-dist/doc/latex/datetime/datetime-manual.html @@ -1,55 +1,93 @@ - + -datetime.sty v2.58: Formatting Current Date and Time - +datetime.sty v2.59: Formatting Current Date and Time + - + - + -
+
- - +
+
-

datetime.sty v2.58: Formatting Current Date and -Time

+

datetime.sty v2.59: Formatting +Current Date and Time

Nicola L. C. Talbot -
School of Computing Sciences -
University of East Anglia +class="futr8t-x-x-144">Nicola L. C. Talbot
Norwich. NR4 7TJ. -
United Kingdom. +class="futr8t-x-x-144">Dickimaw Books
http://theoval.cmp.uea.ac.uk/~nlct/

+href="http://www.dickimaw-books.com/" class="url" >http://www.dickimaw-books.com/

2010-09-21
-
-

2013-09-10 + +

Contents

- - -

1 +

1 Introduction

-

The datetime package is a LAT

The datetime package is a LATEX2ε package that provides various different formats for +class="futmii-x-x-109">" package that provides various dierent formats +for \today, and provides commands for displaying the current time. If you only want +the time commands but not the date changing commands, you can pass the option \today, and provides commands for displaying the current time. If you only want the -time commands but not the date changing commands, you can pass the option nodate -to the package. nodate to the package. -

Since version 2.4, the datetime package has been separated into two packages: -datetime and fmtcount. When I originally created this package, I defined the commands, +

Since version 2.4, the datetime package has been separated into two packages: \ordinal etc which could be used in the definition of \today. Since then, I have -extended the number of commands available that can be used to display the value -of a LATEX counter, however it seems more appropriate to define all these +class="ecss-1095">datetime and fmtcount. When I originally created this package, I dened the +commands, \ordinal etc which could be used in the denition of \today. Since +then, I have extended the number of commands available that can be used to display +the value of a LATEX counter, however it seems more appropriate to dene all these counter-related commands in a separate package. The fmtcountfmtcount package is now distributed separately from the datetime package, and will also need to be +class="ecss-1095">datetime package, and will also need to be installed. -

As from version 2.42, the datetime package is now compatible with babel, however -you must load the datetime package after the babel package. For example: +

As from version 2.42, the datetime package is now compatible with babel, +however you must load the datetime package after the babel package. For +example: -

-
+
\usepackage[francais]{babel}  
\usepackage{datetime}
-

-

+

+

-

Top

2 Predefined Date Formats

-

There are various declarations that change the effect of \today

Top

2 Predened Date Formats

+

There are various declarations that change the eect of \today. The change can be localised by placing the declaration within a group. -

As from version 2.43, the numerical date formats (such as \ddmmyyyydate

As from version 2.43, the numerical date formats (such as \ddmmyyyydate) use the command -


\dateseparator 


\dateseparator  \dateseparator

-

-to separate the numbers. So, for example, if you want to hyphens instead of slashes, you -can do: +class="ectt-1095">\dateseparator


+

+to separate the numbers. So, for example, if you want to hyphens instead of slashes, +you can do: -

-
+
\renewcommand{\dateseparator}{-}
-

-

+

+

-

Top

2.1

Top

2.1 ISO format

-


\yyyymmdddate 


\yyyymmdddate  \yyyymmdddate

-

-This declaration will redefine \today\yyyymmdddate


+

+This declaration will redene \today to produce the current date displayed in -the form 2000/03/08. (You can redefine \dateseparator\dateseparator to - to change to +class="ectt-1095">- to change to 2000-03-08.) -

+

-

Top

2.2

Top

2.2 Day⟩⟨Month⟩⟨Yearformats

-


\longdate hDayihMonthihYeari formats

+


\longdate  \longdate

-

-This declaration will redefine \today to produce the current date displayed in the form -Wednesday 8th March, 2000 if the package option dayofweek\longdate


+

+This declaration will redene \today to produce the current date displayed in the +form Wednesday 8th March, 2000 if the package option dayofweek is used, or 8th March, 2000 -if the package option nodayofweekth +March, 2000 if the package option nodayofweek is used. -


\shortdate 


\shortdate  \shortdate

-

-This declaration will redefine \today to produce the current date displayed in the form -Wed 8th Mar, 2000 if the package option dayofweek\shortdate


+

+This declaration will redene \today to produce the current date displayed in the +form Wed 8th Mar, 2000 if the package option dayofweek is used, or 8th Mar, 2000 if the -package option nodayofweekth Mar, 2000 if +the package option nodayofweek is used. -


\ddmmyyyydate 


\ddmmyyyydate  \ddmmyyyydate

-

-This declaration will redefine \today to produce the current date displayed in the form -08/03/2000. -


\dmyyyydate \ddmmyyyydate

+

+This declaration will redene \today to produce the current date displayed in the +form 08/03/2000. +


\dmyyyydate  \dmyyyydate

-

-This declaration will redefine \today to produce the current date displayed in the form -8/3/2000. -


\ddmmyydate \dmyyyydate

+

+This declaration will redene \today to produce the current date displayed in the +form 8/3/2000. +


\ddmmyydate  \ddmmyydate

-

-This declaration will redefine \today to produce the current date displayed in the form -08/03/00. -


\dmyydate  \dmyydate

+class="ectt-1095">\ddmmyydate

- -

-This declaration will redefine \today to produce the current date displayed in the form -8/3/00. -


\textdate 

+This declaration will redene \today to produce the current date displayed in the +form 08/03/00. +


\dmyydate  \dmyydate

+

+This declaration will redene \today to produce the current date displayed in the +form 8/3/00. +


\textdate  \textdate

-

-This declaration will redefine \today to produce the current date displayed -in the form: Wednesday the Eighth of March, Two Thousand if the package +class="ectt-1095">\textdate


+

+This declaration will redene \today to produce the current date displayed in +the form: Wednesday the Eighth of March, Two Thousand if the package option dayofweekdayofweek is used, or Eighth of March, Two Thousand if the package option nodayofweeknodayofweek is used. Note that \textdate is defined for use with -English, it won’t look right if it is used when another language has been +class="ectt-1095">\textdate is dened for use with +English, it won't look right if it is used when another language has been selected1. -If you want to define a similar command for another language, you will first need to +If you want to dene a similar command for another language, you will rst need to check that the fmtcountfmtcount package supports that language. -

+

-

Top

2.3

Top

2.3 Month⟩⟨Day⟩⟨Yearformats

-


\usdate hMonthihDayihYeari formats +


\usdate  \usdate

-

-This declaration will redefine \today to produce the current date displayed in the form -March 8, 2000. (As T\usdate


+

+This declaration will redene \today to produce the current date displayed in the +form March 8, 2000. (As TEX and LATEX do by default.) -


\mmddyyyydate 


\mmddyyyydate  \mmddyyyydate

-

-This declaration will redefine \today to produce the current date displayed in the form -03/08/2000. -


\mdyyyydate \mmddyyyydate

+

+This declaration will redene \today to produce the current date displayed in the +form 03/08/2000. +


\mdyyyydate  \mdyyyydate

-

-This declaration will redefine \today to produce the current date displayed in the form -3/8/2000. -


\mmddyydate \mdyyyydate

+

+This declaration will redene \today to produce the current date displayed in the +form 3/8/2000. +


\mmddyydate  \mmddyydate

-

-This declaration will redefine \today to produce the current date displayed in the form -03/08/00. -


\mdyydate \mmddyydate

+

+This declaration will redene \today to produce the current date displayed in the +form 03/08/00. +


\mdyydate  \mdyydate

-

-This declaration will redefine \today to produce the current date displayed in the form -3/8/00. -

-

-

Top

2.4 Dates defined by babel

-

In addition to the above, the declarations \datelangare available for all languages -defined either by calling babel prior to datetime or by passing the language name as an +class="ectt-1095">\mdyydate


+

+This declaration will redene \today to produce the current date displayed in the +form 3/8/00. - -option to datetime. See §5 Defining New Date Formats if you want to define your own -customised date format. -

+

+

+

Top

2.4 Dates dened by babel

+

In addition to the above, the declarations \datehlangi are available for all languages +dened either by calling babel prior to datetime or by passing the language name as +an option to datetime. See 5 Dening New Date Formats if you want to dene your +own customised date format. +

-

Top

3

Top

3 Time Commands

-

The current time is displayed using the command -


\currenttime 

The current time is displayed using the command +


\currenttime  \currenttime

-

-

A specific time can be displayed using the command -


\formattime \currenttime

+

+

A specic time can be displayed using the command +


\formattime  \formattime{hour}{minute}{second}

-

+class="ectt-1095">\formattime{hhouri}{hminutei}{hsecondi}


+

where houris a number from 0 to 23, and minuteand secondare numbers +class="futsy-x-x-109">hhouri is a number from 0 to 23, and hminutei and hsecondi are numbers from 0 to 59. -

The format can be changed using the declaration -


\settimeformat 

The format can be changed using the declaration +


\settimeformat  \settimeformat{style}

-

+class="ectt-1095">\settimeformat{hstylei}


+

where styleis the name of the format. Predefined formats are: +class="futsy-x-x-109">hstylei is the name of the format. Predened formats are:

xxivtime
xxivtime
Twenty-four hour time in the form 22:28 (Default)
hhmmsstime
hhmmsstime
Twenty-four hour time in the form 22:28:00
ampmtime
ampmtime
Twelve hour time in the form 10:28pm
oclock
Displays the current time as a string, e.g. Twenty-Eight minutes past Ten - in the afternoon.
-

New time formats can be defined using the command: -


\newtimeformat oclock
Displays the current time as a string, e.g. Twenty-Eight minutes past + Ten in the afternoon.
+ + +

New time formats can be dened using the command: +


\newtimeformat  \newtimeformat{name}{format}

-

+class="ectt-1095">\newtimeformat{hnamei}{hformati}


+

where nameis the name of the new format (used in \settimeformat), and format -is how to format the time. Within formatyou can use the counters HOUR (number of -hours after midnight), MINUTE (number of minutes past the hour), SECOND (number -of seconds) HOURXII (number of hours after midnight/midday), TOHOUR (the next -hour) and TOMINUTE (number of minutes to the next hour), and the corresponding -commands: \THEHOURhnamei is the name of the new format (used in \settimeformat), and +hformati is how to format the time. Within hformati you can use the counters HOUR +(number of hours after midnight), MINUTE (number of minutes past the hour), +SECOND (number of seconds) HOURXII (number of hours after midnight/midday), +TOHOUR (the next hour) and TOMINUTE (number of minutes to the next hour), +and the corresponding commands: \THEHOUR, \THEMINUTE\THEMINUTE, \THESECOND, \THEHOURXII, \THETOHOUR and +class="ectt-1095">\THESECOND, \THETOMINUTE\THEHOURXII, \THETOHOUR and \THETOMINUTE. -

For example, to define a new time format that uses a dot instead of a colon: +

For example, to dene a new time format that uses a dot instead of a colon: -

-
+
\newtimeformat{dottime}{\twodigit{\THEHOUR}.\twodigit{\THEMINUTE}}
-

You then need to switch to this new format before you can use it: +

You then need to switch to this new format before you can use it: -

-
+
\settimeformat{dottime}  
\currenttime
-

-

As from version 2.43, if you only want to change the separator, you can simply -redefine -


\timeseparator 

+

As from version 2.43, if you only want to change the separator, you can simply +redene +


\timeseparator  \timeseparator

-

-instead of defining a new time format. For example: +class="ectt-1095">\timeseparator


+

+instead of dening a new time format. For example: -

-
+
\renewcommand{\timeseparator}{.}
-

The xxivtime format will now work like the dottime format defined above. -

+

The xxivtime format will now work like the dottime format dened above. +

-

Top

4

Top

4 Formating Dates

-


\pdfdate 


\pdfdate  \pdfdate

-

+class="ectt-1095">\pdfdate


+

This command2 -prints the date in the format required for PDF files, e.g. if the date is 1 May 2004 and +prints the date in the format required for PDF les, e.g. if the date is 1 May 2004 and time is 22:02, \pdfdate will print 20040501220200. The reason this date format is -separate from all the others is because the other form doesn’t get properly expanded by -PDFTEX. (This command is defined regardless of whether the package option nodate -is called.) Example: +class="ectt-1095">\pdfdate will print 20040501220200. The reason this date format is +separate from all the others is because the other form doesn't get properly expanded +by PDFTEX. (This command is dened regardless of whether the package option +nodate is called.) Example: -

-
+
\pdfinfo{  
   /Author (Me)  
   /Title (A Sample Document) @@ -760,301 +787,296 @@ is called.) Example:  
   /ModDate (D:\pdfdate)  
}
-

Note that PDFT

Note that PDFTEX introduced the new primitive \pdfcreationdate in +class="ectt-1095">\pdfcreationdate in version 1.30.0, so \pdfdate isn’t required with newer versions of PDFT\pdfdate isn't required with newer versions of PDFTEX. (\pdfcreationdate is better than \pdfdate as it also stores the time zone.) -

There are two commands that print the name of the current month: -



+

prints the current month name in full, e.g. August, and -


\shortmonthname 


\shortmonthname  \shortmonthname[num]

-

+class="ectt-1095">\shortmonthname[hnumi]


+

prints the abbreviated month name, e.g. Aug. Both \monthname and \shortmonthname -take an optional argument (a number from 1 to 12) if the name of a specific +class="ectt-1095">\monthname and \shortmonthname +take an optional argument (a number from 1 to 12) if the name of a specic month is required. For example, \monthname[6] will produced the output: +class="ectt-1095">\monthname[6] will produced the output: June. -

The day of the week is computed using the algorithm documented at +

The day of the week is computed using the algorithm documented at http://userpages.wittenburg.edu/bshelburne/Comp150/DayOfWeek.htm. This -algorithm works for any date between 1st Jan, 1901 and 31st Dec, 2099. The following -macros display the day of week for a given date: -


\dayofweekname http://userpages.wittenburg.edu/bshelburne/Comp150/DayOfWeek.htm. +This algorithm works for any date between 1st Jan, 1901 and 31st Dec, 2099. The +following macros display the day of week for a given date: +


\dayofweekname  \dayofweekname{day}{month}{year}

-

-prints the day of week for the specified date. For example, +class="ectt-1095">\dayofweekname{hdayi}{hmonthi}{hyeari}


+

+prints the day of week for the specied date. For example, -

-
+
\dayofweekname{31}{10}{2002}
-

will produce the output: Thursday. -


\shortdayofweekname 

will produce the output: Thursday. +


\shortdayofweekname  \shortdayofweeknameday{month}{year}

-

-prints the abbreviated name for the day of week for the specified date. For +class="ectt-1095">\shortdayofweeknamehdayi{hmonthi}{hyeari} +


+

+prints the abbreviated name for the day of week for the specied date. For example -

-
+
\shortdayofweekname{31}{10}{2002}
-

will produce the output: Thu. -


\ifshowdow 

will produce the output: Thu. +


\ifshowdow  \ifshowdow

-

+class="ectt-1095">\ifshowdow


+

This TEX conditional can be used to determine whether or not the option dayofweekdayofweek has been passed to the package. For example: -

-
+
\ifshowdow\dayofweekname{31}{10}{2002} \fi
-

will only display the day of week if the dayofweek

will only display the day of week if the dayofweek option was passed to datetime. -Alternatively, you can use David Carlisle’s ifthendatetime. +Alternatively, you can use David Carlisle's ifthen package: -

-
+
\ifthenelse{\boolean{showdow}}{\dayofweekname{31}{10}{2002} }{}
-

-

The command -


\ordinaldate 

+

The command +


\ordinaldate  \ordinaldate{number}

-

+class="ectt-1095">\ordinaldate{hnumberi}


+

displays numberas a date-type ordinal. If the current language is English, this will +class="futsy-x-x-109">hnumberi as a date-type ordinal. If the current language is English, this will simply pass the argument to \ordinalnum (defined in the fmtcount\ordinalnum (dened in the fmtcount package), if the current language is Breton, Welsh or French, a superscript will only be added if numberis 1, otherwise only numberwill be displayed. -

The macrohnumberi is 1, otherwise only hnumberi will be displayed. +

The macro3 -


\formatdate 


\formatdate  \formatdate{day}{month}{year}

-

-formats the specified date according to the current format of +class="ectt-1095">\formatdate{hdayi}{hmonthi}{hyeari}


+

+formats the specied date according to the current format of \today\today4. (Arguments must all be integers.) For example, in combination with \longdate\longdate, the command -

-
+
\formatdate{27}{9}{2004}
-

will produce the output: Monday 27th September, 2004. -

You can ensure that a number is displayed with at least two digits using the +

will produce the output: Monday 27th September, 2004. +

You can ensure that a number is displayed with at least two digits using the command -


\twodigit 


\twodigit  \twodigit{num}

-

-

+class="ectt-1095">\twodigit{hnumi}


+

+

-

Top

5 Defining New Date Formats

-

New date formats can be defined using the command: -


\newdateformat 

Top

5 Dening New Date Formats

+

New date formats can be dened using the command: +


\newdateformat  \newdateformat{name}{format}

-

+class="ectt-1095">\newdateformat{hnamei}{hformati}


+

where nameis the name of the new format, and formatis how to format the date. +class="futsy-x-x-109">hnamei is the name of the new format, and hformati is how to format the date. Within the argument formatyou can use the commands \THEDAYhformati you can use the commands \THEDAY, \THEMONTH and -\THEYEAR to represent the relevant day, month and year, or you can use the counters -DAY\THEMONTH +and \THEYEAR to represent the relevant day, month and year, or you can +use the counters DAY, MONTHMONTH and YEARYEAR if you want to use \ordinal etc. Once you have defined the -new date format, you can then switch to it using the declaration \name(i.e. the -name you specified preceded by a backslash), and subsequent calls to \today and -\formatdate will use your new format. -

For example, suppose you want to define a new date format called, say, mydate, that -will typeset the date in the form: 8-3-2002, then you can do: +class="ectt-1095">\ordinal +etc. Once you have dened the new date format, you can then switch to it +using the declaration \hnamei (i.e. the name you specied preceded by a +backslash), and subsequent calls to \today and \formatdate will use your new +format. +

For example, suppose you want to dene a new date format called, say, mydate, +that will typeset the date in the form: 8-3-2002, then you can do: -

-
+
\newdateformat{mydate}{\THEDAY-\THEMONTH-\THEYEAR}
-

\newdateformat will then define the declaration \mydate which can be used to switch -to your new format. In the following example, two new date formats are defined, -and they are then selected to produce two different formats for the current +

\newdateformat will then dene the declaration \mydate which can be used to +switch to your new format. In the following example, two new date formats are +dened, and they are then selected to produce two dierent formats for the current date: -

-
+
\newdateformat{dashdate}{%  
\twodigit{\THEDAY}-\twodigit{\THEMONTH}-\THEYEAR}  
\newdateformat{usvardate}{% @@ -1062,591 +1084,585 @@ date:  
Dash: \dashdate\today.  
US: \usvardate\today.
-

If the current date is, say, 8th March, 2002, the above code will produce the following: +

If the current date is, say, 8th March, 2002, the above code will produce the following: Dash: 08-03-2002. US: March 8th, 2002. -

Note that \THEDAYth, 2002. +

Note that \THEDAY etc and DAYDAY etc have no real meaning outside \newdateformat\newdateformat (this is why they are in uppercase). Incidentally, the dashdate format is not really +class="ectt-1095">dashdate format is not really necessary, as you can achieve this format using: -

-
+
\renewcommand{\dateseparator}{-}  
\ddmmyyyydate
-

-

Another note: in the above code, \ordinal was used to illustrate the use of the DAY -counter. It is better to use \ordinaldate

+

Another note: in the above code, \ordinal was used to illustrate the use of the +DAY counter. It is better to use \ordinaldate instead: -

-
+
\newdateformat{usvardate}{%  
\monthname[\THEMONTH] \ordinaldate{\THEDAY}, \THEYEAR}
-

-

+

+

-

Top

6

Top

6 Saving Dates

-

It is possible to save a date for later use using the command: +

It is possible to save a date for later use using the command: 5 -


\newdate 


\newdate  \newdate{name}{day}{month}{year}

-

-

This date can later be displayed using the same format as that used by +class="ectt-1095">\newdate{hnamei}{hdayi}{hmonthi}{hyeari}


+

+

This date can later be displayed using the same format as that used by \formatdate\formatdate using the command: -


\displaydate 


\displaydate  \displaydate{name}

-

-

Individual elements of the date can be extracted using the commands: -



+

+

Individual elements of the date can be extracted using the commands: +


\getdateday  \getdateday{name}

-

-


\getdatemonth \getdateday{hnamei}

+

+


\getdatemonth  \getdatemonth{name}

-

-



+

+


\getdateyear  \getdateyear{name}

-

-

+class="ectt-1095">\getdateyear{hnamei}


+

+

-

Top

7 Predefined Names

-

The following commands are defined by the datetime package: +

Top

7 Predened Names

+

The following commands are dened by the datetime package:

- -
Default Value +class="ectt-1095">/ +class="ectt-1095">: +class="ectt-1095">am +class="ectt-1095">pm +class="ectt-1095">in the morning +class="ectt-1095">in the afternoon +class="ectt-1095">Half past +class="ectt-1095">Quarter past +class="ectt-1095">Quarter to +class="ectt-1095">Noon +class="ectt-1095">Midnight
Command NameCommand NameDefault Value
\dateseparator\dateseparator /
\timeseparator \timeseparator:
\amname \amname am
\pmname \pmname pm
\amorpmname \amorpmname \amname\amname if morning, otherwise \pmname\pmname
\amstring \amstring in the morning
\pmstring \pmstring in the afternoon
\amorpmstring \amorpmstring \amstring\amstring if morning, otherwise \pmstring\pmstring
\halfpast \halfpast Half past
\quarterpast \quarterpast Quarter past
\quarterto \quarterto Quarter to
\noon \noon Noon
\midnight \midnight Midnight
\oclockstring \oclockstring O’Clock
+class="ectt-1095">O’Clock
-

+

-

Top

8

Top

8 Package Options

-

The following options may be passed to this package: +

The following options may be passed to this package:

longlong
make \today produce long date +class="ectt-1095">\today produce long date
shortshort
make \today produce short date +class="ectt-1095">\today produce short date
yyyymmddyyyymmdd
make \today produce YYYY/MM/DD date +class="ectt-1095">\today produce YYYY/MM/DD date
ddmmyyyyddmmyyyy
make \today produce DD/MM/YYYY date +class="ectt-1095">\today produce DD/MM/YYYY date
dmyyyydmyyyy
make \today produce D/M/YYYY date +class="ectt-1095">\today produce D/M/YYYY date
ddmmyyddmmyy
make \today produce DD/MM/YY date +class="ectt-1095">\today produce DD/MM/YY date
dmyydmyy
make \today produce D/M/YY date +class="ectt-1095">\today produce D/M/YY date
texttext
make \today produce text date +class="ectt-1095">\today produce text date in UK style
usus
make \today produce US style date +class="ectt-1095">\today produce US style date + +
mmddyyyymmddyyyy
make \today produce MM/DD/YYYY date - - - +class="ectt-1095">\today produce MM/DD/YYYY date
mdyyyymdyyyy
make \today produce M/D/YYYY date +class="ectt-1095">\today produce M/D/YYYY date
mmddyymmddyy
make \today produce MM/DD/YY date +class="ectt-1095">\today produce MM/DD/YY date
mdyymdyy
make \today produce M/D/YY date +class="ectt-1095">\today produce M/D/YY date
raiseraise
make ordinal st,nd,rd,th appear as superscript
levellevel
make ordinal st,nd,rd,th appear level with rest of text
dayofweekdayofweek
make the day of week appear for \longdate\longdate, \shortdate\shortdate or \textdate\textdate
nodayofweeknodayofweek
don’t display the day of week. +class="description">don't display the day of week.
hhmmsshhmmss
make \currenttime produce hhmmsstime format +class="ectt-1095">\currenttime produce hhmmsstime format
24hr24hr
make \currenttime produce xxivtime format +class="ectt-1095">\currenttime produce xxivtime format
12hr12hr
make \currenttime produce ampmtime format +class="ectt-1095">\currenttime produce ampmtime format
oclockoclock
make \currenttime produce oclock format +class="ectt-1095">\currenttime produce oclock format
nodatenodate
Don’t redefine \today or define the month or day of week commands +class="description">Don't redene \today or dene the month or day of week commands (useful if you only want the time commands)
isoiso
as ddmmyyyy and hhmmss but also sets date separator to - and time separator - to :
-

The default options are: longas ddmmyyyy and hhmmss but also sets date separator to - and time + separator to : +

The default options are: long, raiseraise, dayofweekdayofweek and 24hr24hr. -

-

-

Top

9 Multilingual Support

- -

If you use the ngerman

+

+

Top

9 Multilingual Support

+

If you use the ngerman package, you must use datetime’s ngerman package option if you -want the date displayed in the same form as ngerman. You must also load ngerman -before you load datetime. Similarly for the german package. -

If you want to use the babeldatetime's ngerman package +option if you want the date displayed in the same form as ngerman. You +must also load ngerman before you load datetime. Similarly for the german +package. +

If you want to use the babel package, you must load it before you load the datetime +class="futri8t-x-x-109">before you load the datetime package. This is because the babelbabel \datelangcommands redefine \today, whereas the -datetime package redefines \today to use \formatdate, and the date formatting -commands (such as \longdate) redefine \formatdate rather than \today. This ensures -consistent formatting of the dates whether you use \today or \formatdate. Therefore, -the datetime package has to redefine all the \datelangcommands accordingly. Thus -the multilingual date support is mostly limited to that provided by babel. Additional -support, such as the day of week names and abbreviations, are only supplied for -those languages that I know, or that other people have been able to supply for +class="ectt-1095">\datehlangi commands redene \today, +whereas the datetime package redenes \today to use \formatdate, and the +date formatting commands (such as \longdate) redene \formatdate +rather than \today. This ensures consistent formatting of the dates whether +you use \today or \formatdate. Therefore, the datetime package has to +redene all the \datehlangi commands accordingly. Thus the multilingual date +support is mostly limited to that provided by babel. Additional support, such +as the day of week names and abbreviations, are only supplied for those +languages that I know, or that other people have been able to supply for me. -

As from v2.56, the package options supplied to datetime override babel’s date +

As from v2.56, the package options supplied to datetime override babel's date format. For example: -

-
+
\usepackage[french,spanish]{babel}  
\usepackage[ddmmyyyy]{datetime}
-

will use ddmmyyyy date format regardless of language. Note that if you use a +

will use ddmmyyyy date format regardless of language. Note that if you use a declaration instead of a package option, for example: -

-
+
\usepackage[french,spanish]{babel}  
\usepackage{datetime}  
\ddmmyyyydate
-

the date format will be switched back to \datefrench or \datespanish whenever the -language is set. You can use -


\setdefaultdate 

the date format will be switched back to \datefrench or \datespanish whenever +the language is set. You can use +


\setdefaultdate  \setdefaultdate{declaration}

-

+class="ectt-1095">\setdefaultdate{hdeclarationi}


+

to always use {declaration} whenever the language is set. For example: +class="ectt-1095">{hdeclarationi} whenever the language is set. For example: -

-
+
\setdefaultdate{\ddmmyyyydate}
-

-

The commands \monthname

+

The commands \monthname and \shortmonthname, will produce the month name in -the current language. If you want the month name in a specific language, you can -use the command \monthnamelang. For example, \monthnamefrench[6] +class="ectt-1095">\shortmonthname, will produce the month +name in the current language. If you want the month name in a specic language, +you can use the command \monthnamehlangi. For example, \monthnamefrench[6] will produce the output: juin. Note that \textdate is formatted for English -dates, and won’t look right if used with another language setting. If you want -a textual date, the fmtcount\textdate is formatted for English dates, +and won't look right if used with another language setting. If you want a +textual date, the fmtcount package (which is loaded by datetime) defines -some commands which display a number or ordinal as a word, but it only has -very limited multilingual support. See the fmtcountdatetime) denes some +commands which display a number or ordinal as a word, but it only has very +limited multilingual support. See the fmtcount documentation for further details. -

There is currently only limited multilingual support for \dayofweekname

There is currently only limited multilingual support for \dayofweekname and \shortdayofweekname\shortdayofweekname (just English, French, Portuguese, Spanish and German6). -You can add support for other languages by defining the commands \dayofweeknameidlang -and \shortdayofweeknameidlang. Note that these commands only take one -argument which should be a number from 1 to 7 indicating the day of the -week. -

You can use the following as templates. Replace english with the name of your -language (as given by \languagename\dayofweeknameidhlangi and \shortdayofweeknameidhlangi. Note that these +commands only take one argument which should be a number from 1 to 7 +indicating the day of the week. +

You can use the following as templates. Replace english with the name +of your language (as given by \languagename) and replace Sunday etc as appropriate: +class="ectt-1095">Sunday etc as +appropriate: -

-
+
\providecommand*{\dayofweeknameidenglish}[1]{%  
\ifcase#1\relax  
\or Sunday% @@ -1668,103 +1684,107 @@ class="cmtt-10">Sunday etc as appropriate:  
\or Sat%  
\fi}
-

If you want them added to future versions of datetime, please email me the -code. +

If you want them added to future versions of datetime, please post them on my feature +request form at: http://www.dickimaw-books.com/feature-request.html. +Please use LATEX commands to produce accents to ensure encoding independence. +(For example, use \’e instead of é.)

Top

10 Top

10 Registers

TEX provides \day\day, \month\month and \year\year registers. In addition, datetime provides the +class="ecss-1095">datetime provides the registers: \currenthour\currenthour, \currentminute\currentminute and \currentsecond\currentsecond. Note that old distributions of TEX will always have \currentsecond set to zero. +class="ectt-1095">\currentsecond set to zero.

+ +

Top

11 Configuration File

+href="#top">Top

11 Conguration File

As from Version 2.4, the datetime package will read in settings from the configuration -file datetime.cfg, if it exists, which will override the default package options. +class="ecss-1095">datetime package will read in settings from the conguration +le datetime.cfg, if it exists, which will override the default package options. For example, suppose you prefer a short date without the day of week by -default, you will need to create a file called datetime.cfg that contains the +default, you will need to create a le called datetime.cfg that contains the line: -

-
+
\shortdate\showdowfalse
-

The file datetime.cfg should then go somewhere on the TEX path. Now all you need -to do is: +

The le datetime.cfg should then go somewhere on the TEX path. Now all you +need to do is: -

-
+
\usepackage{datetime}

without having to specify the shortshort and nodayofweeknodayofweek options. -

You can also use this file to define and set your own date styles. For example, you -could create a configuration file that has the following lines: +

You can also use this le to dene and set your own date styles. For example, you +could create a conguration le that has the following lines: -

-
+
\newdateformat{dashdate}{\twodigit{\THEDAY}-\twodigit{\THEMONTH}-\THEYEAR}  
\dashdate

Whenever you use the datetime package, it will now use this format by default. +class="ecss-1095">datetime package, it will now use this format by default.

Top

12 Top

12 LaTeX2HTML styles

Version 2.43 and above of the datetime bundle supplies the LaTeX2HTML style file +class="ecss-1095">datetime bundle supplies the LaTeX2HTML style le datetime.perl. This file should be placed in a directory searched by LaTeX2HTML. +class="ectt-1095">datetime.perl. This le should be placed in a directory searched by LaTeX2HTML. The following limitations apply to the LaTeX2HTML styles:

    -
  • The configuration file datetime.cfg is currently ignored. You can however +
  • The conguration le datetime.cfg is currently ignored. You can however do: -
    \usepackage{datetime} @@ -1773,28 +1793,28 @@ class="cmtt-10">datetime.cfg is currently ignored. You can however

    This, I agree, is an unpleasant cludge.

  • The commands \monthnamelanguageare not implemented. +class="ectt-1095">\monthnamehlanguagei are not implemented.
  • Some of the languages are not implemented.
  • The package option nodatenodate is not implemented.

Top

13 Top

13 Troubleshooting

There is a datetimedatetime FAQ available at: http://theoval.cmp.uea.ac.uk/~nlct/latex/packages/faq/ -

http://www.dickimaw-books.com/faqs/datetimefaq.html. +

@@ -1803,26 +1823,26 @@ class="cmtt-10">http://theoval.cmp.uea.ac.uk/~nlct/latex/packages/faq/Top

Index

A +class="futb8t-x-x-109">A

-
\amname  \amname  1, 2
\amorpmname  \amorpmname  3
\amorpmstring  \amorpmstring  4
\amstring  \amstring  5, 6

B +class="futb8t-x-x-109">B babel package  babel package  7, 8, 9, 10, 11, 12, 13
+ +

C +class="futb8t-x-x-109">C \currenthour  \currenthour  14
- - - \currentminute  \currentminute  15
\currentsecond  \currentsecond  16
\currenttime  \currenttime  17
+class="futri8t-x-x-109">17

D +class="futb8t-x-x-109">D \dateseparator  \dateseparator  18, 18, 19, 20
datetime package  datetime package  21, 22, 23
\day  \day  24
DAY counter  DAY counter  25, 26, 27
\dayofweekname  \dayofweekname  28, 28, 29
\ddmmyydate  \ddmmyydate  30
+class="futri8t-x-x-109">30
\ddmmyyyydate  \ddmmyyyydate  31, 32
+class="futri8t-x-x-109">32
\displaydate  \displaydate  33
+class="futri8t-x-x-109">33
\dmyydate  \dmyydate  34
+class="futri8t-x-x-109">34
\dmyyyydate  \dmyyyydate  35
+class="futri8t-x-x-109">35

F +class="futb8t-x-x-109">F fmtcount package  fmtcount package  36, 37, 38, 40, 41, 42
\formatdate  \formatdate  43, 43, 44, 45, 46, 47
\formattime  \formattime  48
+class="futri8t-x-x-109">48

G +class="futb8t-x-x-109">G german package  german package  49
\getdateday  \getdateday  50
+class="futri8t-x-x-109">50
\getdatemonth  \getdatemonth  51
+class="futri8t-x-x-109">51
\getdateyear  \getdateyear  52
+class="futri8t-x-x-109">52

H +class="futb8t-x-x-109">H \halfpast  \halfpast  53
HOUR counter  HOUR counter  54
HOURXII counter  HOURXII counter  55

I +class="futb8t-x-x-109">I \ifshowdow  \ifshowdow  56
+class="futri8t-x-x-109">56
+ + ifthen package  ifthen package  57

L +class="futb8t-x-x-109">L \languagename  \languagename  58
\longdate  \longdate  59, 59, 60, 61, 62, 63
- - -

M +class="futb8t-x-x-109">M \mdyydate  \mdyydate  64
+class="futri8t-x-x-109">64
\mdyyyydate  \mdyyyydate  65
+class="futri8t-x-x-109">65
\midnight  \midnight  66
MINUTE counter  MINUTE counter  67
\mmddyydate  \mmddyydate  68
+class="futri8t-x-x-109">68
\mmddyyyydate  \mmddyyyydate  69
+class="futri8t-x-x-109">69
\month  \month  70
MONTH counter  MONTH counter  71
\monthname  \monthname  72, 72, 73

N +class="futb8t-x-x-109">N \newdate  \newdate  74
+class="futri8t-x-x-109">74
\newdateformat  \newdateformat  75, 75, 76, 77
\newtimeformat  \newtimeformat  78
+class="futri8t-x-x-109">78
ngerman package  ngerman package  79, 80, 81
\noon  \noon  82

O +class="futb8t-x-x-109">O \oclockstring  \oclockstring  83
\ordinal  \ordinal  84, 85, 86
\ordinaldate  \ordinaldate  87, 87, 88
\ordinalnum  \ordinalnum  89

P +class="futb8t-x-x-109">P package options:
    12hr  12hr  90
    24hr  24hr  91, 92
    dayofweek  dayofweek  93, 94, 95, 97, 98, 99
    ddmmyy  ddmmyy  100
    ddmmyyyy  ddmmyyyy  101, 102
    dmyy  dmyy  103
    dmyyyy  dmyyyy  104
+ +     hhmmss  hhmmss  105, 106
    iso  iso  107
    level  level  108
    long  long  109, 110
    mdyy  mdyy  111
    mdyyyy  mdyyyy  112
    mmddyy  mmddyy  113
    mmddyyyy  mmddyyyy  114
- - -     ngerman  ngerman  115
    nodate  nodate  116, 117, 118
    nodayofweek  nodayofweek  119, 120, 121, 122, 123
    oclock  oclock  124
    raise  raise  125, 126
    short  short  127, 128
    text  text  129
    us  us  130
    yyyymmdd  yyyymmdd  131
\pdfdate  \pdfdate  132
+class="futri8t-x-x-109">132
\pmname  \pmname  133, 134
\pmstring  \pmstring  135, 136

Q +class="futb8t-x-x-109">Q \quarterpast  \quarterpast  137
\quarterto  \quarterto  138
-

S +

S SECOND counter  SECOND counter  139
seminar package  seminar package  140
\setdefaultdate  \setdefaultdate  141
+class="futri8t-x-x-109">141
\settimeformat  \settimeformat  142, 142, 143
\shortdate  \shortdate  144, 144, 145
\shortdayofweekname  \shortdayofweekname  146, 146, 147
\shortmonthname  \shortmonthname  148, 148, 149

T +class="futb8t-x-x-109">T \textdate  \textdate  150, 150, 151, 152
\THEDAY  \THEDAY  153, 154
\THEHOUR  \THEHOUR  155
\THEHOURXII  \THEHOURXII  156
\THEMINUTE  \THEMINUTE  157
\THEMONTH  \THEMONTH  158
+ + \THESECOND  \THESECOND  159
\THETOHOUR  \THETOHOUR  160
\THETOMINUTE  \THETOMINUTE  161
\THEYEAR  \THEYEAR  162
\timeseparator  \timeseparator  163, 163, 164
\today  \today  165, 166, 167, 179, < href="datetime-manual.html#dx1-14008" >180, 181
TOHOUR counter  TOHOUR counter  182
TOMINUTE counter  TOMINUTE counter  183
\twodigit  \twodigit  184
+class="futri8t-x-x-109">184

U - - - +class="futb8t-x-x-109">U \usdate  \usdate  185
+class="futri8t-x-x-109">185

Y +class="futb8t-x-x-109">Y \year  \year  186
YEAR counter  YEAR counter  187
\yyyymmdddate  \yyyymmdddate  188
+class="futri8t-x-x-109">188

-

1in fact, you may get an error from the fmtcount

+1in fact, you may get an error from the fmtcount package if you are using a language that it doesn’t -support.

-

2thanks to Ulrich Dirr for asking about this

-

3Note the name change since version 1.1. The command name was changed from \thedate to -\formatdate to avoid a name clash when using the seminarpackage if you are using a language that it doesn't + support.

+2thanks to Ulrich Dirr for asking about this

+3Note the name change since version 1.1. The command name was changed from \thedate to + \formatdate to avoid a name clash when using the seminar class file.

-

4To be more precise, \todayclass le.

+4To be more precise, \today is defined to be \formatdateis dened to be \formatdate{\day}{\month}{\year} where -\longdate{\day}{\month}{\year} where + \longdate etc change the definition of \formatdate

-

5Thanks to Denis Bitouzé for asking about this

-

6thanks to Uwe Bieling for supplying the German names

+class="futr8t-x-x-90">etc change the denition of \formatdate

+5Thanks to Denis Bitouzé for asking about this

+6thanks to Uwe Bieling for supplying the German names

diff --git a/Master/texmf-dist/doc/latex/datetime/datetime-manual.tex b/Master/texmf-dist/doc/latex/datetime/datetime-manual.tex index f7e338167b8..f65173bbfdb 100644 --- a/Master/texmf-dist/doc/latex/datetime/datetime-manual.tex +++ b/Master/texmf-dist/doc/latex/datetime/datetime-manual.tex @@ -14,15 +14,12 @@ \RecordChanges \OnlyDescription -\title{datetime.sty v2.58: +\title{datetime.sty v2.59: Formatting Current Date and Time} \author{Nicola L. C. Talbot\\[10pt] - School of Computing Sciences\\ - University of East Anglia\\ - Norwich. NR4 7TJ.\\ - United Kingdom.\\ - \url{http://theoval.cmp.uea.ac.uk/~nlct/}} - \date{2010-09-21} + Dickimaw Books\\ + \url{http://www.dickimaw-books.com/}} + \date{2013-09-10} \maketitle \tableofcontents \section{Introduction} @@ -489,7 +486,7 @@ package: \item[\pkgopt{dmyyyy}] make \cs{today} produce D/M/YYYY date \item[\pkgopt{ddmmyy}] make \cs{today} produce DD/MM/YY date \item[\pkgopt{dmyy}] make \cs{today} produce D/M/YY date -\item[\pkgopt{text}] make \cs{today} produce text date +\item[\pkgopt{text}] make \cs{today} produce text date in UK style \item[\pkgopt{us}] make \cs{today} produce US style date \item[\pkgopt{mmddyyyy}] make \cs{today} produce MM/DD/YYYY date \item[\pkgopt{mdyyyy}] make \cs{today} produce M/D/YYYY date @@ -621,7 +618,10 @@ etc as appropriate: \fi} \end{verbatim} If you want them added to future versions of -\sty{datetime}, please email me the code. +\sty{datetime}, please post them on my feature request form at: +\url{http://www.dickimaw-books.com/feature-request.html}. +Please use \LaTeX\ commands to produce accents to ensure encoding +independence. (For example, use \verb|\'e| instead of \'{e}.) \section{Registers} @@ -692,7 +692,7 @@ implemented. \section{Troubleshooting} There is a \sty{datetime} FAQ available at: -\url{http://theoval.cmp.uea.ac.uk/~nlct/latex/packages/faq/} +\url{http://www.dickimaw-books.com/faqs/datetimefaq.html}. \StopEventually{\phantomsection \addcontentsline{toc}{section}{Index}\PrintIndex diff --git a/Master/texmf-dist/doc/latex/datetime/datetime.pdf b/Master/texmf-dist/doc/latex/datetime/datetime.pdf index 0114d08f723..8fa5b900f5f 100644 Binary files a/Master/texmf-dist/doc/latex/datetime/datetime.pdf and b/Master/texmf-dist/doc/latex/datetime/datetime.pdf differ diff --git a/Master/texmf-dist/doc/latex/datetime/samples/dt-lang.pdf b/Master/texmf-dist/doc/latex/datetime/samples/dt-lang.pdf new file mode 100644 index 00000000000..ac64e3398c9 Binary files /dev/null and b/Master/texmf-dist/doc/latex/datetime/samples/dt-lang.pdf differ diff --git a/Master/texmf-dist/doc/latex/datetime/samples/dt-lang.tex b/Master/texmf-dist/doc/latex/datetime/samples/dt-lang.tex new file mode 100644 index 00000000000..38b643ccb07 --- /dev/null +++ b/Master/texmf-dist/doc/latex/datetime/samples/dt-lang.tex @@ -0,0 +1,64 @@ +%% +%% This is file `dt-lang.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% datetime.dtx (with options: `dt-lang.tex,package') +%% +%% datetime.dtx +%% Copyright 2013 Nicola Talbot +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license of (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Nicola Talbot. +%% +%% This work consists of the files datetime.dtx and datetime.ins and the derived files datetime-defaults.sty, datetime.sty, dt-american.def, dt-australian.def, dt-austrian.def, dt-bahasa.def, dt-basque.def, dt-breton.def, dt-british.def, dt-bulgarian.def, dt-canadian.def, dt-catalan.def, dt-croatian.def, dt-czech.def, dt-danish.def, dt-dutch.def, dt-esperanto.def, dt-estonian.def, dt-finnish.def, dt-french.def, dt-galician.def, dt-german.def, dt-greek.def, dt-hebrew.def, dt-icelandic.def, dt-irish.def, dt-italian.def, dt-latin.def, dt-lsorbian.def, dt-magyar.def, dt-naustrian.def, dt-newzealand.def, dt-ngerman.def, dt-norsk.def, dt-polish.def, dt-portuges.def, dt-romanian.def, dt-russian.def, dt-samin.def, dt-scottish.def, dt-serbian.def, dt-slovak.def, dt-slovene.def, dt-spanish.def, dt-swedish.def, dt-turkish.def, dt-UKenglish.def, dt-ukraineb.def, dt-USenglish.def, dt-usorbian.def, dt-welsh.def, dt-lang.tex, dt-sampl.tex, datetime.perl. +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +\documentclass{article} + +\usepackage[T1]{fontenc} +\usepackage[french,spanish,english]{babel} +\usepackage{datetime} % Date will be language-dependent + +\begin{document} +English: \today + +\selectlanguage{french} +French: \today + +\selectlanguage{spanish} +Spanish: \today + +\begin{otherlanguage}{french} +French: \today +\end{otherlanguage} + +\today +\end{document} +\endinput +%% +%% End of file `dt-lang.tex'. diff --git a/Master/texmf-dist/doc/latex/datetime/samples/dt-sampl.pdf b/Master/texmf-dist/doc/latex/datetime/samples/dt-sampl.pdf new file mode 100644 index 00000000000..8899658bcde Binary files /dev/null and b/Master/texmf-dist/doc/latex/datetime/samples/dt-sampl.pdf differ diff --git a/Master/texmf-dist/doc/latex/datetime/samples/dt-sampl.tex b/Master/texmf-dist/doc/latex/datetime/samples/dt-sampl.tex new file mode 100644 index 00000000000..ad6ad17df6f --- /dev/null +++ b/Master/texmf-dist/doc/latex/datetime/samples/dt-sampl.tex @@ -0,0 +1,172 @@ +%% +%% This is file `dt-sampl.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% datetime.dtx (with options: `dt-sampl.tex,package') +%% +%% datetime.dtx +%% Copyright 2013 Nicola Talbot +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license of (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Nicola Talbot. +%% +%% This work consists of the files datetime.dtx and datetime.ins and the derived files datetime-defaults.sty, datetime.sty, dt-american.def, dt-australian.def, dt-austrian.def, dt-bahasa.def, dt-basque.def, dt-breton.def, dt-british.def, dt-bulgarian.def, dt-canadian.def, dt-catalan.def, dt-croatian.def, dt-czech.def, dt-danish.def, dt-dutch.def, dt-esperanto.def, dt-estonian.def, dt-finnish.def, dt-french.def, dt-galician.def, dt-german.def, dt-greek.def, dt-hebrew.def, dt-icelandic.def, dt-irish.def, dt-italian.def, dt-latin.def, dt-lsorbian.def, dt-magyar.def, dt-naustrian.def, dt-newzealand.def, dt-ngerman.def, dt-norsk.def, dt-polish.def, dt-portuges.def, dt-romanian.def, dt-russian.def, dt-samin.def, dt-scottish.def, dt-serbian.def, dt-slovak.def, dt-slovene.def, dt-spanish.def, dt-swedish.def, dt-turkish.def, dt-UKenglish.def, dt-ukraineb.def, dt-USenglish.def, dt-usorbian.def, dt-welsh.def, dt-lang.tex, dt-sampl.tex, datetime.perl. +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +\documentclass[a4paper]{article} + +\usepackage{ifpdf} +\usepackage{datetime} + +\ifpdf +\pdfinfo{ + /CreationDate (D:20040501215500Z) + /ModDate (D:\pdfcreationdate) +} +\fi + +\padzeroes[8] + +\newdateformat{dashdate}{\twodigit{\THEDAY}-\twodigit{\THEMONTH}-\THEYEAR} +\newdateformat{usvardate}{\monthname[\THEMONTH]~\ordinaldate{\THEDAY}, \THEYEAR} +\newdateformat{mydate}{\ifshowdow \dayofweekname{\THEDAY}{\THEMONTH}{\THEYEAR} \fi +\THEDAY\ \monthname[\THEMONTH], \THEYEAR} +\newdateformat{yyyymmdd}{\THEYEAR\twodigit{\THEMONTH}\twodigit{\THEDAY}} +\newdateformat{ukvardate}{\THEDAY\ \monthname[\THEMONTH]\ \THEYEAR} + +\newtimeformat{dottime}{\twodigit{\THEHOUR}.\twodigit{\THEMINUTE}} +\newtimeformat{dashtime12}{\THEHOURXII-\twodigit{\THEMINUTE}} +\newtimeformat{hhmm}{\twodigit{\THEHOUR}\twodigit{\THEMINUTE}} + +\begin{document} + +\section{Date Formats} +Default: \today. + +\begin{tabular}{ll} +\bfseries Declaration & \bfseries\verb|\today|\\ +\verb|\longdate| & \longdate\today\\ +\verb|\shortdate| & \shortdate\today\\ +\verb|\yyyymmdddate| & \yyyymmdddate\today\\ +\verb|\ddmmyyyydate| & \ddmmyyyydate\today\\ +\verb|\dmyyyydate| & \dmyyyydate\today\\ +\verb|\ddmmyydate| & \ddmmyydate\today\\ +\verb|\dmyydate| & \dmyydate\today\\ +\verb|\textdate| & \textdate\today\\ +\verb|\usdate| & \usdate\today\\ +\verb|\mmddyyyydate| & \mmddyyyydate\today\\ +\verb|\mdyyyydate| & \mdyyyydate\today\\ +\verb|\mmddyydate| & \mmddyydate\today\\ +\verb|\mdyydate| & \mdyydate\today +\end{tabular} + +\section{Time Formats} +Default: \currenttime. + +\begin{tabular}{@{\ttfamily}ll} +\bfseries\rmfamily Format & \bfseries \verb|\currenttime|\\ +hhmmsstime & \settimeformat{hhmmsstime}\currenttime\\ +xxivtime & \settimeformat{xxivtime}\currenttime\\ +ampmtime & \settimeformat{ampmtime}\currenttime\\ +oclock & \settimeformat{oclock}\currenttime +\end{tabular} + +\section{Specific Date:} + +\begin{tabular}{ll} +\bfseries Format & \bfseries \verb|\formatdate{1}{3}{2009}|\\ +\verb|\longdate| & \longdate\formatdate{1}{3}{2000}\\ +\verb|\shortdate| & \shortdate\formatdate{1}{3}{2000}\\ +\verb|\yyyymmdddate| & \yyyymmdddate\formatdate{1}{3}{2000}\\ +\verb|\ddmmyyyydate| & \ddmmyyyydate\formatdate{1}{3}{2000}\\ +\verb|\dmyyyydate| & \dmyyyydate\formatdate{1}{3}{2000}\\ +\verb|\ddmmyydate| & \ddmmyydate\formatdate{1}{3}{2000}\\ +\verb|\dmyydate| & \dmyydate\formatdate{1}{3}{2000}\\ +\verb|\textdate| & \textdate\formatdate{1}{3}{2000}\\ +\verb|\usdate| & \usdate\formatdate{1}{3}{2000}\\ +\verb|\mmddyyyydate| & \mmddyyyydate\formatdate{1}{3}{2000}\\ +\verb|\mdyyyydate| & \mdyyyydate\formatdate{1}{3}{2000}\\ +\verb|\mmddyydate| & \mmddyydate\formatdate{1}{3}{2000}\\ +\verb|\mdyydate| & \mdyydate\formatdate{1}{3}{2000} +\end{tabular} + +\section{Specific Time} + +\begin{tabular}{@{\ttfamily}ll} +\bfseries\rmfamily Format & \bfseries \verb|\formattime{15}{45}{00}|\\ +hhmmsstime & \settimeformat{hhmmsstime}\formattime{15}{45}{00}\\ +xxivtime & \settimeformat{xxivtime}\formattime{15}{45}{00}\\ +ampmtime & \settimeformat{ampmtime}\formattime{15}{45}{00}\\ +oclock & \settimeformat{oclock}\formattime{15}{45}{00} +\end{tabular} + +\vskip\baselineskip\noindent +\begin{tabular}{@{\ttfamily}ll} +\bfseries\rmfamily Format & \bfseries \verb|\formattime{0}{0}{0}|\\ +hhmmsstime & \settimeformat{hhmmsstime}\formattime{0}{0}{0}\\ +xxivtime & \settimeformat{xxivtime}\formattime{0}{0}{0}\\ +ampmtime & \settimeformat{ampmtime}\formattime{0}{0}{0}\\ +oclock & \settimeformat{oclock}\formattime{0}{0}{0} +\end{tabular} + +\vskip\baselineskip\noindent +\begin{tabular}{@{\ttfamily}ll} +\bfseries\rmfamily Format & \bfseries \verb|\formattime{12}{0}{0}|\\ +hhmmsstime & \settimeformat{hhmmsstime}\formattime{12}{0}{0}\\ +xxivtime & \settimeformat{xxivtime}\formattime{12}{0}{0}\\ +ampmtime & \settimeformat{ampmtime}\formattime{12}{0}{0}\\ +oclock & \settimeformat{oclock}\formattime{12}{0}{0} +\end{tabular} + +\section{Defining New Dates} + +\begin{tabular}{ll} +\verb|\dashdate| & \dashdate\today\\ +\verb|\usvardate| & \usvardate\today\\ +\verb|\ukvardate| & \ukvardate\today\\ +\verb|\mydate| & \mydate\today\\ +\verb|\yyyymmdd| & \yyyymmdd\today\\ +\verb|\dashdate| & \dashdate\formatdate{8}{3}{2000}\\ +\verb|\usvardate| & \usvardate\formatdate{8}{3}{2000}\\ +\verb|\mydate| & \mydate\formatdate{8}{3}{2000}\\ +\verb|\yyyymmdd| & \yyyymmdd\formatdate{8}{3}{2000} +\end{tabular} + +\section{Defining New Times} + +\begin{tabular}{@{\ttfamily}ll} +\bfseries\rmfamily Format & \bfseries \verb|\currenttime|\\ +dottime & \settimeformat{dottime}\currenttime\\ +dashtime12 & \settimeformat{dashtime12}\currenttime\\ +hhmm & \settimeformat{hhmm}\currenttime +\end{tabular} + +\end{document} +\endinput +%% +%% End of file `dt-sampl.tex'. -- cgit v1.2.3