diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/datetime')
-rw-r--r-- | Master/texmf-dist/source/latex/datetime/datetime.dtx | 1377 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/datetime/datetime.ins | 16 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/datetime/datetime.perl | 2001 |
3 files changed, 920 insertions, 2474 deletions
diff --git a/Master/texmf-dist/source/latex/datetime/datetime.dtx b/Master/texmf-dist/source/latex/datetime/datetime.dtx index 8173974405b..0e11ef730c0 100644 --- a/Master/texmf-dist/source/latex/datetime/datetime.dtx +++ b/Master/texmf-dist/source/latex/datetime/datetime.dtx @@ -12,7 +12,7 @@ % -doc "datetime-manual.tex" % -author "Nicola Talbot" % datetime -% Created on 2010/9/21 10:02 +% Created on 2013/9/10 11:38 %\fi %\iffalse %<*package> @@ -35,7 +35,7 @@ %\fi % \iffalse % Doc-Source file to use with LaTeX2e -% Copyright (C) 2010 Nicola Talbot, all rights reserved. +% Copyright (C) 2013 Nicola Talbot, all rights reserved. % \fi % \iffalse %<*driver> @@ -59,15 +59,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} @@ -534,7 +531,7 @@ %\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 @@ -666,7 +663,10 @@ %\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} % @@ -737,7 +737,7 @@ %\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 @@ -748,6 +748,111 @@ %\section{The Code} %\iffalse % \begin{macrocode} +%<*datetime-defaults.sty> +% \end{macrocode} +%\fi +% Default language settings. +% \begin{macrocode} +\ProvidesPackage{datetime-defaults}[2013/09/10] +% \end{macrocode} +%\begin{macro}{\ordinaldateenglish} +% Default date ordinal: +% \begin{macrocode} +\newcommand*{\ordinaldateenglish}[1]{\ordinalnum{#1}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\monthnameenglish} +% \begin{macrocode} +\providecommand*{\monthnameenglish}[1][\month]{% + \@orgargctr=#1\relax + \ifcase\@orgargctr + \PackageError{datetime}{Invalid Month number \the\@orgargctr}{Month + numbers should go from 1 (January) to 12 (December)}% + \or January% + \or February% + \or March% + \or April% + \or May% + \or June% + \or July% + \or August% + \or September% + \or October% + \or November% + \or December% + \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% + Month numbers should go from 1 (January) to 12 (December)}% + \fi +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\shortmonthnameenglish} +%\changes{2.1}{2003/12/17}{fixed bug producing an error message +% in December} +% \begin{macrocode} +\providecommand*{\shortmonthnameenglish}[1][\month]{% + \@orgargctr=#1\relax + \ifcase\@orgargctr + \PackageError{datetime}{Invalid Month number \the\@orgargctr}{Month + numbers should go from 1 (jan) to 12 (dec)}% + \or Jan% + \or Feb% + \or Mar% + \or Apr% + \or May% + \or Jun% + \or Jul% + \or Aug% + \or Sept% + \or Oct% + \or Nov% + \or Dec% + \else% + \PackageError{datetime}% + {Invalid Month number \the\@orgargctr}% + {Month numbers should go from 1 (jan) to 12 (dec)}% +\fi +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\dayofweeknameidenglish} +% Given the day of week index, print associated the English name. +% \begin{macrocode} +\providecommand*{\dayofweeknameidenglish}[1]{% + \ifcase#1\relax + \or Sunday% + \or Monday% + \or Tuesday% + \or Wednesday% + \or Thursday% + \or Friday% + \or Saturday% + \fi +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\shortdayofweeknameidenglish} +% As before, but for abbreviated day of week name. English version: +% \begin{macrocode} +\providecommand*{\shortdayofweeknameidenglish}[1]{% + \ifcase#1\relax + \or Sun% + \or Mon% + \or Tue% + \or Wed% + \or Thu% + \or Fri% + \or Sat% +\fi} +% \end{macrocode} +%\end{macro} +%\iffalse +% \begin{macrocode} +%</datetime-defaults.sty> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} %<*datetime.sty> % \end{macrocode} %\fi @@ -755,18 +860,33 @@ % This section documents the code for \texttt{datetime.sty} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{datetime}[2010/09/21 v2.58 Date Time Package] +\ProvidesPackage{datetime}[2013/09/10 v2.59 Date Time Package] +% \end{macrocode} +%\changes{2.59}{2013/09/10}{new loads etoolbox} +% \begin{macrocode} +\RequirePackage{etoolbox} % \end{macrocode} %\texttt{fmtcount.sty} needs to be loaded here as it defines the % command \cs{fmtord} which may be redefined later: % \begin{macrocode} \RequirePackage{fmtcount} % \end{macrocode} +% In case we're using an older version of \sty{fmtcount}: +% \begin{macrocode} +\@ifundefined{@FCmodulo}% +{% + \let\@FCmodulo\@modulo +}{} +% \end{macrocode} % Need ifthen package for conditional stuff. % \begin{macrocode} \RequirePackage{ifthen} % \end{macrocode} %\subsubsection{Date Commands} +% Load defaults: +% \begin{macrocode} +\RequirePackage{datetime-defaults} +% \end{macrocode} %\begin{macro}{\if@dtl@nodate} % Define a new conditional \cs{if@dt@nodate}. If it is true, % \cs{today} will not be redefined, nor will @@ -797,34 +917,40 @@ %\changes{2.55}{2007/08/20}{fixed bug preventing multilingual support} % \begin{macrocode} \newif\if@dt@multilingual -\@ifpackageloaded{babel}{% -\@dt@multilingualtrue}{% -\@ifpackageloaded{ngerman}{% -\@dt@multilingualtrue}{\@dt@multilingualfalse}} + \@ifpackageloaded{babel}% + {% + \@dt@multilingualtrue + }% + {% + \@ifpackageloaded{ngerman}% + {\@dt@multilingualtrue}% + {\@dt@multilingualfalse}% + } % \end{macrocode} %\end{macro} % Define the \cs{ordinaldate}\meta{language} macros. These are % needed because some % languages only use an ordinal for the first day of % the month (such as french). -%\begin{macro}{\ordinaldateenglish} -% English version: -% \begin{macrocode} -\newcommand*{\ordinaldateenglish}[1]{\ordinalnum{#1}} -% \end{macrocode} -%\end{macro} -%\begin{macro}{\ordinaldate} % If |\ordinaldate|\meta{language} is not defined, then just display % the number. %\changes{2.45}{2005/05/23}{new} +%\changes{2.59}{2013/09/10}{made robust} % \begin{macrocode} -\newcommand*{\ordinaldate}[1]{% -\if@dt@multilingual -\@ifundefined{ordinaldate\languagename}{#1}{% -\csname ordinaldate\languagename\endcsname{#1}}% -\else -\ordinalnum{#1}% -\fi} +\DeclareRobustCommand*{\ordinaldate}[1]{% + \if@dt@multilingual +% \end{macrocode} +% Make sure language file has been loaded. +% \begin{macrocode} + \DTloadDefIfNotLoadedButExists{\languagename}% + \@ifundefined{ordinaldate\languagename}{#1}% + {% + \csname ordinaldate\languagename\endcsname{#1}% + }% + \else + \ordinalnum{#1}% + \fi +} % \end{macrocode} %\end{macro} %\begin{macro}{\ifshowdow} @@ -855,20 +981,22 @@ % options, babel and datetime.cfg settings.) % \begin{macrocode} \DeclareRobustCommand*{\longdate}{% -\renewcommand*{\formatdate}[3]{% -\ifshowdow\dayofweekname{##1}{##2}{##3} \fi -\@day=##1\relax\@month=##2\relax\@year=##3\relax -\ordinaldate{\the\@day}\ \monthname[\@month], \the\@year}} + \renewcommand*{\formatdate}[3]{% + \ifshowdow\dayofweekname{##1}{##2}{##3} \fi + \@day=##1\relax\@month=##2\relax\@year=##3\relax + \ordinaldate{\the\@day}\ \monthname[\@month], \the\@year}% +} % \end{macrocode} %\end{macro} %\begin{macro}{\shortdate} % Abbreviated version of above % \begin{macrocode} \DeclareRobustCommand*{\shortdate}{% -\renewcommand*{\formatdate}[3]{% -\ifshowdow\shortdayofweekname{##1}{##2}{##3} \fi -\@day=##1\relax\@month=##2\relax\@year=##3\relax -\ordinaldate{\the\@day}\ \shortmonthname[\@month], \the\@year}} + \renewcommand*{\formatdate}[3]{% + \ifshowdow\shortdayofweekname{##1}{##2}{##3} \fi + \@day=##1\relax\@month=##2\relax\@year=##3\relax + \ordinaldate{\the\@day}\ \shortmonthname[\@month], \the\@year}% +} % \end{macrocode} %\end{macro} %\begin{macro}{\twodigit} @@ -918,7 +1046,7 @@ \DeclareRobustCommand*{\ddmmyydate}{\renewcommand*{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax \@dtctr=\@year% -\@modulo{\@dtctr}{100}% +\@FCmodulo{\@dtctr}{100}% \twodigit\@day\dateseparator \twodigit\@month\dateseparator \twodigit\@dtctr}} % \end{macrocode} @@ -930,7 +1058,7 @@ \DeclareRobustCommand*{\dmyydate}{\renewcommand*{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax \@dtctr=\@year% -\@modulo{\@dtctr}{100}% +\@FCmodulo{\@dtctr}{100}% \the\@day\dateseparator \the\@month\dateseparator \twodigit\@dtctr}} % \end{macrocode} %\end{macro} @@ -981,7 +1109,7 @@ \DeclareRobustCommand*{\mmddyydate}{\renewcommand*{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax \@dtctr=\@year% -\@modulo{\@dtctr}{100}% +\@FCmodulo{\@dtctr}{100}% \twodigit\@month\dateseparator \twodigit\@day\dateseparator \twodigit\@dtctr}} % \end{macrocode} @@ -993,7 +1121,7 @@ \DeclareRobustCommand*{\mdyydate}{\renewcommand*{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax \@dtctr=\@year% -\@modulo{\@dtctr}{100}% +\@FCmodulo{\@dtctr}{100}% \the\@month\dateseparator \the\@day\dateseparator \twodigit\@dtctr}} % \end{macrocode} %\end{macro} @@ -1183,7 +1311,7 @@ give your new date format a different name}}} \currenthour=\time\relax \divide\currenthour by 60\relax \currentminute=\time\relax - \@modulo{\currentminute}{60}% + \@FCmodulo{\currentminute}{60}% \currentsecond=0\relax }{% \def\@dt@gettime#1#2#3#4#5#6#7\relax{% @@ -1213,7 +1341,7 @@ give your new date format a different name}}} \c@MINUTE=##2% \c@TOHOUR=\c@HOURXII \advance\c@TOHOUR by 1\relax -\@modulo{\c@TOHOUR}{12}% +\@FCmodulo{\c@TOHOUR}{12}% \c@TOMINUTE=\c@MINUTE \advance\c@TOMINUTE by -60\relax \multiply\c@TOMINUTE by -1\relax @@ -1394,6 +1522,9 @@ settings}} \@ifundefined{extrasaustrian}{}{% \addto\extrasaustrian{#1}% }% + \@ifundefined{extrasaustralian}{}{% + \addto\extrasaustralian{#1}% + }% \@ifundefined{extrasbahasa}{}{% \addto\extrasbahasa{#1}% }% @@ -1406,6 +1537,9 @@ settings}} \@ifundefined{extrasbulgarian}{}{% \addto\extrasbulgarian{#1}% }% + \@ifundefined{extrascanadian}{}{% + \addto\extrascanadian{#1}% + }% \@ifundefined{extrascatalan}{}{% \addto\extrascatalan{#1}% }% @@ -1466,6 +1600,9 @@ settings}} \@ifundefined{extrasngerman}{}{% \addto\extrasngerman{#1}% }% + \@ifundefined{extrasnewzealand}{}{% + \addto\extrasnewzealand{#1}% + }% \@ifundefined{extrasnorsk}{}{% \addto\extrasnorsk{#1}% }% @@ -1571,7 +1708,11 @@ settings}} % \end{macrocode} % Check whether the file has already been loaded. % \begin{macrocode} - \@ifundefined{ver@dt-#1.def}% + \DTifDefLoaded{#1}% +% \end{macrocode} +% File already loaded, so do nothing. +% \begin{macrocode} + {}% {% \InputIfFileExists{dt-#1.def}% {}% @@ -1580,13 +1721,35 @@ settings}} definition file for `#1'}% }% }% +} % \end{macrocode} -% File already loaded, so do nothing. +%\end{macro} +% +%\begin{macro}{\DTifDefLoaded} +%\changes{2.59}{2013/09/10}{new} % \begin{macrocode} - {}% +\newcommand{\DTifDefLoaded}[3]{% + \@ifundefined{ver@dt-#1.def}{#3}{#2}% } % \end{macrocode} %\end{macro} +% +%\begin{macro}{\DTloadDefIfNotLoadedButExists} +%\changes{2.59}{2013/09/10}{new} +% \begin{macrocode} +\newcommand{\DTloadDefIfNotLoadedButExists}[1]{% + \DTifDefLoaded{#1}% + {}% + {% + \bgroup + \catcode `\@ 11\relax + \InputIfFileExists{dt-#1.def}{}{}% + \egroup + }% +}% +% \end{macrocode} +%\end{macro} +% % Multilingual support. These package options shouldn't really be % needed if babel has already been loaded. % \begin{macrocode} @@ -1645,14 +1808,14 @@ settings}} % \begin{macrocode} \if@dt@nodate \PackageInfo{datetime}{option "nodate" used, so note defining -\string\dateformat} + \string\dateformat} \else % \end{macrocode} %\begin{macro}{\dateformat} % Format the given date in the given format. % \begin{macrocode} -\providecommand*{\dateformat}[4]{% -\@day=#2\relax\@month=#3\relax\@year=#4\relax#1} + \providecommand*{\dateformat}[4]{% + \@day=#2\relax\@month=#3\relax\@year=#4\relax#1} % \end{macrocode} %\end{macro} % \begin{macrocode} @@ -1666,47 +1829,31 @@ settings}} % The |nodate| option was used, so just print informative message, % and do nothing else. % \begin{macrocode} -\PackageInfo{datetime}{option "nodate" used, so not defining -\string\monthname} + \PackageInfo{datetime}{option "nodate" used, so not defining + \string\monthname} \else % \end{macrocode} -%\begin{macro}{\monthnameenglish} -% \begin{macrocode} -\providecommand*{\monthnameenglish}[1][\month]{% -\@orgargctr=#1\relax -\ifcase\@orgargctr -\PackageError{datetime}{Invalid Month number \the\@orgargctr}{Month -numbers should go from 1 (January) to 12 (December)}% -\or January% -\or February% -\or March% -\or April% -\or May% -\or June% -\or July% -\or August% -\or September% -\or October% -\or November% -\or December% -\else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% -Month numbers should go from 1 (January) to 12 (December)}% -\fi} -% \end{macrocode} -%\end{macro} %\begin{macro}{\monthname} %Define \verb|\monthname| to be language dependent. If there %is no \verb|\monthname|\meta{language}, defaults to English. % \begin{macrocode} \newcommand*{\monthname}[1][\month]{% -\if@dt@multilingual -\@ifundefined{monthname\languagename}{% -\PackageWarning{datetime}{No month names provided for language -'\languagename'}% -\monthnameenglish[#1]}{\csname monthname\languagename\endcsname[#1]}% -\else -\monthnameenglish[#1]% -\fi} + \if@dt@multilingual +% \end{macrocode} +% Make sure language file has been loaded. +% \begin{macrocode} + \DTloadDefIfNotLoadedButExists{\languagename}% + \@ifundefined{monthname\languagename}% + {% + \PackageWarning{datetime}{No month names provided for language + '\languagename'}% + \monthnameenglish[#1]% + }% + {\csname monthname\languagename\endcsname[#1]}% + \else + \monthnameenglish[#1]% + \fi +} % \end{macrocode} %\end{macro} % End of |\if@dt@nodate| else part: @@ -1721,51 +1868,33 @@ Month numbers should go from 1 (January) to 12 (December)}% % The |nodate| option was used, so just print informative message, % and do nothing else. % \begin{macrocode} -\PackageInfo{datetime}{option "nodate" used, so not defining -\protect\shortmonthname} + \PackageInfo{datetime}{option "nodate" used, so not defining + \protect\shortmonthname} \else % \end{macrocode} -%\begin{macro}{\shortmonthnameenglish} -%\changes{2.1}{2003/12/17}{fixed bug producing an error message -% in December} -% \begin{macrocode} -\providecommand*{\shortmonthnameenglish}[1][\month]{% -\@orgargctr=#1\relax -\ifcase\@orgargctr -\PackageError{datetime}{Invalid Month number \the\@orgargctr}{Month -numbers should go from 1 (jan) to 12 (dec)}% -\or Jan% -\or Feb% -\or Mar% -\or Apr% -\or May% -\or Jun% -\or Jul% -\or Aug% -\or Sept% -\or Oct% -\or Nov% -\or Dec% -\else% -\PackageError{datetime}{Invalid Month number \the\@orgargctr}{Month -numbers should go from 1 (jan) to 12 (dec)}% -\fi} -% \end{macrocode} -%\end{macro} %\begin{macro}{\shortmonthname} %Define \verb|\shortmonthname| to be language dependent. If there %is no \verb|\shortmonthname|\meta{language}, defaults to English. % \begin{macrocode} \newcommand*{\shortmonthname}[1][\month]{% -\if@dt@multilingual -\@ifundefined{shortmonthname\languagename}{% -\PackageWarning{datetime}{No abbreviated month name defined for -language '\languagename', using full version instead}% -\monthname[#1]}{% -\csname shortmonthname\languagename\endcsname[#1]}% -\else -\shortmonthnameenglish[#1]% -\fi} + \if@dt@multilingual +% \end{macrocode} +% Make sure language file has been loaded. +% \begin{macrocode} + \DTloadDefIfNotLoadedButExists{\languagename}% + \@ifundefined{shortmonthname\languagename}% + {% + \PackageWarning{datetime}{No abbreviated month name defined for + language '\languagename', using full version instead}% + \monthname[#1]% + }% + {% + \csname shortmonthname\languagename\endcsname[#1]% + }% + \else + \shortmonthnameenglish[#1]% + \fi +} % \end{macrocode} %\end{macro} % End of |\if@dt@nodate| else part: @@ -1774,11 +1903,23 @@ language '\languagename', using full version instead}% % \end{macrocode} % Define macros needed to compute the weekday % (Again, only do this if @dt@nodate is false) -%\begin{macro}{\ifleapyear} -% Need to define |\ifleapyear| regardless of @dt@nodate otherwise \LaTeX\ won't -% match |\ifleapyear| with |\fi| +%\begin{macro}{\ifDTleapyear} +% Need to define |\ifDTleapyear| regardless of @dt@nodate otherwise \LaTeX\ won't +% match |\ifDTleapyear| with |\fi| +%\changes{2.59}{2013/09/10}{renamed \cs{ifleapyear} to +%\cs{ifDTLleapyear} to avoid clash with other packages} +% \begin{macrocode} +\newif\ifDTleapyear +\@ifundefined{ifleapyear} +{% +% \end{macrocode} +% Provide backward compatibility: % \begin{macrocode} -\newif\ifleapyear + \def\ifleapyear{\ifDTLleapyear} + \let\leapyeartrue\DTLleapyeartrue + \let\leapyearfalse\DTLleapyearfalse +}% +{} % \end{macrocode} %\end{macro} % Define temporary counter for arithmetic. @@ -1789,35 +1930,44 @@ language '\languagename', using full version instead}% % is not defined. % \begin{macrocode} \if@dt@nodate -\PackageInfo{datetime}{option "nodate" used, so not defining -\string\dayofweek \space or \string\shortdayofweek} + \PackageInfo{datetime}{option "nodate" used, so not defining + \string\dayofweek \space or \string\shortdayofweek} \else % \end{macrocode} % Using the algorithm documented at % http://userpages.wittenberg.edu/bshelburne/Comp150/DayofWeek.htm % Syntax: \verb|testifleapyear{|\meta{year}\verb|}| sets -% conditional \verb|\ifleapyear|. +% conditional \verb|\ifDTleapyear|. % \begin{macrocode} \providecommand*{\testifleapyear}[1]{% -\leapyearfalse -\@year=#1\relax -\@dtctr=\@year -\@modulo{\@dtctr}{400}% -\ifnum\@dtctr=0\relax -\leapyeartrue % year mod 400 = 0 => leap year -\else -\@dtctr=\@year -\@modulo{\@dtctr}{100}% -\ifnum\@dtctr=0\relax -\leapyearfalse % year mod 100 = 0 && year mod 400 != 0 => not a leap year -\else -\@dtctr=\@year -\@modulo{\@dtctr}{4}% -\ifnum\@dtctr=0\relax -\leapyeartrue % year mod 4 = 0 && year mod 100 != 0 => leap year -\fi -\fi -\fi + \DTleapyearfalse + \@year=#1\relax + \@dtctr=\@year + \@FCmodulo{\@dtctr}{400}% + \ifnum\@dtctr=0\relax +% \end{macrocode} +% year mod 400 = 0 => leap year +% \begin{macrocode} + \DTleapyeartrue + \else + \@dtctr=\@year + \@FCmodulo{\@dtctr}{100}% + \ifnum\@dtctr=0\relax +% \begin{macrocode} +% year mod 100 = 0 && year mod 400 != 0 => not a leap year +% \end{macrocode} + \DTleapyearfalse + \else + \@dtctr=\@year + \@FCmodulo{\@dtctr}{4}% + \ifnum\@dtctr=0\relax +% \begin{macrocode} +% year mod 4 = 0 && year mod 100 != 0 => leap year +% \end{macrocode} + \DTleapyeartrue + \fi + \fi + \fi } % \end{macrocode} %\begin{macro}{\dayofyear} @@ -1831,30 +1981,30 @@ language '\languagename', using full version instead}% % Computes the day of year. Result will be stored in \verb|\dayofyear| % \begin{macrocode} \providecommand*{\computedayofyear}[3]{% -\testifleapyear{#3}% -\dayofyear=0\relax -\@day=#1\relax \@month=#2\relax \@year=#3\relax -\ifcase\@month -\or -\or \advance\dayofyear by 31\relax -\or \advance\dayofyear by 59\relax -\or \advance\dayofyear by 90\relax -\or \advance\dayofyear by 120\relax -\or \advance\dayofyear by 151\relax -\or \advance\dayofyear by 181\relax -\or \advance\dayofyear by 212\relax -\or \advance\dayofyear by 243\relax -\or \advance\dayofyear by 273\relax -\or \advance\dayofyear by 304\relax -\or \advance\dayofyear by 334\relax -\else -\PackageError{datetime}{Invalid month number}{The second argument to -\string\computedayofyear \space should lie in the range 1-12}% -\fi -\ifnum\@month>2\relax -\ifleapyear\advance\dayofyear by 1\relax\fi -\fi -\advance\dayofyear by \@day\relax + \testifleapyear{#3}% + \dayofyear=0\relax + \@day=#1\relax \@month=#2\relax \@year=#3\relax + \ifcase\@month + \or + \or \advance\dayofyear by 31\relax + \or \advance\dayofyear by 59\relax + \or \advance\dayofyear by 90\relax + \or \advance\dayofyear by 120\relax + \or \advance\dayofyear by 151\relax + \or \advance\dayofyear by 181\relax + \or \advance\dayofyear by 212\relax + \or \advance\dayofyear by 243\relax + \or \advance\dayofyear by 273\relax + \or \advance\dayofyear by 304\relax + \or \advance\dayofyear by 334\relax + \else + \PackageError{datetime}{Invalid month number}{The second argument to + \string\computedayofyear \space should lie in the range 1-12}% + \fi + \ifnum\@month>2\relax + \ifDTleapyear\advance\dayofyear by 1\relax\fi + \fi + \advance\dayofyear by \@day\relax } % \end{macrocode} %\end{macro} @@ -1870,34 +2020,20 @@ language '\languagename', using full version instead}% % |\dayofweek|. % \begin{macrocode} \providecommand*{\computedayofweek}[3]{% -\computedayofyear{#1}{#2}{#3}% -\@dtctr=#3\relax -\advance\@dtctr by -1901\relax -\@modulo{\@dtctr}{28}% -\dayofweek=\@dtctr -\divide\dayofweek by 4\relax -\advance\dayofweek by \@dtctr -\advance\dayofweek by 2\relax -\@modulo{\dayofweek}{7}% -\advance\dayofweek by \dayofyear -\advance\dayofweek by -1\relax -\@modulo{\dayofweek}{7}% -\advance\dayofweek by 1\relax} -% \end{macrocode} -%\end{macro} -%\begin{macro}{\dayofweeknameidenglish} -% Given the day of week index, print associated the English name. -% \begin{macrocode} -\providecommand*{\dayofweeknameidenglish}[1]{% -\ifcase#1\relax -\or Sunday% -\or Monday% -\or Tuesday% -\or Wednesday% -\or Thursday% -\or Friday% -\or Saturday% -\fi} + \computedayofyear{#1}{#2}{#3}% + \@dtctr=#3\relax + \advance\@dtctr by -1901\relax + \@FCmodulo{\@dtctr}{28}% + \dayofweek=\@dtctr + \divide\dayofweek by 4\relax + \advance\dayofweek by \@dtctr + \advance\dayofweek by 2\relax + \@FCmodulo{\dayofweek}{7}% + \advance\dayofweek by \dayofyear + \advance\dayofweek by -1\relax + \@FCmodulo{\dayofweek}{7}% + \advance\dayofweek by 1\relax +} % \end{macrocode} %\end{macro} %\begin{macro}{\dayofweeknameid} @@ -1906,16 +2042,27 @@ language '\languagename', using full version instead}% % default to English. % \begin{macrocode} \providecommand*{\dayofweeknameid}[1]{% -\if@dt@multilingual -\@ifundefined{dayofweeknameid\languagename}{% -\ifthenelse{\equal{\languagename}{nohyphenation}}{}{% -\PackageWarning{datetime}{No week day names defined for language -'\languagename', defaulting to English}}% -\dayofweeknameidenglish{#1}}{% -\csname dayofweeknameid\languagename\endcsname{#1}}% -\else -\dayofweeknameidenglish{#1}% -\fi + \if@dt@multilingual +% \end{macrocode} +% Make sure language file has been loaded. +% \begin{macrocode} + \DTloadDefIfNotLoadedButExists{\languagename}% + \ifcsundef{dayofweeknameid\languagename}% + {% + \ifthenelse{\equal{\languagename}{nohyphenation}}{}% + {% + \PackageWarning{datetime}% + {No week day names defined for language + '\languagename', defaulting to English}% + }% + \dayofweeknameidenglish{#1}% + }% + {% + \csname dayofweeknameid\languagename\endcsname{#1}% + }% + \else + \dayofweeknameidenglish{#1}% + \fi } % \end{macrocode} %\end{macro} @@ -1923,8 +2070,8 @@ language '\languagename', using full version instead}% % Print the day of week name for the specified date. % \begin{macrocode} \providecommand*{\dayofweekname}[3]{% -\computedayofweek{#1}{#2}{#3}% -\dayofweeknameid{\dayofweek}% + \computedayofweek{#1}{#2}{#3}% + \dayofweeknameid{\dayofweek}% } % \end{macrocode} %\end{macro} @@ -1932,38 +2079,34 @@ language '\languagename', using full version instead}% % Print today's day of week name. % \begin{macrocode} \providecommand*{\thisdayofweekname}{% -\dayofweekname{\day}{\month}{\year}} -% \end{macrocode} -%\end{macro} -%\begin{macro}{\shortdayofweeknameidenglish} -% As before, but for abbreviated day of week name. English version: -% \begin{macrocode} -\providecommand*{\shortdayofweeknameidenglish}[1]{% -\ifcase#1\relax -\or Sun% -\or Mon% -\or Tue% -\or Wed% -\or Thu% -\or Fri% -\or Sat% -\fi} + \dayofweekname{\day}{\month}{\year}} % \end{macrocode} %\end{macro} %\begin{macro}{\shortdayofweekname} % Language dependant version: % \begin{macrocode} \providecommand*{\shortdayofweekname}[3]{% -\computedayofweek{#1}{#2}{#3}% -\if@dt@multilingual -\@ifundefined{shortdayofweeknameid\languagename}{% -\ifthenelse{\equal{\languagename}{nohyphenation}}{}{% -\PackageWarning{datetime}{No abbreviated week day names defined for -language '\languagename', defaulting to long version}}% -\dayofweeknameid{\dayofweek}}{% -\csname shortdayofweeknameid\languagename\endcsname\dayofweek}% -\else -\shortdayofweeknameidenglish{\dayofweek}% + \computedayofweek{#1}{#2}{#3}% + \if@dt@multilingual +% \end{macrocode} +% Make sure language file has been loaded. +% \begin{macrocode} + \DTloadDefIfNotLoadedButExists{\languagename}% + \@ifundefined{shortdayofweeknameid\languagename}% + {% + \ifthenelse{\equal{\languagename}{nohyphenation}}{}% + {% + \PackageWarning{datetime}% + {No abbreviated week day names defined for + language '\languagename', defaulting to long version}% + }% + \dayofweeknameid{\dayofweek}% + }% + {% + \csname shortdayofweeknameid\languagename\endcsname\dayofweek + }% + \else + \shortdayofweeknameidenglish{\dayofweek}% \fi } % \end{macrocode} @@ -1972,7 +2115,7 @@ language '\languagename', defaulting to long version}}% % Today's week day name, abbreviated: % \begin{macrocode} \providecommand*{\thisshortdayofweekname}{% -\dayofweekname{\day}{\month}{\year}} + \dayofweekname{\day}{\month}{\year}} % \end{macrocode} %\end{macro} % End of |\if@dt@nodate| else part. @@ -1987,7 +2130,7 @@ language '\languagename', defaulting to long version}}% % \begin{macrocode} \if@dt@nodate \else -\DeclareRobustCommand*{\today}{\formatdate{\day}{\month}{\year}} + \DeclareRobustCommand*{\today}{\formatdate{\day}{\month}{\year}} \fi % \end{macrocode} %\end{macro} @@ -2004,10 +2147,12 @@ language '\languagename', defaulting to long version}}% \@ifundefined{datebritish}{}{\loadDTdef{british}} \@ifundefined{dateamerican}{}{\loadDTdef{american}} \@ifundefined{dateaustrian}{}{\loadDTdef{austrian}} +\@ifundefined{dateaustralian}{}{\loadDTdef{australian}} \@ifundefined{datebahasa}{}{\loadDTdef{bahasa}} \@ifundefined{datebasque}{}{\loadDTdef{basque}} \@ifundefined{datebreton}{}{\loadDTdef{breton}} \@ifundefined{datebulgarian}{}{\loadDTdef{bulgarian}} +\@ifundefined{datecanadian}{}{\loadDTdef{canadian}} \@ifundefined{datecatalan}{}{\loadDTdef{catalan}} \@ifundefined{datecroatian}{}{\loadDTdef{croatian}} \@ifundefined{dateczech}{}{\loadDTdef{czech}} @@ -2028,6 +2173,7 @@ language '\languagename', defaulting to long version}}% \@ifundefined{datelsorbian}{}{\loadDTdef{lsorbian}} \@ifundefined{datemagyar}{}{\loadDTdef{magyar}} \@ifundefined{datenaustrian}{}{\loadDTdef{naustrian}} +\@ifundefined{datenewzealand}{}{\loadDTdef{newzealand}} \@ifundefined{datengerman}{}{\loadDTdef{ngerman}} \@ifundefined{datenorsk}{}{\loadDTdef{norsk}} \@ifundefined{datepolish}{}{\loadDTdef{polish}} @@ -2095,7 +2241,7 @@ language '\languagename', defaulting to long version}}% % Append the minute. % \begin{macrocode} \@dtctr=\time% -\@modulo{\@dtctr}{60}% +\@FCmodulo{\@dtctr}{60}% \dt@b=\expandafter{\pdfdate} \dt@a=\expandafter{\the\@dtctr} \ifnum\@dtctr<10\relax @@ -2125,36 +2271,37 @@ language '\languagename', defaulting to long version}}% %\subsubsection{american} % Identify file % \begin{macrocode} -\ProvidesFile{dt-american.def}[2010/09/21] +\ProvidesFile{dt-american.def}[2013/09/10]% % \end{macrocode} %\begin{macro}{\dateamerican} % \begin{macrocode} -\let\dateamerican\usdate +\global\let\dateamerican\usdate % \end{macrocode} %\end{macro} %\begin{macro}{\monthnameamerican} % \begin{macrocode} -\let\monthnameamerican\monthnameenglish +\global\let\monthnameamerican\monthnameenglish % \end{macrocode} %\end{macro} %\begin{macro}{\shortmonthnameamerican} % \begin{macrocode} -\let\shortmonthnameamerican\shortmonthnameenglish +\global\let\shortmonthnameamerican\shortmonthnameenglish % \end{macrocode} %\end{macro} %\begin{macro}{\dayofweeknameidamerican} % \begin{macrocode} -\let\dayofweeknameidamerican\dayofweeknameidenglish +\global\let\dayofweeknameidamerican\dayofweeknameidenglish % \end{macrocode} %\end{macro} %\begin{macro}{\shortdayofweeknameamerican} % \begin{macrocode} -\let\shortdayofweeknameidamerican\shortdayofweeknameidenglish +\global\let\shortdayofweeknameidamerican\shortdayofweeknameidenglish % \end{macrocode} %\end{macro} %\begin{macro}{\ordinaldateamerican} % \begin{macrocode} -\providecommand*{\ordinaldateamerican}[1]{#1} +\providecommand*{\ordinaldateamerican}[1]{#1}% +\global\let\ordinaldateamerican\ordinaldateamerican % \end{macrocode} %\end{macro} %\iffalse @@ -2164,38 +2311,86 @@ language '\languagename', defaulting to long version}}% %\fi %\iffalse % \begin{macrocode} +%<*dt-australian.def> +% \end{macrocode} +%\fi +%\subsection{Compatibility with Babel (Language definition files)} +%\subsubsection{australian} +% Identify file +% \begin{macrocode} +\ProvidesFile{dt-australian.def}[2013/09/10]% +% \end{macrocode} +%\begin{macro}{\dateaustralian} +% \begin{macrocode} +\global\let\dateaustralian\usdate +% \end{macrocode} +%\end{macro} +%\begin{macro}{\monthnameaustralian} +% \begin{macrocode} +\global\let\monthnameaustralian\monthnameenglish +% \end{macrocode} +%\end{macro} +%\begin{macro}{\shortmonthnameaustralian} +% \begin{macrocode} +\global\let\shortmonthnameaustralian\shortmonthnameenglish +% \end{macrocode} +%\end{macro} +%\begin{macro}{\dayofweeknameidaustralian} +% \begin{macrocode} +\global\let\dayofweeknameidaustralian\dayofweeknameidenglish +% \end{macrocode} +%\end{macro} +%\begin{macro}{\shortdayofweeknameaustralian} +% \begin{macrocode} +\global\let\shortdayofweeknameidaustralian\shortdayofweeknameidenglish +% \end{macrocode} +%\end{macro} +%\begin{macro}{\ordinaldateaustralian} +% \begin{macrocode} +\providecommand*{\ordinaldateaustralian}[1]{#1}% +\global\let\ordinaldateaustralian\ordinaldateaustralian +% \end{macrocode} +%\end{macro} +%\iffalse +% \begin{macrocode} +%</dt-australian.def> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} %<*dt-austrian.def> % \end{macrocode} %\fi %\subsubsection{Austrian} % Identify file % \begin{macrocode} -\ProvidesFile{dt-austrian.def}[2004/10/31] +\ProvidesFile{dt-austrian.def}[2013/09/10]% % \end{macrocode} % Define month names. %\begin{macro}{\monthnameaustrian} % \begin{macrocode} \providecommand{\monthnameaustrian}[1][\month]{% -\@orgargctr=#1\relax -\ifcase\@orgargctr -\PackageError{datetime}{Invalid Month number \the\@orgargctr}{% -Month numbers should go from 1 to 12}% -\or J\"anner% -\or Februar% -\or M\"arz% -\or April% -\or Mai% -\or Juni% -\or Juli% -\or August% -\or September% -\or Oktober% -\or November% -\or Dezember% + \@orgargctr=#1\relax + \ifcase\@orgargctr + \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% + Month numbers should go from 1 to 12}% + \or J\"anner% + \or Februar% + \or M\"arz% + \or April% + \or Mai% + \or Juni% + \or Juli% + \or August% + \or September% + \or Oktober% + \or November% + \or Dezember% \else -\PackageError{datetime}{Invalid Month number \the\@orgargctr}{% -Month numbers should go from 1 (janvier) to 12 (decembre)}% -\fi} + \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% + Month numbers should go from 1 (janvier) to 12 (decembre)}% +\fi}% +\global\let\monthnameaustrian\monthnameaustrian % \end{macrocode} %\end{macro} % (Re)Define declaration to switch to this format. @@ -2204,7 +2399,8 @@ Month numbers should go from 1 (janvier) to 12 (decembre)}% \DeclareRobustCommand*\dateaustrian{% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax -\number\@day.~\monthnameaustrian[\@month]\space\number\@year}} +\number\@day.~\monthnameaustrian[\@month]\space\number\@year}}% +\global\let\dateaustrian\dateaustrian % \end{macrocode} %\end{macro} %\iffalse @@ -2220,7 +2416,7 @@ Month numbers should go from 1 (janvier) to 12 (decembre)}% %\subsubsection{Bahasa} % Identify file % \begin{macrocode} -\ProvidesFile{dt-bahasa.def}[2004/10/31] +\ProvidesFile{dt-bahasa.def}[2013/09/10]% % \end{macrocode} % Define month names. % \begin{macrocode} @@ -2244,7 +2440,8 @@ Month numbers should go from 1 (Januari) to 12 (Desember)}% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 (Januari) to 12 (Desember)}% -\fi} +\fi}% +\global\let\monthnamebahasa\monthnamebahasa % \end{macrocode} % Define abbreviated month names. This currently does the full % name, because I don't know the abbreviated versions. @@ -2269,14 +2466,16 @@ Month numbers should go from 1 (Januari) to 12 (Desember)}% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 (Januari) to 12 (Desember)}% -\fi} +\fi}% +\global\let\shortmonthnamebahasa\shortmonthnamebahasa % \end{macrocode} % (Re)Define declaration to switch to this format. % \begin{macrocode} \DeclareRobustCommand*\datebahasa{% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax -\number\@day}~\monthnamebahasa[\@month]\space \number\@year}} +\number\@day}~\monthnamebahasa[\@month]\space \number\@year}}% +\global\let\datebahasa\datebahasa % \end{macrocode} %\iffalse % \begin{macrocode} @@ -2291,7 +2490,7 @@ Month numbers should go from 1 (Januari) to 12 (Desember)}% %\subsubsection{Basque} % Identify file % \begin{macrocode} -\ProvidesFile{dt-basque.def}[2004/10/31] +\ProvidesFile{dt-basque.def}[2013/09/10]% % \end{macrocode} % Define month names. % \begin{macrocode} @@ -2314,7 +2513,8 @@ Month numbers should go from 1 (urtarrilaren) to 12 (abenduaren)}% \or abenduaren% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 (urtarrilaren) to 12 (abenduaren)}% -\fi} +\fi}% +\global\let\monthnamebasque\monthnamebasque % \end{macrocode} % Define abbreviated month names. This currently does the full % name, because I don't know the abbreviated versions. @@ -2339,14 +2539,16 @@ Month numbers should go from 1 (urtarrilaren) to 12 (abenduaren)}% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 (urtarrilaren) to 12 (abenduaren)}% -\fi} +\fi}% +\global\let\shortmonthnamebasque\shortmonthnamebasque % \end{macrocode} % (Re)Define declaration to switch to this format. % \begin{macrocode} \DeclareRobustCommand*\datebasque{% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax -\number\@year.eko\space\monthnamebasque[\@month]~\number\@day}} +\number\@year.eko\space\monthnamebasque[\@month]~\number\@day}}% +\global\let\datebasque\datebasque % \end{macrocode} %\iffalse % \begin{macrocode} @@ -2361,13 +2563,14 @@ Month numbers should go from 1 (urtarrilaren) to 12 (abenduaren)}% %\subsubsection{Breton} % Identify file % \begin{macrocode} -\ProvidesFile{dt-breton.def}[2010/09/21] +\ProvidesFile{dt-breton.def}[2013/09/10]% % \end{macrocode} %\begin{macro}{\ordinaldatebreton} % Breton version: % \begin{macrocode} \providecommand*{\ordinaldatebreton}[1]{% -#1\ifnum#1=1\/\textsuperscript{a\~n}\fi} +#1\ifnum#1=1\/\textsuperscript{a\~n}\fi}% +\global\let\ordinaldatebreton\ordinaldatebreton % \end{macrocode} %\end{macro} % Define month names. @@ -2392,7 +2595,8 @@ Month numbers should go from 1 (Genver) to 12 (Kerzu)}% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 (Genver) to 12 (Kerzu)}% -\fi} +\fi}% +\global\let\monthnamebreton\monthnamebreton % \end{macrocode} % Define abbreviated month names. This currently does the full % name, because I don't know the abbreviated versions. @@ -2417,7 +2621,8 @@ Month numbers should go from 1 (Genver) to 12 (Kerzu)}% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 (Genver) to 12 (Kerzu)}% -\fi} +\fi}% +\global\let\shortmonthnamebreton\shortmonthnamebreton % \end{macrocode} % (Re)Define declaration to switch to this format. % \begin{macrocode} @@ -2427,7 +2632,8 @@ Month numbers should go from 1 (Genver) to 12 (Kerzu)}% \ifnum\@day=1\relax 1\/\textsuperscript{a\~n}\else\number\@day\fi \space a\space viz\space\monthnamebreton[\@month]\space \number\@year -}} +}}% +\global\let\datebreton\datebreton % \end{macrocode} %\iffalse % \begin{macrocode} @@ -2442,36 +2648,36 @@ Month numbers should go from 1 (Genver) to 12 (Kerzu)}% %\subsubsection{british} % Identify file % \begin{macrocode} -\ProvidesFile{dt-british.def}[2007/06/15] +\ProvidesFile{dt-british.def}[2013/09/10]% % \end{macrocode} %\begin{macro}{\datebritish} % \begin{macrocode} -\let\datebritish\longdate +\global\let\datebritish\longdate % \end{macrocode} %\end{macro} %\begin{macro}{\monthnamebritish} % \begin{macrocode} -\let\monthnamebritish\monthnameenglish +\global\let\monthnamebritish\monthnameenglish % \end{macrocode} %\end{macro} %\begin{macro}{\shortmonthnamebritish} % \begin{macrocode} -\let\shortmonthnamebritish\shortmonthnameenglish +\global\let\shortmonthnamebritish\shortmonthnameenglish % \end{macrocode} %\end{macro} %\begin{macro}{\dayofweeknameidbritish} % \begin{macrocode} -\let\dayofweeknameidbritish\dayofweeknameidenglish +\global\let\dayofweeknameidbritish\dayofweeknameidenglish % \end{macrocode} %\end{macro} %\begin{macro}{\shortdayofweekidbritish} % \begin{macrocode} -\let\shortdayofweeknameidbritish\shortdayofweeknameidenglish +\global\let\shortdayofweeknameidbritish\shortdayofweeknameidenglish % \end{macrocode} %\end{macro} %\begin{macro}{\ordinaldatebritish} % \begin{macrocode} -\let\ordinaldatebritish\ordinaldateenglish +\global\let\ordinaldatebritish\ordinaldateenglish % \end{macrocode} %\end{macro} %\iffalse @@ -2487,7 +2693,7 @@ Month numbers should go from 1 (Genver) to 12 (Kerzu)}% %\subsubsection{Bulgarian} % Identify file % \begin{macrocode} -\ProvidesFile{dt-bulgarian.def}[2004/10/31] +\ProvidesFile{dt-bulgarian.def}[2013/09/10]% % \end{macrocode} % Define month names. % \begin{macrocode} @@ -2511,7 +2717,8 @@ Month numbers should go from 1 to 12}% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 to 12}% -\fi} +\fi}% +\global\let\monthnamebulgarian\monthnamebulgarian % \end{macrocode} % Define abbreviated month names. This currently does the full % name, because I don't know the abbreviated versions. @@ -2536,14 +2743,16 @@ Month numbers should go from 1 to 12}% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 to 12}% -\fi} +\fi}% +\global\let\shortmonthnamebulgarian\shortmonthnamebulgarian % \end{macrocode} % (Re)Define declaration to switch to this format. % \begin{macrocode} \DeclareRobustCommand*\datebulgarian{% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax -\number\@day~\monthnamebulgarian[\@month]\ \number\@year~\cyrg.}} +\number\@day~\monthnamebulgarian[\@month]\ \number\@year~\cyrg.}}% +\global\let\datebulgarian\datebulgarian % \end{macrocode} %\iffalse % \begin{macrocode} @@ -2552,13 +2761,60 @@ Month numbers should go from 1 to 12}% %\fi %\iffalse % \begin{macrocode} +%<*dt-canadian.def> +% \end{macrocode} +%\fi +%\subsection{Compatibility with Babel (Language definition files)} +%\subsubsection{canadian} +% Identify file +% \begin{macrocode} +\ProvidesFile{dt-canadian.def}[2013/09/10]% +% \end{macrocode} +%\begin{macro}{\datecanadian} +% \begin{macrocode} +\global\let\datecanadian\usdate +% \end{macrocode} +%\end{macro} +%\begin{macro}{\monthnamecanadian} +% \begin{macrocode} +\global\let\monthnamecanadian\monthnameenglish +% \end{macrocode} +%\end{macro} +%\begin{macro}{\shortmonthnamecanadian} +% \begin{macrocode} +\global\let\shortmonthnamecanadian\shortmonthnameenglish +% \end{macrocode} +%\end{macro} +%\begin{macro}{\dayofweeknameidcanadian} +% \begin{macrocode} +\global\let\dayofweeknameidcanadian\dayofweeknameidenglish +% \end{macrocode} +%\end{macro} +%\begin{macro}{\shortdayofweeknamecanadian} +% \begin{macrocode} +\global\let\shortdayofweeknameidcanadian\shortdayofweeknameidenglish +% \end{macrocode} +%\end{macro} +%\begin{macro}{\ordinaldatecanadian} +% \begin{macrocode} +\providecommand*{\ordinaldatecanadian}[1]{#1}% +\global\let\ordinaldatecanadian\ordinaldatecanadian +% \end{macrocode} +%\end{macro} +%\iffalse +% \begin{macrocode} +%</dt-canadian.def> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} %<*dt-catalan.def> % \end{macrocode} %\fi %\subsubsection{Catalan} % Identify file % \begin{macrocode} -\ProvidesFile{dt-catalan.def}[2004/10/31] +\ProvidesFile{dt-catalan.def}[2013/09/10]% % \end{macrocode} % Define month names. % \begin{macrocode} @@ -2582,7 +2838,8 @@ Month numbers should go from 1 (de gener) to 12 (de desembre)}% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 (de gener) to 12 (de desembre)}% -\fi} +\fi}% +\global\let\monthnamecatalan\monthnamecatalan % \end{macrocode} % Define abbreviated month names. This currently does the full % name, because I don't know the abbreviated versions. @@ -2607,7 +2864,8 @@ Month numbers should go from 1 (de gener) to 12 (de desembre)}% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 (de gener) to 12 (de desembre)}% -\fi} +\fi}% +\global\let\shortmonthnamecatalan\shortmonthnamecatalan % \end{macrocode} % (Re)Define declaration to switch to this format. % \begin{macrocode} @@ -2615,7 +2873,8 @@ Month numbers should go from 1 (de gener) to 12 (de desembre)}% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax \number\@day~\monthnamecatalan[\@month]\ de~\number\@year -}} +}}% +\global\let\datecatalan\datecatalan % \end{macrocode} %\iffalse % \begin{macrocode} @@ -2630,7 +2889,7 @@ Month numbers should go from 1 (de gener) to 12 (de desembre)}% %\subsubsection{Croatian} % Identify file % \begin{macrocode} -\ProvidesFile{dt-croatian.def}[2004/10/31] +\ProvidesFile{dt-croatian.def}[2013/09/10]% % \end{macrocode} % Define month names. % \begin{macrocode} @@ -2654,7 +2913,8 @@ Month numbers should go from 1 (sijecnja) to 12 (prosinca)}% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 (sijecnja) to 12 (prosinca)}% -\fi} +\fi}% +\global\let\monthnamecroatian\monthnamecroatian % \end{macrocode} % Define abbreviated month names. This currently does the full % name, because I don't know the abbreviated versions. @@ -2679,14 +2939,41 @@ Month numbers should go from 1 (sijecnja) to 12 (prosinca)}% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 (sijecnja) to 12 (prosinca)}% -\fi} +\fi}% +\global\let\shortmonthnamecroatian\shortmonthnamecroatian +% \end{macrocode} +% Translations provided by Ivan Kokan: +% \begin{macrocode} +\providecommand*{\dayofweeknameidcroatian}[1]{% +\ifcase#1\relax +\or nedjelja% +\or ponedjeljak% +\or utorak% +\or srijeda% +\or \v{c}etvrtak% +\or petak% +\or subota% +\fi}% +\global\let\dayofweeknameidcroatian\dayofweeknameidcroatian +\providecommand*{\shortdayofweeknameidcroatian}[1]{% +\ifcase#1\relax +\or ned% +\or pon% +\or uto% +\or sri% +\or \v{c}et% +\or pet% +\or sub% +\fi}% +\global\let\shortdayofweeknameidcroatian\shortdayofweeknameidcroatian % \end{macrocode} % (Re)Define declaration to switch to this format. % \begin{macrocode} \DeclareRobustCommand*\datecroatian{% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax -\number\@day.~\monthnamecroatian[\@month]\space \number\@year.}} +\number\@day.~\monthnamecroatian[\@month]\space \number\@year.}}% +\global\let\datecroatian\datecroatian % \end{macrocode} %\iffalse % \begin{macrocode} @@ -2701,7 +2988,7 @@ Month numbers should go from 1 (sijecnja) to 12 (prosinca)}% %\subsubsection{Czech} % Identify file % \begin{macrocode} -\ProvidesFile{dt-czech.def}[2004/10/31] +\ProvidesFile{dt-czech.def}[2013/09/10]% % \end{macrocode} % Define month names. % \begin{macrocode} @@ -2725,7 +3012,8 @@ Month numbers should go from 1 to 12}% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 to 12}% -\fi} +\fi}% +\global\let\monthnameczech\monthnameczech % \end{macrocode} % Define abbreviated month names. This currently does the full % name, because I don't know the abbreviated versions. @@ -2750,14 +3038,16 @@ Month numbers should go from 1 to 12}% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 to 12}% -\fi} +\fi}% +\global\let\shortmonthnameczech\shortmonthnameczech % \end{macrocode} % (Re)Define declaration to switch to this format. % \begin{macrocode} \DeclareRobustCommand*\dateczech{% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax -\number\@day.~\monthnameczech[\@month]\space \number\@year}} +\number\@day.~\monthnameczech[\@month]\space \number\@year}}% +\global\let\dateczech\dateczech % \end{macrocode} %\iffalse % \begin{macrocode} @@ -2772,7 +3062,7 @@ Month numbers should go from 1 to 12}% %\subsubsection{Danish} % Identify file % \begin{macrocode} -\ProvidesFile{dt-danish.def}[2004/10/31] +\ProvidesFile{dt-danish.def}[2013/09/10]% % \end{macrocode} % Define month names. % \begin{macrocode} @@ -2796,14 +3086,16 @@ Month numbers should go from 1 to 12}% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 to 12}% -\fi} +\fi}% +\global\let\monthnamedanish\monthnamedanish % \end{macrocode} % (Re)Define declaration to switch to this format. % \begin{macrocode} \DeclareRobustCommand*\datedanish{% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax -\number\@day.~\monthnamedanish[\@month]\space \number\@year}} +\number\@day.~\monthnamedanish[\@month]\space \number\@year}}% +\global\let\datedanish\datedanish % \end{macrocode} %\iffalse % \begin{macrocode} @@ -2818,7 +3110,7 @@ Month numbers should go from 1 to 12}% %\subsubsection{Dutch} % Identify file % \begin{macrocode} -\ProvidesFile{dt-dutch.def}[2004/10/31] +\ProvidesFile{dt-dutch.def}[2013/09/10]% % \end{macrocode} % Define month names. % \begin{macrocode} @@ -2842,14 +3134,16 @@ Month numbers should go from 1 to 12}% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 to 12}% -\fi} +\fi}% +\global\let\monthnamedutch\monthnamedutch % \end{macrocode} % (Re)Define declaration to switch to this format. % \begin{macrocode} \DeclareRobustCommand*\datedutch{% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax -\number\@day~\monthnamedutch[\@month]\space \number\@year}} +\number\@day~\monthnamedutch[\@month]\space \number\@year}}% +\global\let\datedutch\datedutch % \end{macrocode} %\iffalse % \begin{macrocode} @@ -2864,7 +3158,7 @@ Month numbers should go from 1 to 12}% %\subsubsection{Esperanto} % Identify file % \begin{macrocode} -\ProvidesFile{dt-esperanto.def}[2004/10/31] +\ProvidesFile{dt-esperanto.def}[2013/09/10]% % \end{macrocode} % Define month names. % \begin{macrocode} @@ -2888,7 +3182,8 @@ Month numbers should go from 1 to 12}% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 to 12}% -\fi} +\fi}% +\global\let\monthnameesperanto\monthnameesperanto % \end{macrocode} % (Re)Define declaration to switch to this format. % \begin{macrocode} @@ -2896,7 +3191,8 @@ Month numbers should go from 1 to 12}% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax \number\@day{--a}~de~\monthnameesperanto[\@month],\space -\number\@year}} +\number\@year}}% +\global\let\dateesperanto\dateesperanto % \end{macrocode} %\iffalse % \begin{macrocode} @@ -2911,7 +3207,7 @@ Month numbers should go from 1 to 12}% %\subsubsection{Estonian} % Identify file % \begin{macrocode} -\ProvidesFile{dt-estonian.def}[2004/10/31] +\ProvidesFile{dt-estonian.def}[2013/09/10]% % \end{macrocode} % Define month names. % \begin{macrocode} @@ -2935,7 +3231,8 @@ Month numbers should go from 1 to 12}% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 to 12}% -\fi} +\fi}% +\global\let\monthnameestonian\monthnameestonian % \end{macrocode} % (Re)Define declaration to switch to this format. % \begin{macrocode} @@ -2943,7 +3240,8 @@ Month numbers should go from 1 to 12}% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax \number\@day.\space\monthnameestonian[\@month]\space -\number\@year.\space a.}} +\number\@year.\space a.}}% +\global\let\dateestonian\dateestonian % \end{macrocode} %\iffalse % \begin{macrocode} @@ -2958,7 +3256,7 @@ Month numbers should go from 1 to 12}% %\subsubsection{Finnish} % Identify file % \begin{macrocode} -\ProvidesFile{dt-finnish.def}[2004/10/31] +\ProvidesFile{dt-finnish.def}[2013/09/10]% % \end{macrocode} % Define month names. % \begin{macrocode} @@ -2982,14 +3280,16 @@ Month numbers should go from 1 to 12}% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 to 12}% -\fi} +\fi}% +\global\let\monthnamefinnish\monthnamefinnish % \end{macrocode} % (Re)Define declaration to switch to this format. % \begin{macrocode} \DeclareRobustCommand*\datefinnish{% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax -\number\@day.~\monthnamefinnish[\@month]\space \number\@year}} +\number\@day.~\monthnamefinnish[\@month]\space \number\@year}}% +\global\let\datefinnish\datefinnish % \end{macrocode} %\iffalse % \begin{macrocode} @@ -3004,13 +3304,14 @@ Month numbers should go from 1 to 12}% %\subsubsection{French} % Identify file % \begin{macrocode} -\ProvidesFile{dt-french.def}[2010/09/21] +\ProvidesFile{dt-french.def}[2013/09/10]% % \end{macrocode} %\begin{macro}{\ordinaldatefrench} % French: % \begin{macrocode} \providecommand*{\ordinaldatefrench}[1]{% -#1\ifnum#1=1\ier\fi} +#1\ifnum#1=1\ier\fi}% +\global\let\ordinaldatefrench\ordinaldatefrench % \end{macrocode} %\end{macro} %\begin{macro}{\ier} @@ -3018,7 +3319,8 @@ Month numbers should go from 1 to 12}% %\changes{v2.47}{27 Oct 2005}{defined if it doesn't % already exist} % \begin{macrocode} -\providecommand*{\ier}{\textsuperscript{er}} +\providecommand*{\ier}{\textsuperscript{er}}% +\global\let\ier\ier % \end{macrocode} %\end{macro} % Define week day names. @@ -3032,7 +3334,8 @@ Month numbers should go from 1 to 12}% \or jeudi% \or vendredi% \or samedi% -\fi} +\fi}% +\global\let\dayofweeknameidfrench\dayofweeknameidfrench % \end{macrocode} % Define abbreviated week day names (are these correct?) % \begin{macrocode} @@ -3045,7 +3348,8 @@ Month numbers should go from 1 to 12}% \or jeu% \or ven% \or sam% -\fi} +\fi}% +\global\let\shortdayofweeknameidfrench\shortdayofweeknameidfrench % \end{macrocode} % Define month names. % \begin{macrocode} @@ -3069,7 +3373,8 @@ Month numbers should go from 1 (janvier) to 12 (decembre)}% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 (janvier) to 12 (decembre)}% -\fi} +\fi}% +\global\let\monthnamefrench\monthnamefrench % \end{macrocode} % (Re)Define declaration to switch to this format. % \begin{macrocode} @@ -3077,7 +3382,8 @@ Month numbers should go from 1 (janvier) to 12 (decembre)}% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax \number\@day\ifnum\@day=1{\ier}\fi\space -\monthnamefrench[\@month]\space \number\@year}} +\monthnamefrench[\@month]\space \number\@year}}% +\global\let\datefrench\datefrench % \end{macrocode} %\iffalse % \begin{macrocode} @@ -3092,7 +3398,7 @@ Month numbers should go from 1 (janvier) to 12 (decembre)}% %\subsubsection{Galician} % Identify file % \begin{macrocode} -\ProvidesFile{dt-galician.def}[2004/10/31] +\ProvidesFile{dt-galician.def}[2013/09/10]% % \end{macrocode} % Define month names. % \begin{macrocode} @@ -3116,7 +3422,8 @@ Month numbers should go from 1 to 12}% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 to 12}% -\fi} +\fi}% +\global\let\monthnamegalician\monthnamegalician % \end{macrocode} % (Re)Define declaration to switch to this format. % \begin{macrocode} @@ -3124,7 +3431,8 @@ Month numbers should go from 1 to 12}% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax \number\@day~de\space\monthnamegalician[\@month]\space -de~\number\@year}} +de~\number\@year}}% +\global\let\dategalician\dategalician % \end{macrocode} %\iffalse % \begin{macrocode} @@ -3139,7 +3447,7 @@ de~\number\@year}} %\subsubsection{German} % Identify file % \begin{macrocode} -\ProvidesFile{dt-german.def}[2004/10/31] +\ProvidesFile{dt-german.def}[2010/09/10]% % \end{macrocode} % Define month names. % \begin{macrocode} @@ -3163,7 +3471,8 @@ Month numbers should go from 1 to 12}% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 (janvier) to 12 (decembre)}% -\fi} +\fi}% +\global\let\monthnamegerman\monthnamegerman % \end{macrocode} % The following week day names were supplied by Uwe Bieling: % \begin{macrocode} @@ -3176,7 +3485,8 @@ Month numbers should go from 1 (janvier) to 12 (decembre)}% \or Donnerstag% \or Freitag% \or Samstag% -\fi} +\fi}% +\global\let\dayofweeknameidgerman\dayofweeknameidgerman % \end{macrocode} % \begin{macrocode} \providecommand{\shortdayofweeknameidgerman}[1]{% @@ -3188,14 +3498,16 @@ Month numbers should go from 1 (janvier) to 12 (decembre)}% \or Do% \or Fr% \or Sa% -\fi} +\fi}% +\global\let\shortdayofweeknameidgerman\shortdayofweeknameidgerman % \end{macrocode} % (Re)Define declaration to switch to this format. % \begin{macrocode} \DeclareRobustCommand*\dategerman{% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax -\number\@day.~\monthnamegerman[\@month]\space\number\@year}} +\number\@day.~\monthnamegerman[\@month]\space\number\@year}}% +\global\let\dategerman\dategerman % \end{macrocode} %\iffalse % \begin{macrocode} @@ -3210,7 +3522,7 @@ Month numbers should go from 1 (janvier) to 12 (decembre)}% %\subsubsection{Greek} % Identify file % \begin{macrocode} -\ProvidesFile{dt-greek.def}[2004/10/31] +\ProvidesFile{dt-greek.def}[2013/09/10]% % \end{macrocode} % Define month names. % \begin{macrocode} @@ -3234,14 +3546,16 @@ Month numbers should go from 1 to 12}% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 to 12}% -\fi} +\fi}% +\global\let\monthnamegreek\monthnamegreek % \end{macrocode} % (Re)Define declaration to switch to this format. % \begin{macrocode} \DeclareRobustCommand*\dategreek{% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax -\number\@day\space\monthnamegreek[\@month]\space\number\@year}} +\number\@day\space\monthnamegreek[\@month]\space\number\@year}}% +\global\let\dategreek\dategreek % \end{macrocode} %\iffalse % \begin{macrocode} @@ -3256,12 +3570,12 @@ Month numbers should go from 1 to 12}% %\subsubsection{Hebrew} % Identify file % \begin{macrocode} -\ProvidesFile{dt-hebrew.def}[2004/10/31] +\ProvidesFile{dt-hebrew.def}[2013/09/10]% % \end{macrocode} % Babel already provides Hebrew month names, so just provide a % synonym. % \begin{macrocode} -\let\monthnamehebrew=\hebmonth +\global\let\monthnamehebrew\hebmonth % \end{macrocode} % Redefine declaration to switch to this format. (This uses % |\hebdate| which is defined by babel.) @@ -3269,7 +3583,8 @@ Month numbers should go from 1 to 12}% \DeclareRobustCommand*\datehebrew{% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax -\hebdate\@day\@month\@year}} +\hebdate\@day\@month\@year}}% +\global\let\datehebrew\datehebrew % \end{macrocode} %\iffalse % \begin{macrocode} @@ -3284,7 +3599,7 @@ Month numbers should go from 1 to 12}% %\subsubsection{Icelandic} % Identify file % \begin{macrocode} -\ProvidesFile{dt-icelandic.def}[2004/10/31] +\ProvidesFile{dt-icelandic.def}[2013/09/10]% % \end{macrocode} % Define month names. % \begin{macrocode} @@ -3293,29 +3608,31 @@ Month numbers should go from 1 to 12}% \ifcase\@orgargctr \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 to 12}% -\or janúar% -\or febrúar% +\or jan\'uar% +\or febr\'uar% \or mars% -\or apríl% -\or maí% -\or júní% -\or júlí% -\or ágúst% +\or apr\'il% +\or ma\'i% +\or j\'un\'i% +\or j\'ul\'i% +\or \'ag\'ust% \or september% -\or október% -\or nóvember% +\or okt\'ober% +\or n\'ovember% \or desembe% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 to 12}% -\fi} +\fi}% +\global\let\monthnameicelandic\monthnameicelandic % \end{macrocode} % (Re)Define declaration to switch to this format. % \begin{macrocode} \DeclareRobustCommand*\dateicelandic{% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax -\number\@day.~\monthnameicelandic[\@month]\space\number\@year}} +\number\@day.~\monthnameicelandic[\@month]\space\number\@year}}% +\global\let\dateicelandic\dateicelandic % \end{macrocode} %\iffalse % \begin{macrocode} @@ -3330,7 +3647,7 @@ Month numbers should go from 1 to 12}% %\subsubsection{Irish} % Identify file % \begin{macrocode} -\ProvidesFile{dt-irish.def}[2004/10/31] +\ProvidesFile{dt-irish.def}[2013/09/10]% % \end{macrocode} % Define month names. % \begin{macrocode} @@ -3354,14 +3671,16 @@ Month numbers should go from 1 to 12}% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 to 12}% -\fi} +\fi}% +\global\let\monthnameirish\monthnameirish % \end{macrocode} % (Re)Define declaration to switch to this format. % \begin{macrocode} \DeclareRobustCommand*\dateirish{% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax -\number\@day\space\monthnameirish[\@month]\space\number\@year}} +\number\@day\space\monthnameirish[\@month]\space\number\@year}}% +\global\let\dateirish\dateirish % \end{macrocode} %\iffalse % \begin{macrocode} @@ -3375,7 +3694,7 @@ Month numbers should go from 1 to 12}% %\fi %\subsubsection{Italian} % \begin{macrocode} -\ProvidesFile{dt-italian.def}[2008/01/22] +\ProvidesFile{dt-italian.def}[2013/09/10]% % \end{macrocode} % Translations provided by Giada Ermacora % \begin{macrocode} @@ -3388,7 +3707,8 @@ Month numbers should go from 1 to 12}% \or gioved\`{\i}% \or venerd\`{\i}% \or sabato% -\fi} +\fi}% +\global\let\dayofweeknameiditalian\dayofweeknameiditalian % \end{macrocode} % \begin{macrocode} \providecommand{\shortdayofweeknameiditalian}[1]{% @@ -3400,7 +3720,8 @@ Month numbers should go from 1 to 12}% \or gio% \or ven% \or sab% -\fi} +\fi}% +\global\let\shortdayofweeknameiditalian\shortdayofweeknameiditalian % \end{macrocode} % \begin{macrocode} \providecommand{\monthnameitalian}[1][\month]{% @@ -3420,7 +3741,8 @@ Month numbers should go from 1 to 12}% \or novembre% \or dicembre% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{Month numbers should go from 1 (gennaio) to 12 (dicembre)}% -\fi} +\fi}% +\global\let\monthnameitalian\monthnameitalian % \end{macrocode} % \begin{macrocode} \providecommand{\shortmonthnameitalian}[1][\month]{% @@ -3441,13 +3763,15 @@ Month numbers should go from 1 to 12}% \or dic% \else% \PackageError{datetime}{Invalid Month number \the\@orgargctr}{Month numbers should go from 1 (gen) to 12 (dic)}% -\fi} +\fi}% +\global\let\shortmonthnameitalian\shortmonthnameitalian % \end{macrocode} % \begin{macrocode} \DeclareRobustCommand*\dateitalian{% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax -\number\@day\space\monthnameitalian[\@month]\space\number\@year}} +\number\@day\space\monthnameitalian[\@month]\space\number\@year}}% +\global\let\dateitalian\dateitalian % \end{macrocode} %\iffalse % \begin{macrocode} @@ -3462,7 +3786,7 @@ Month numbers should go from 1 to 12}% %\subsubsection{Latin} % Identify file % \begin{macrocode} -\ProvidesFile{dt-latin.def}[2004/10/31] +\ProvidesFile{dt-latin.def}[2013/09/10]% % \end{macrocode} % Define month names. % \begin{macrocode} @@ -3486,7 +3810,8 @@ Month numbers should go from 1 to 12}% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 to 12}% -\fi} +\fi}% +\global\let\monthnamelatin\monthnamelatin % \end{macrocode} % (Re)Define declaration to switch to this format. % \begin{macrocode} @@ -3496,7 +3821,8 @@ Month numbers should go from 1 to 12}% \check@mathfonts\fontsize\sf@size\z@\math@fontsfalse\selectfont \uppercase\expandafter{\romannumeral\@day}% ~\monthnamelatin[\@month]\space -{\uppercase\expandafter{\romannumeral\@year}}}} +{\uppercase\expandafter{\romannumeral\@year}}}}% +\global\let\datelatin\datelatin % \end{macrocode} %\iffalse % \begin{macrocode} @@ -3511,7 +3837,7 @@ Month numbers should go from 1 to 12}% %\subsubsection{LSorbian} % Identify file % \begin{macrocode} -\ProvidesFile{dt-lsorbian.def}[2004/10/31] +\ProvidesFile{dt-lsorbian.def}[2013/09/10]% % \end{macrocode} % Define new month names. % \begin{macrocode} @@ -3535,7 +3861,8 @@ Month numbers should go from 1 to 12}% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 to 12}% -\fi} +\fi}% +\global\let\monthnamenewlsorbian\monthnamenewlsorbian % \end{macrocode} % Define old month names. % \begin{macrocode} @@ -3559,29 +3886,32 @@ Month numbers should go from 1 to 12}% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 to 12}% -\fi} +\fi}% +\global\let\monthnameoldlsorbian\monthnameoldlsorbian % \end{macrocode} % Set the default month names. % \begin{macrocode} -\let\monthnamelsorbian=\monthnamenewlsorbian +\global\let\monthnamelsorbian\monthnamenewlsorbian % \end{macrocode} % (Re)Define declaration to switch to new format. % \begin{macrocode} \DeclareRobustCommand*\newdatelsorbian{% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax -\number\@day.~\monthnamenewlsorbian[\@month]\space\number\@year}} +\number\@day.~\monthnamenewlsorbian[\@month]\space\number\@year}}% +\global\let\newdatelsorbian\newdatelsorbian % \end{macrocode} % (Re)Define declaration to switch to old format. % \begin{macrocode} \DeclareRobustCommand*\olddatelsorbian{% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax -\number\@day.~\monthnameoldlsorbian[\@month]\space\number\@year}} +\number\@day.~\monthnameoldlsorbian[\@month]\space\number\@year}}% +\global\let\olddatelsorbian\olddatelsorbian % \end{macrocode} % Set the default date format. % \begin{macrocode} -\let\datelsorbian\newdatelsorbian +\global\let\datelsorbian\newdatelsorbian % \end{macrocode} %\iffalse % \begin{macrocode} @@ -3596,7 +3926,7 @@ Month numbers should go from 1 to 12}% %\subsubsection{Magyar} % Identify file % \begin{macrocode} -\ProvidesFile{dt-magyar.def}[2004/10/31] +\ProvidesFile{dt-magyar.def}[2013/09/10]% % \end{macrocode} % Define month names. % \begin{macrocode} @@ -3620,14 +3950,16 @@ Month numbers should go from 1 to 12}% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 to 12}% -\fi} +\fi}% +\global\let\monthnamemagyar\monthnamemagyar % \end{macrocode} % (Re)Define declaration to switch to this format. % \begin{macrocode} \DeclareRobustCommand*\datemagyar{% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax -\number\@year.~\monthnamemagyar[\@month]\space\number\@day.}} +\number\@year.~\monthnamemagyar[\@month]\space\number\@day.}}% +\global\let\datemagyar\datemagyar % \end{macrocode} %\iffalse % \begin{macrocode} @@ -3642,7 +3974,7 @@ Month numbers should go from 1 to 12}% %\subsubsection{NAustrian} % Identify file % \begin{macrocode} -\ProvidesFile{dt-naustrian.def}[2004/10/31] +\ProvidesFile{dt-naustrian.def}[2013/09/10]% % \end{macrocode} % Define month names. % \begin{macrocode} @@ -3666,14 +3998,16 @@ Month numbers should go from 1 to 12}% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 to 12}% -\fi} +\fi}% +\global\let\monthnamenaustrian\monthnamenaustrian % \end{macrocode} % (Re)Define declaration to switch to this format. % \begin{macrocode} \DeclareRobustCommand*\datenaustrian{% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax -\number\@day.~\monthnamenaustrian[\@month]\space\number\@year}} +\number\@day.~\monthnamenaustrian[\@month]\space\number\@year}}% +\global\let\datenaustrian\datenaustrian % \end{macrocode} %\iffalse % \begin{macrocode} @@ -3682,13 +4016,60 @@ Month numbers should go from 1 to 12}% %\fi %\iffalse % \begin{macrocode} +%<*dt-newzealand.def> +% \end{macrocode} +%\fi +%\subsection{Compatibility with Babel (Language definition files)} +%\subsubsection{newzealand} +% Identify file +% \begin{macrocode} +\ProvidesFile{dt-newzealand.def}[2013/09/10]% +% \end{macrocode} +%\begin{macro}{\datenewzealand} +% \begin{macrocode} +\global\let\datenewzealand\usdate +% \end{macrocode} +%\end{macro} +%\begin{macro}{\monthnamenewzealand} +% \begin{macrocode} +\global\let\monthnamenewzealand\monthnameenglish +% \end{macrocode} +%\end{macro} +%\begin{macro}{\shortmonthnamenewzealand} +% \begin{macrocode} +\global\let\shortmonthnamenewzealand\shortmonthnameenglish +% \end{macrocode} +%\end{macro} +%\begin{macro}{\dayofweeknameidnewzealand} +% \begin{macrocode} +\global\let\dayofweeknameidnewzealand\dayofweeknameidenglish +% \end{macrocode} +%\end{macro} +%\begin{macro}{\shortdayofweeknamenewzealand} +% \begin{macrocode} +\global\let\shortdayofweeknameidnewzealand\shortdayofweeknameidenglish +% \end{macrocode} +%\end{macro} +%\begin{macro}{\ordinaldatenewzealand} +% \begin{macrocode} +\providecommand*{\ordinaldatenewzealand}[1]{#1}% +\global\let\ordinaldatenewzealand\ordinaldatenewzealand +% \end{macrocode} +%\end{macro} +%\iffalse +% \begin{macrocode} +%</dt-newzealand.def> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} %<*dt-ngerman.def> % \end{macrocode} %\fi %\subsubsection{NGerman} % Identify file % \begin{macrocode} -\ProvidesFile{dt-ngerman.def}[2004/10/31] +\ProvidesFile{dt-ngerman.def}[2013/09/10]% % \end{macrocode} % Define month names. % \begin{macrocode} @@ -3712,7 +4093,8 @@ Month numbers should go from 1 to 12}% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 to 12}% -\fi} +\fi}% +\global\let\monthnamengerman\monthnamengerman % \end{macrocode} % The following week day names were supplied by Uwe Bieling: % \begin{macrocode} @@ -3725,7 +4107,8 @@ Month numbers should go from 1 to 12}% \or Donnerstag% \or Freitag% \or Samstag% -\fi} +\fi}% +\global\let\dayofweeknameidngerman\dayofweeknameidngerman % \end{macrocode} % \begin{macrocode} \providecommand{\shortdayofweeknameidngerman}[1]{% @@ -3737,14 +4120,16 @@ Month numbers should go from 1 to 12}% \or Do% \or Fr% \or Sa% -\fi} +\fi}% +\global\let\shortdayofweeknameidngerman\shortdayofweeknameidngerman % \end{macrocode} % (Re)Define declaration to switch to this format. % \begin{macrocode} \DeclareRobustCommand*\datengerman{% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax -\number\@day.~\monthnamengerman[\@month]\space\number\@year}} +\number\@day.~\monthnamengerman[\@month]\space\number\@year}}% +\global\let\datengerman\datengerman % \end{macrocode} %\iffalse % \begin{macrocode} @@ -3759,7 +4144,7 @@ Month numbers should go from 1 to 12}% %\subsubsection{Norsk} % Identify file % \begin{macrocode} -\ProvidesFile{dt-norsk.def}[2004/10/31] +\ProvidesFile{dt-norsk.def}[2013/09/10]% % \end{macrocode} % Define month names. % \begin{macrocode} @@ -3783,14 +4168,16 @@ Month numbers should go from 1 to 12}% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 to 12}% -\fi} +\fi}% +\global\let\monthnamenorsk\monthnamenorsk % \end{macrocode} % (Re)Define declaration to switch to this format. % \begin{macrocode} \DeclareRobustCommand*\datenorsk{% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax -\number\@day.~\monthnamenorsk[\@month]\space\number\@year}} +\number\@day.~\monthnamenorsk[\@month]\space\number\@year}}% +\global\let\datenorsk\datenorsk % \end{macrocode} %\iffalse % \begin{macrocode} @@ -3805,7 +4192,7 @@ Month numbers should go from 1 to 12}% %\subsubsection{Polish} % Identify file % \begin{macrocode} -\ProvidesFile{dt-polish.def}[2004/10/31] +\ProvidesFile{dt-polish.def}[2013/09/10]% % \end{macrocode} % Define month names. %\begin{macro}{\monthnamepolish} @@ -3831,6 +4218,7 @@ Month numbers should go from 1 to 12}% \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 to 12}% \fi} +\global\let\monthnamepolish\monthnamepolish % \end{macrocode} %\end{macro} % (Re)Define declaration to switch to this format. @@ -3838,7 +4226,8 @@ Month numbers should go from 1 to 12}% \DeclareRobustCommand*\datepolish{% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax -\number\@day~\monthnamepolish[\@month]\space\number\@year}} +\number\@day~\monthnamepolish[\@month]\space\number\@year}}% +\global\let\datepolish\datepolish % \end{macrocode} % The week names were provided by Piotr Kempa %\begin{macro}{\dayofweeknameidpolish} @@ -3852,7 +4241,8 @@ Month numbers should go from 1 to 12}% \or Czwartek% \or Pi\k atek% \or Sobota% -\fi} +\fi}% +\global\let\dayofweeknameidpolish\dayofweeknameidpolish % \end{macrocode} %\end{macro} %\begin{macro}{\shortdayofweeknameidpolish} @@ -3866,7 +4256,8 @@ Month numbers should go from 1 to 12}% \or Czw.% \or Pt.% \or Sob.% -\fi} +\fi}% +\global\let\shortdayofweeknameidpolish\shortdayofweeknameidpolish % \end{macrocode} %\end{macro} %\iffalse @@ -3882,7 +4273,7 @@ Month numbers should go from 1 to 12}% %\subsubsection{Portuges} % Identify file % \begin{macrocode} -\ProvidesFile{dt-portuges.def}[2004/10/31] +\ProvidesFile{dt-portuges.def}[2013/09/10]% % \end{macrocode} % Define week day names. % \begin{macrocode} @@ -3895,7 +4286,8 @@ Month numbers should go from 1 to 12}% \or quinta-feira% \or sexta-feira% \or sabado% -\fi} +\fi}% +\global\let\dayofweeknameidportuges\dayofweeknameidportuges % \end{macrocode} % Define month names. % \begin{macrocode} @@ -3919,7 +4311,8 @@ Month numbers should go from 1 to 12}% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 to 12}% -\fi} +\fi}% +\global\let\monthnameportuges\monthnameportuges % \end{macrocode} % (Re)Define declaration to switch to this format. % \begin{macrocode} @@ -3927,7 +4320,8 @@ Month numbers should go from 1 to 12}% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax \number\@day\space de\space\monthnameportuges[\@month]\space -de\space\number\@year}} +de\space\number\@year}}% +\global\let\dateportuges\dateportuges % \end{macrocode} %\iffalse % \begin{macrocode} @@ -3942,7 +4336,7 @@ de\space\number\@year}} %\subsubsection{Romanian} % Identify file % \begin{macrocode} -\ProvidesFile{dt-romanian.def}[2004/10/31] +\ProvidesFile{dt-romanian.def}[2013/09/10]% % \end{macrocode} % Define month names. % \begin{macrocode} @@ -3966,14 +4360,16 @@ Month numbers should go from 1 to 12}% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 to 12}% -\fi} +\fi}% +\global\let\monthnameromanian\monthnameromanian % \end{macrocode} % (Re)Define declaration to switch to this format. % \begin{macrocode} \DeclareRobustCommand*\dateromanian{% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax -\number\@day~\monthnameromanian[\@month]\space\number\@year}} +\number\@day~\monthnameromanian[\@month]\space\number\@year}}% +\global\let\dateromanian\dateromanian % \end{macrocode} % The following were provided by Daniel Dumitriu: % \begin{macrocode} @@ -3986,7 +4382,8 @@ Month numbers should go from 1 to 12}% \or joi% \or vineri% \or s\^{a}mb\u{a}t\u{a}% -\fi} +\fi}% +\global\let\dayofweeknameidromanian\dayofweeknameidromanian % \end{macrocode} % % \begin{macrocode} @@ -3999,7 +4396,8 @@ Month numbers should go from 1 to 12}% \or J% \or V% \or S% -\fi} +\fi}% +\global\let\shortdayofweeknameidromanian\shortdayofweeknameidromanian % \end{macrocode} %\iffalse % \begin{macrocode} @@ -4014,7 +4412,7 @@ Month numbers should go from 1 to 12}% %\subsubsection{Russian} % Identify file % \begin{macrocode} -\ProvidesFile{dt-russian.def}[2004/10/31] +\ProvidesFile{dt-russian.def}[2013/09/10]% % \end{macrocode} % Define month names. % \begin{macrocode} @@ -4038,14 +4436,16 @@ Month numbers should go from 1 to 12}% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 to 12}% -\fi} +\fi}% +\global\let\monthnamerussian\monthnamerussian % \end{macrocode} % (Re)Define declaration to switch to this format. % \begin{macrocode} \DeclareRobustCommand*\daterussian{% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax -\number\@day~\monthnamerussian[\@month]\ \number\@year~\cyrg.}} +\number\@day~\monthnamerussian[\@month]\ \number\@year~\cyrg.}}% +\global\let\daterussian\daterussian % \end{macrocode} %\iffalse % \begin{macrocode} @@ -4060,7 +4460,7 @@ Month numbers should go from 1 to 12}% %\subsubsection{Samin} % Identify file % \begin{macrocode} -\ProvidesFile{dt-samin.def}[2004/10/31] +\ProvidesFile{dt-samin.def}[2013/09/10]% % \end{macrocode} % Define month names. % \begin{macrocode} @@ -4084,7 +4484,8 @@ Month numbers should go from 1 to 12}% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 to 12}% -\fi} +\fi}% +\global\let\monthnamesamin\monthnamesamin % \end{macrocode} % (Re)Define declaration to switch to this format. % \begin{macrocode} @@ -4092,7 +4493,8 @@ Month numbers should go from 1 to 12}% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax \monthnamesamin[\@month]\space\number\@day.~b.\space -\number\@year}} +\number\@year}}% +\global\let\datesamin\datesamin % \end{macrocode} %\iffalse % \begin{macrocode} @@ -4107,7 +4509,7 @@ Month numbers should go from 1 to 12}% %\subsubsection{Scottish} % Identify file % \begin{macrocode} -\ProvidesFile{dt-scottish.def}[2004/10/31] +\ProvidesFile{dt-scottish.def}[2013/09/10]% % \end{macrocode} % Define month names. % \begin{macrocode} @@ -4131,14 +4533,16 @@ Month numbers should go from 1 to 12}% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 to 12}% -\fi} +\fi}% +\global\let\monthnamescottish\monthnamescottish % \end{macrocode} % (Re)Define declaration to switch to this format. % \begin{macrocode} \DeclareRobustCommand*\datescottish{% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax -\number\@day\space\monthnamescottish[\@month]\space \number\@year}} +\number\@day\space\monthnamescottish[\@month]\space \number\@year}}% +\global\let\datescottish\datescottish % \end{macrocode} %\iffalse % \begin{macrocode} @@ -4153,7 +4557,7 @@ Month numbers should go from 1 to 12}% %\subsubsection{Serbian} % Identify file % \begin{macrocode} -\ProvidesFile{dt-serbian.def}[2004/10/31] +\ProvidesFile{dt-serbian.def}[2013/09/10]% % \end{macrocode} % Define month names. % \begin{macrocode} @@ -4177,14 +4581,16 @@ Month numbers should go from 1 to 12}% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 to 12}% -\fi} +\fi}% +\global\let\monthnameserbian\monthnameserbian % \end{macrocode} % (Re)Define declaration to switch to this format. % \begin{macrocode} \DeclareRobustCommand*\dateserbian{% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax -\number\@day.~\monthnameserbian[\@month]\space \number\@year}} +\number\@day.~\monthnameserbian[\@month]\space \number\@year}}% +\global\let\dateserbian\dateserbian % \end{macrocode} %\iffalse % \begin{macrocode} @@ -4199,7 +4605,7 @@ Month numbers should go from 1 to 12}% %\subsubsection{Slovak} % Identify file % \begin{macrocode} -\ProvidesFile{dt-slovak.def}[2004/10/31] +\ProvidesFile{dt-slovak.def}[2013/09/10]% % \end{macrocode} % Define month names. % \begin{macrocode} @@ -4222,14 +4628,16 @@ numbers should go from 1 to 12}% \or decembra% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 to 12}% -\fi} +\fi}% +\global\let\monthnameslovak\monthnameslovak % \end{macrocode} % (Re)Define declaration to switch to this format. % \begin{macrocode} \DeclareRobustCommand*\dateslovak{% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax -\number\@day.~\monthnameslovak[\@month]\space \number\@year}} +\number\@day.~\monthnameslovak[\@month]\space \number\@year}}% +\global\let\dateslovak\dateslovak % \end{macrocode} %\iffalse % \begin{macrocode} @@ -4244,7 +4652,7 @@ Month numbers should go from 1 to 12}% %\subsubsection{Slovene} % Identify file % \begin{macrocode} -\ProvidesFile{dt-slovene.def}[2004/10/31] +\ProvidesFile{dt-slovene.def}[2013/09/10]% % \end{macrocode} % Define month names. % \begin{macrocode} @@ -4267,14 +4675,16 @@ Month numbers should go from 1 to 12}% \or december% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 to 12}% -\fi} +\fi}% +\global\let\monthnameslovene\monthnameslovene % \end{macrocode} % (Re)Define declaration to switch to this format. % \begin{macrocode} \DeclareRobustCommand*\dateslovene{% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax -\number\@day.~\monthnameslovene[\@month]\space \number\@year}} +\number\@day.~\monthnameslovene[\@month]\space \number\@year}}% +\global\let\dateslovene\dateslovene % \end{macrocode} %\iffalse % \begin{macrocode} @@ -4289,7 +4699,7 @@ Month numbers should go from 1 to 12}% %\subsubsection{Spanish} % Identify file % \begin{macrocode} -\ProvidesFile{dt-spanish.def}[2004/10/31] +\ProvidesFile{dt-spanish.def}[2013/09/10]% % \end{macrocode} % Define week day names. % \begin{macrocode} @@ -4302,7 +4712,8 @@ Month numbers should go from 1 to 12}% \or jueves% \or viernes% \or s\'abado% -\fi} +\fi}% +\global\let\dayofweeknameidspanish\dayofweeknameidspanish % \end{macrocode} % Define abbreviated week day names (is this correct?) % \begin{macrocode} @@ -4315,7 +4726,8 @@ Month numbers should go from 1 to 12}% \or jue% \or vie% \or s\'ab% -\fi} +\fi}% +\global\let\shortdayofweeknameidspanish\shortdayofweeknameidspanish % \end{macrocode} % Define month names. % \begin{macrocode} @@ -4338,14 +4750,16 @@ Month numbers should go from 1 to 12}% \or diciembre% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 to 12}% -\fi} +\fi}% +\global\let\monthnamespanish\monthnamespanish % \end{macrocode} % (Re)Define declaration to switch to this format. % \begin{macrocode} \DeclareRobustCommand*\datespanish{% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax -\number\@day~de \monthnamespanish[\@month]\ de~\number\@year}} +\number\@day~de \monthnamespanish[\@month]\ de~\number\@year}}% +\global\let\datespanish\datespanish % \end{macrocode} %\iffalse % \begin{macrocode} @@ -4360,7 +4774,7 @@ Month numbers should go from 1 to 12}% %\subsubsection{Swedish} % Identify file % \begin{macrocode} -\ProvidesFile{dt-swedish.def}[2004/10/31] +\ProvidesFile{dt-swedish.def}[2013/09/10]% % \end{macrocode} % Define month names. % \begin{macrocode} @@ -4383,7 +4797,8 @@ Month numbers should go from 1 to 12}% \or december% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 to 12}% -\fi} +\fi}% +\global\let\monthnameswedish\monthnameswedish % \end{macrocode} % (Re)Define declaration to switch to this format % (day monthname year). @@ -4391,25 +4806,28 @@ Month numbers should go from 1 to 12}% \DeclareRobustCommand*\dateswedish{% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax -\number\@day~\monthnameswedish[\@month]\space\number\@year}} +\number\@day~\monthnameswedish[\@month]\space\number\@year}}% +\global\let\dateswedish\dateswedish % \end{macrocode} % (Re)Define declaration to switch to this format % (two-digit numerical). % \begin{macrocode} \DeclareRobustCommand*\datesymd{% -\renewcommand{\formatdate}[3]{% -\@day=##1\relax\@month=##2\relax\@year=##3\relax -\number\@year-\two@digits\@month-\two@digits\@day} -} + \renewcommand{\formatdate}[3]{% + \@day=##1\relax\@month=##2\relax\@year=##3\relax + \number\@year-\two@digits\@month-\two@digits\@day}% +}% +\global\let\datesymd\datesymd % \end{macrocode} % (Re)Define declaration to switch to this format % (numerical). % \begin{macrocode} \DeclareRobustCommand*\datesdmy{% -\renewcommand{\formatdate}[3]{% -\@day=##1\relax\@month=##2\relax\@year=##3\relax -\number\@day/\number\@month\space\number\@year} -} + \renewcommand{\formatdate}[3]{% + \@day=##1\relax\@month=##2\relax\@year=##3\relax + \number\@day/\number\@month\space\number\@year}% +}% +\global\let\datesdmy\datesdmy % \end{macrocode} %\iffalse % \begin{macrocode} @@ -4424,7 +4842,7 @@ Month numbers should go from 1 to 12}% %\subsubsection{Turkish} % Identify file % \begin{macrocode} -\ProvidesFile{dt-turkish.def}[2004/10/31] +\ProvidesFile{dt-turkish.def}[2013/09/10]% % \end{macrocode} % Define month names. % \begin{macrocode} @@ -4447,14 +4865,16 @@ Month numbers should go from 1 to 12}% \or Aral\i{}k% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 to 12}% -\fi} +\fi}% +\global\let\monthnameturkish\monthnameturkish % \end{macrocode} % (Re)Define declaration to switch to this format. % \begin{macrocode} \DeclareRobustCommand*\dateturkish{% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax -\number\@day~\monthnameturkish[\@month]\space\number\@year}} +\number\@day~\monthnameturkish[\@month]\space\number\@year}}% +\global\let\dateturkish\dateturkish % \end{macrocode} %\iffalse % \begin{macrocode} @@ -4469,36 +4889,36 @@ Month numbers should go from 1 to 12}% %\subsubsection{UKenglish} % Identify file % \begin{macrocode} -\ProvidesFile{dt-UKenglish.def}[2010/07/07] +\ProvidesFile{dt-UKenglish.def}[2013/09/10]% % \end{macrocode} %\begin{macro}{\dateUKenglish} % \begin{macrocode} -\let\dateUKenglish\longdate +\global\let\dateUKenglish\longdate % \end{macrocode} %\end{macro} %\begin{macro}{\monthnameUKenglish} % \begin{macrocode} -\let\monthnameUKenglish\monthnameenglish +\global\let\monthnameUKenglish\monthnameenglish % \end{macrocode} %\end{macro} %\begin{macro}{\shortmonthnameUKenglish} % \begin{macrocode} -\let\shortmonthnameUKenglish\shortmonthnameenglish +\global\let\shortmonthnameUKenglish\shortmonthnameenglish % \end{macrocode} %\end{macro} %\begin{macro}{\dayofweeknameidUKenglish} % \begin{macrocode} -\let\dayofweeknameidUKenglish\dayofweeknameidenglish +\global\let\dayofweeknameidUKenglish\dayofweeknameidenglish % \end{macrocode} %\end{macro} %\begin{macro}{\shortdayofweeknameidUKenglish} % \begin{macrocode} -\let\shortdayofweeknameidUKenglish\shortdayofweeknameidenglish +\global\let\shortdayofweeknameidUKenglish\shortdayofweeknameidenglish % \end{macrocode} %\end{macro} %\begin{macro}{\ordinaldateUKenglish} % \begin{macrocode} -\let\ordinaldateUKenglish\ordinaldateenglish +\global\let\ordinaldateUKenglish\ordinaldateenglish % \end{macrocode} %\end{macro} %\iffalse @@ -4514,7 +4934,7 @@ Month numbers should go from 1 to 12}% %\subsubsection{Ukraine} % Identify file % \begin{macrocode} -\ProvidesFile{dt-ukraineb.def}[2004/10/31] +\ProvidesFile{dt-ukraineb.def}[2013/09/10]% % \end{macrocode} % Define month names. % \begin{macrocode} @@ -4537,14 +4957,16 @@ Month numbers should go from 1 to 12}% \cyrg\cyrr\cyru\cyrd\cyrn\cyrya% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 to 12}% -\fi} +\fi}% +\global\let\monthnameukraineb\monthnameukraineb % \end{macrocode} % (Re)Define declaration to switch to this format. % \begin{macrocode} \DeclareRobustCommand*\dateukraineb{% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax -\number\@day~\monthnameukraineb[\@month]\space\number\@year~\cyrr.}} +\number\@day~\monthnameukraineb[\@month]\space\number\@year~\cyrr.}}% +\global\let\dateukraineb\dateukraineb % \end{macrocode} %\iffalse % \begin{macrocode} @@ -4559,36 +4981,37 @@ Month numbers should go from 1 to 12}% %\subsubsection{USenglish} % Identify file % \begin{macrocode} -\ProvidesFile{dt-USenglish.def}[2010/07/07] +\ProvidesFile{dt-USenglish.def}[2013/09/10]% % \end{macrocode} %\begin{macro}{\dateUSenglish} % \begin{macrocode} -\let\dateUSenglish\usdate +\global\let\dateUSenglish\usdate % \end{macrocode} %\end{macro} %\begin{macrocode}{\monthnameUSenglish} % \begin{macrocode} -\let\monthnameUSenglish\monthnameenglish +\global\let\monthnameUSenglish\monthnameenglish % \end{macrocode} %\end{macro} %\begin{macro}{\shortmonthnameUSenglish} % \begin{macrocode} -\let\shortmonthnameUSenglish\shortmonthnameenglish +\global\let\shortmonthnameUSenglish\shortmonthnameenglish % \end{macrocode} %\end{macro} %\begin{macro}{\dayofweeknameidUSenglish} % \begin{macrocode} -\let\dayofweeknameidUSenglish\dayofweeknameidenglish +\global\let\dayofweeknameidUSenglish\dayofweeknameidenglish % \end{macrocode} %\end{macro} %\begin{macrocode}{\shortdayofweeknameidUSenglish} % \begin{macrocode} -\let\shortdayofweeknameidUSenglish\shortdayofweeknameidenglish +\global\let\shortdayofweeknameidUSenglish\shortdayofweeknameidenglish % \end{macrocode} %\end{macro} %\begin{macro}{\ordinaldateUSenglish} % \begin{macrocode} -\newcommand*{\ordinaldateUSenglish}[1]{#1} +\newcommand*{\ordinaldateUSenglish}[1]{#1}% +\global\let\ordinaldateUSenglish\ordinaldateUSenglish % \end{macrocode} %\end{macro} %\iffalse @@ -4604,7 +5027,7 @@ Month numbers should go from 1 to 12}% %\subsubsection{USorbian} % Identify file % \begin{macrocode} -\ProvidesFile{dt-usorbian.def}[2004/10/31] +\ProvidesFile{dt-usorbian.def}[2013/09/10]% % \end{macrocode} % Define (new) month names. % \begin{macrocode} @@ -4627,7 +5050,8 @@ Month numbers should go from 1 to 12}% \or decembra% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 to 12}% -\fi} +\fi}% +\global\let\monthnamenewusorbian\monthnamenewusorbian % \end{macrocode} % Define (old) month names. % \begin{macrocode} @@ -4649,29 +5073,32 @@ Month numbers should go from 1 to 12}% \or nazymnika% \or hodownika% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{Month numbers should go from 1 to 12}% -\fi} +\fi}% +\global\let\monthnameoldusorbian\monthnameoldusorbian % \end{macrocode} % Set up default % \begin{macrocode} -\let\monthnameusorbian=\monthnamenewusorbian +\global\let\monthnameusorbian\monthnamenewusorbian % \end{macrocode} % (Re)Define declaration to switch to (new) format. % \begin{macrocode} \DeclareRobustCommand*\newdateusorbian{% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax -\number\@day.~\monthnamenewusorbian[\@month]\space\number\@year}} +\number\@day.~\monthnamenewusorbian[\@month]\space\number\@year}}% +\global\let\newdateusorbian\newdateusorbian % \end{macrocode} % (Re)Define declaration to switch to (old) format. % \begin{macrocode} \DeclareRobustCommand*\olddateusorbian{% \renewcommand{\formatdate}[3]{% \@day=##1\relax\@month=##2\relax\@year=##3\relax -\number\@day.~\monthnameoldusorbian[\@month]\space\number\@year}} +\number\@day.~\monthnameoldusorbian[\@month]\space\number\@year}}% +\global\let\olddateusorbian\olddateusorbian % \end{macrocode} % Set up default % \begin{macrocode} -\let\dateusorbian\newdateusorbian +\global\let\dateusorbian\newdateusorbian % \end{macrocode} %\iffalse % \begin{macrocode} @@ -4686,13 +5113,14 @@ Month numbers should go from 1 to 12}% %\subsubsection{Welsh} % Identify file % \begin{macrocode} -\ProvidesFile{dt-welsh.def}[2010/09/21] +\ProvidesFile{dt-welsh.def}[2013/09/10]% % \end{macrocode} %\begin{macro}{\ordinaldatewelsh} % Welsh version: % \begin{macrocode} \providecommand*{\ordinaldatewelsh}[1]{% -#1\ifnum#1=1\/\textsuperscript{a\~n}\fi} +#1\ifnum#1=1\/\textsuperscript{a\~n}\fi}% +\global\let\ordinaldatewelsh\ordinaldatewelsh % \end{macrocode} %\end{macro} % Define month names. @@ -4716,7 +5144,8 @@ Month numbers should go from 1 to 12}% \or Rhagfyr% \else \PackageError{datetime}{Invalid Month number \the\@orgargctr}{% Month numbers should go from 1 to 12}% -\fi} +\fi}% +\global\let\monthnamewelsh\monthnamewelsh % \end{macrocode} % (Re)Define declaration to switch to this format. % \begin{macrocode} @@ -4725,7 +5154,8 @@ Month numbers should go from 1 to 12}% \@day=##1\relax\@month=##2\relax\@year=##3\relax \ifnum\@day=1\relax 1\/$^{\mathrm{a\tilde{n}}}$\else \number\@day\fi \space a\space viz\space -\monthnamewelsh[\@month]\space\number\@year}} +\monthnamewelsh[\@month]\space\number\@year}}% +\global\let\datewelsh\datewelsh % \end{macrocode} % \subsection{LaTeX2HTML Perl Script} %\iffalse @@ -6669,6 +7099,17 @@ sub set_timeformat_xxivtime{ $timeformat = "TWODIGIT{THEHOUR}\\timeseparator TWODIGIT{THEMINUTE}"; } +sub format_xxivtime{ + local($hour,$min)=@_; + + sprintf "%02d\\timeseparator %02d", $hour, $min; +} + +sub do_cmd_xxivtime{ + + join('', &format_xxivtime($global{HOUR},$global{MINUTE}), $_[0]); +} + sub format_ampmtime{ local($hour,$min)=@_; local($timestring); @@ -6677,15 +7118,13 @@ sub format_ampmtime{ $timestring = sprintf "%d\\timeseparator %02d", $hourxii, $min; $timestring .= ($hour < 12 ? - "\\amname " : ($hour = 12 ? " \\noon" :"\\pmname ")); + "\\amname " : (($hour eq 12 and $min eq 0) ? " \\noon" :"\\pmname ")); $timestring } sub do_cmd_ampmtime{ - local($_) = @_; - - join('', &format_ampm($global{HOUR},$global{MINUTE}), $_[0]); + join('', &format_ampmtime($global{HOUR},$global{MINUTE}), $_[0]); } sub do_cmd_timeformat_at_ampmtime{ diff --git a/Master/texmf-dist/source/latex/datetime/datetime.ins b/Master/texmf-dist/source/latex/datetime/datetime.ins index 81053edca1f..a80c911d6b8 100644 --- a/Master/texmf-dist/source/latex/datetime/datetime.ins +++ b/Master/texmf-dist/source/latex/datetime/datetime.ins @@ -1,10 +1,10 @@ -% datetime.ins generated using makedtx version 0.94b 2010/9/21 10:02 +% datetime.ins generated using makedtx version 0.94b 2013/9/10 11:38 \input docstrip \preamble datetime.dtx - Copyright 2010 Nicola Talbot + 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 @@ -18,16 +18,20 @@ 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.sty, dt-american.def, dt-austrian.def, dt-bahasa.def, dt-basque.def, dt-breton.def, dt-british.def, dt-bulgarian.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-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. + 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. \endpreamble \askforoverwritefalse -\generate{\file{datetime.sty}{\usepreamble\defaultpreamble +\generate{\file{datetime-defaults.sty}{\usepreamble\defaultpreamble +\usepostamble\defaultpostamble\from{datetime.dtx}{datetime-defaults.sty,package}} +\file{datetime.sty}{\usepreamble\defaultpreamble \usepostamble\defaultpostamble\from{datetime.dtx}{datetime.sty,package}} \file{dt-american.def}{\usepreamble\defaultpreamble \usepostamble\defaultpostamble\from{datetime.dtx}{dt-american.def,package}} +\file{dt-australian.def}{\usepreamble\defaultpreamble +\usepostamble\defaultpostamble\from{datetime.dtx}{dt-australian.def,package}} \file{dt-austrian.def}{\usepreamble\defaultpreamble \usepostamble\defaultpostamble\from{datetime.dtx}{dt-austrian.def,package}} \file{dt-bahasa.def}{\usepreamble\defaultpreamble @@ -40,6 +44,8 @@ \usepostamble\defaultpostamble\from{datetime.dtx}{dt-british.def,package}} \file{dt-bulgarian.def}{\usepreamble\defaultpreamble \usepostamble\defaultpostamble\from{datetime.dtx}{dt-bulgarian.def,package}} +\file{dt-canadian.def}{\usepreamble\defaultpreamble +\usepostamble\defaultpostamble\from{datetime.dtx}{dt-canadian.def,package}} \file{dt-catalan.def}{\usepreamble\defaultpreamble \usepostamble\defaultpostamble\from{datetime.dtx}{dt-catalan.def,package}} \file{dt-croatian.def}{\usepreamble\defaultpreamble @@ -80,6 +86,8 @@ \usepostamble\defaultpostamble\from{datetime.dtx}{dt-magyar.def,package}} \file{dt-naustrian.def}{\usepreamble\defaultpreamble \usepostamble\defaultpostamble\from{datetime.dtx}{dt-naustrian.def,package}} +\file{dt-newzealand.def}{\usepreamble\defaultpreamble +\usepostamble\defaultpostamble\from{datetime.dtx}{dt-newzealand.def,package}} \file{dt-ngerman.def}{\usepreamble\defaultpreamble \usepostamble\defaultpostamble\from{datetime.dtx}{dt-ngerman.def,package}} \file{dt-norsk.def}{\usepreamble\defaultpreamble diff --git a/Master/texmf-dist/source/latex/datetime/datetime.perl b/Master/texmf-dist/source/latex/datetime/datetime.perl deleted file mode 100644 index d73fde5e52a..00000000000 --- a/Master/texmf-dist/source/latex/datetime/datetime.perl +++ /dev/null @@ -1,2001 +0,0 @@ -# File : datetime.perl -# Author : Nicola Talbot -# Date : 17 Nov 2009 -# Version : 1.04 -# -# This is a LaTeX2HTML style implementing the datetime package, and -# is distributed as part of that package. -# Copyright 2007 Nicola L.C. 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. - -# set up default values for internal counters. - -($global{SECONDS},$global{MINUTE},$global{HOUR},$global{DAY},$global{MONTH},$global{YEAR})=localtime(time); -$global{YEAR} += 1900; -$global{MONTH}++; - -package main; - -&do_require_package('fmtcount'); - -sub do_cmd_ordinaldate{ - &do_cmd_ordinalnum(@_); -} - -# define package options - -sub do_datetime_long{ - &do_cmd_longdate(@_); -} - -sub do_datetime_short{ - &do_cmd_shortdate(@_); -} - -sub do_datetime_text{ - &do_cmd_textdate(@_); -} - -sub do_datetime_yyyymmdd{ - &do_cmd_yyyymmdddate(@_); -} - -sub do_datetime_ddmmyyyy{ - &do_cmd_ddmmyyyydate(@_); -} - -sub do_datetime_dmyyyy{ - &do_cmd_dmyyyydate(@_); -} - -sub do_datetime_ddmmyy{ - &do_cmd_ddmmyydate(@_); -} - -sub do_datetime_dmyy{ - &do_cmd_dmyyyydate(@_); -} - -sub do_datetime_us{ - &do_cmd_usdate(@_); -} - -sub do_datetime_mmddyyyy{ - &do_cmd_mmddyyyydate(@_); -} - -sub do_datetime_mdyyyy{ - &do_cmd_mdyyyydate(@_); -} - -sub do_datetime_mmddyy{ - &do_cmd_mmddyydate(@_); -} - -sub do_datetime_mdyy{ - &do_cmd_mdyyyydate(@_); -} - -sub do_datetime_raise{ - local($tmp)=""; - - $tmp .= 'sub do_cmd_fmtord{'; - $tmp .= 'local($_) = @_;'; - $tmp .= 'local($num) = &missing_braces unless ((s/$next_pair_pr_rx//o)&&($num=$2));'; - $tmp .= 'join("", "<SUP>",$num,"</SUP>",$_);'; - $tmp .='}'; - - eval($tmp); -} - -sub do_datetime_level{ - local($tmp)=""; - - $tmp .= 'sub do_cmd_fmtord{'; - $tmp .= 'local($_) = @_;'; - $tmp .= 'local($num) = &missing_braces unless ((s/$next_pair_pr_rx//o)&&($num=$2));'; - $tmp .= 'join("", $num,$_);'; - $tmp .='}'; - - eval($tmp); -} - -sub do_datetime_dayofweek{ - &do_cmd_showdowtrue(@_); -} - -sub do_datetime_nodayofweek{ - &do_cmd_showdowfalse(@_); -} - -sub do_datetime_hhmmss{ - &set_timeformat_hhmmsstime -} - -sub do_datetime_24hr{ - &set_timeformat_xxivtime -} - -&do_datetime_24hr; - -sub do_datetime_12hr{ - &set_timeformat_ampmtime -} - -sub do_datetime_oclock{ - &set_timeformat_oclock -} - -sub do_datetime_iso{ - &set_timeformat_hhmmsstime; - &do_cmd_yyyymmdddate; - eval('sub do_cmd_dateseparator{join(\'\', \'-\', $_[0]);}'); - eval('sub do_cmd_timeseparator{join(\'\', \':\', $_[0]);}'); -} - -# babel stuff (Month will already be redefined by babel, so only need to change $dateformat) - -sub do_datetime_austrian{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_dateaustrian{'; - $tmp .= ' $dateformat = "THEDAY. MONTHNAME[THEMONTH] THEYEAR";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_dateaustrian(@_); -} - -if (defined &austrian_today) -{ - &do_datetime_austrian(@_); -} - -sub do_datetime_bahasa{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_datebahasa{'; - $tmp .= ' $dateformat = "THEDAY MONTHNAME[THEMONTH] THEYEAR";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_datebahasa(@_); -} - -if (defined &bahasa_today) -{ - &do_datetime_bahasa(@_); -} - -sub do_datetime_basque{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_datebasque{'; - $tmp .= ' $dateformat = "THEYEAR.eko MONTHNAME[THEMONTH] THEDAY";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_datebasque(@_); -} - -if (defined &basque_today) -{ - &do_datetime_basque(@_); -} - -sub do_datetime_breton{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_datebreton{'; - $tmp .= ' $dateformat = "{ORDINALDATE{DAY}}\\ a viz MONTHNAME[THEMONTH] THEYEAR";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - $tmp = 'sub do_cmd_ordinaldate{'; - $tmp .= 'local($_) = @_;'; - $tmp .= 'local($num) = &missing_braces unless ($_[0]=~(s/$next_pair_pr_rx//o)&&($num=$2));'; - $tmp .= 'local($before) = $num;'; - - $tmp .= 'if ($num == 1)'; - $tmp .= '{ $before .= \'a\~n\'; }'; - - $tmp .= '$before . $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_datebreton(@_); -} - -if (defined &breton_today) -{ - &do_datetime_breton(@_); -} - -sub do_datetime_bulgarian{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_datebulgarian{'; - $tmp .= ' $dateformat = "THEDAY MONTHNAME[THEMONTH] THEYEAR \\cyrg.";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_datebulgarian(@_); -} - -if (defined &bulgarian_today) -{ - &do_datetime_bulgarian(@_); -} - -sub do_datetime_catalan{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_datecatalan{'; - $tmp .= ' $dateformat = "THEDAY MONTHNAME[THEMONTH] de THEYEAR";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_datecatalan(@_); -} - -if (defined &catalan_today) -{ - &do_datetime_catalan(@_); -} - -sub do_datetime_croatian{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_datecroatian{'; - $tmp .= ' $dateformat = "THEDAY. MONTHNAME[THEMONTH] THEYEAR.";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_datecroatian(@_); -} - -if (defined &croatian_today) -{ - &do_datetime_croatian(@_); -} - -sub do_datetime_czech{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_dateczech{'; - $tmp .= ' $dateformat = "THEDAY. MONTHNAME[THEMONTH] THEYEAR";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_dateczech(@_); -} - -if (defined &czech_today) -{ - &do_datetime_czech(@_); -} - -sub do_datetime_danish{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_datedanish{'; - $tmp .= ' $dateformat = "THEDAY. MONTHNAME[THEMONTH] THEYEAR";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_datedanish(@_); -} - -if (defined &danish_today) -{ - &do_datetime_danish(@_); -} - -sub do_datetime_dutch{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_datedutch{'; - $tmp .= ' $dateformat = "THEDAY MONTHNAME[THEMONTH] THEYEAR";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_datedutch(@_); -} - -if (defined &dutch_today) -{ - &do_datetime_dutch(@_); -} - -sub do_datetime_esperanto{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_dateesperanto{'; - $tmp .= ' $dateformat = "THEDAY--a de MONTHNAME[THEMONTH], THEYEAR";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_dateesperanto(@_); -} - -if (defined &esperanto_today) -{ - &do_datetime_esperanto(@_); -} - -sub do_datetime_estonian{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_dateestonian{'; - $tmp .= ' $dateformat = "THEDAY. MONTHNAME[THEMONTH] THEYEAR. a.";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_dateestonian(@_); -} - -if (defined &estonian_today) -{ - &do_datetime_estonian(@_); -} - -sub do_datetime_finnish{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_datefinnish{'; - $tmp .= ' $dateformat = "THEDAY. MONTHNAME[THEMONTH] THEYEAR";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_datefinnish(@_); -} - -if (defined &finnish_today) -{ - &do_datetime_finnish(@_); -} - -sub do_datetime_french{ - local($tmp) = ""; - - eval($tmp); - $tmp .= 'sub do_cmd_datefrench{'; - $tmp .= ' $dateformat = "{ORDINALDATE{DAY}}\\ MONTHNAME[THEMONTH] THEYEAR";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - $tmp = 'sub do_cmd_ordinaldate{'; - $tmp .= 'local($_) = @_;'; - $tmp .= 'local($num) = &missing_braces unless ($_[0]=~(s/$next_pair_pr_rx//o)&&($num=$2));'; - $tmp .= 'local($before) = $num;'; - - $tmp .= 'if ($num == 1)'; - $tmp .= '{ $before .= \'\ier\'; }'; - - $tmp .= '$before . $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_datefrench(@_); -} - -if (defined &french_today) -{ - &do_datetime_french(@_); -} - -sub do_datetime_galician{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_dategalician{'; - $tmp .= ' $dateformat = "THEDAY de MONTHNAME[THEMONTH] de THEYEAR";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_dategalician(@_); -} - -if (defined &galician_today) -{ - &do_datetime_galician(@_); -} - -sub do_datetime_german{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_dategerman{'; - $tmp .= ' $dateformat = "THEDAY. MONTHNAME[THEMONTH] THEYEAR";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_dategerman(@_); -} - -if (defined &german_today) -{ - &do_datetime_german(@_); -} - -sub do_datetime_greek{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_dategreek{'; - $tmp .= ' $dateformat = "THEDAY MONTHNAME[THEMONTH] THEYEAR";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_dategreek(@_); -} - -if (defined &greek_today) -{ - &do_datetime_greek(@_); -} - -sub do_datetime_icelandic{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_dateicelandic{'; - $tmp .= ' $dateformat = "THEDAY. MONTHNAME[THEMONTH] THEYEAR";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_dateicelandic(@_); -} - -if (defined &icelandic_today) -{ - &do_datetime_icelandic(@_); -} - -sub do_datetime_irish{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_dateirish{'; - $tmp .= ' $dateformat = "THEDAY MONTHNAME[THEMONTH] THEYEAR";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_dateirish(@_); -} - -if (defined &irish_today) -{ - &do_datetime_irish(@_); -} - -sub do_datetime_italian{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_dateitalian{'; - $tmp .= ' $dateformat = "THEDAY MONTHNAME[THEMONTH] THEYEAR";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_dateitalian(@_); -} - -if (defined &italian_today) -{ - &do_datetime_italian(@_); -} - -sub do_datetime_latin{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_datelatin{'; - $tmp .= ' $dateformat = "ROMANNUMERALU{THEDAY} MONTHNAME[THEMONTH] ROMANNUMERALU{THEYEAR}";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_datelatin(@_); -} - -if (defined &latin_today) -{ - &do_datetime_latin(@_); -} - -sub do_datetime_lsorbian{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_datelsorbian{'; - $tmp .= ' $dateformat = "THEDAY. MONTHNAME[THEMONTH] THEYEAR";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_datelsorbian(@_); -} - -if (defined &lsorbian_today) -{ - &do_datetime_lsorbian(@_); -} - -sub do_datetime_magyar{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_datemagyar{'; - $tmp .= ' $dateformat = "THEDAY. MONTHNAME[THEMONTH] THEYEAR.";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_datemagyar(@_); -} - -if (defined &magyar_today) -{ - &do_datetime_magyar(@_); -} - -sub do_datetime_naustrian{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_datenaustrian{'; - $tmp .= ' $dateformat = "THEDAY. MONTHNAME[THEMONTH] THEYEAR";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_datenaustrian(@_); -} - -if (defined &naustrian_today) -{ - &do_datetime_naustrian(@_); -} - -sub do_datetime_ngerman{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_datengerman{'; - $tmp .= ' $dateformat = "THEDAY. MONTHNAME[THEMONTH] THEYEAR";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_datengerman(@_); -} - -if (defined &ngerman_today) -{ - &do_datetime_ngerman(@_); -} - -sub do_datetime_norsk{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_datenorsk{'; - $tmp .= ' $dateformat = "THEDAY. MONTHNAME[THEMONTH] THEYEAR";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_datenorsk(@_); -} - -if (defined &norsk_today) -{ - &do_datetime_norsk(@_); -} - -sub do_datetime_polish{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_datenorsk{'; - $tmp .= ' $dateformat = "THEDAY MONTHNAME[THEMONTH] THEYEAR";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_datenorsk(@_); -} - -if (defined &polish_today) -{ - &do_datetime_polish(@_); -} - -sub do_datetime_portuges{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_dateportuges{'; - $tmp .= ' $dateformat = "THEDAY de MONTHNAME[THEMONTH] de THEYEAR";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_dateportuges(@_); -} - -if (defined &portuges_today) -{ - &do_datetime_portuges(@_); -} - -sub do_datetime_romanian{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_dateromanian{'; - $tmp .= ' $dateformat = "THEDAY MONTHNAME[THEMONTH] THEYEAR";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_dateromanian(@_); -} - -if (defined &romanian_today) -{ - &do_datetime_romanian(@_); -} - -sub do_datetime_russian{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_daterussian{'; - $tmp .= ' $dateformat = "THEDAY MONTHNAME[THEMONTH] THEYEAR \\\\cyrg.";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_daterussian(@_); -} - -if (defined &russian_today) -{ - &do_datetime_russian(@_); -} - -sub do_datetime_samin{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_datesamin{'; - $tmp .= ' $dateformat = "MONTHNAME[THEMONTH] THEDAY.~b. THEYEAR";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_datesamin(@_); -} - -if (defined &samin_today) -{ - &do_datetime_samin(@_); -} - -sub do_datetime_scottish{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_datescottish{'; - $tmp .= ' $dateformat = "THEDAY MONTHNAME[THEMONTH] THEYEAR";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_datescottish(@_); -} - -if (defined &scottish_today) -{ - &do_datetime_scottish(@_); -} - -sub do_datetime_serbian{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_dateserbian{'; - $tmp .= ' $dateformat = "THEDAY. MONTHNAME[THEMONTH] THEYEAR";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_dateserbian(@_); -} - -if (defined &serbian_today) -{ - &do_datetime_serbian(@_); -} - -sub do_datetime_slovak{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_dateslovak{'; - $tmp .= ' $dateformat = "THEDAY. MONTHNAME[THEMONTH] THEYEAR";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_dateslovak(@_); -} - -if (defined &slovak_today) -{ - &do_datetime_slovak(@_); -} - -sub do_datetime_slovene{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_dateslovene{'; - $tmp .= ' $dateformat = "THEDAY. MONTHNAME[THEMONTH] THEYEAR";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_dateslovene(@_); -} - -if (defined &slovene_today) -{ - &do_datetime_slovene(@_); -} - -sub do_datetime_spanish{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_datespanish{'; - $tmp .= ' $dateformat = "THEDAY~de MONTHNAME[THEMONTH] de~THEYEAR";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_datespanish(@_); -} - -if (defined &spanish_today) -{ - &do_datetime_spanish(@_); -} - -sub do_datetime_swedish{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_dateswedish{'; - $tmp .= ' $dateformat = "THEDAY~MONTHNAME[THEMONTH] THEYEAR";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - $tmp = ""; - $tmp .= 'sub do_cmd_datesymd{'; - $tmp .= ' $dateformat = "THEYEAR-TWODIGIT{THEMONTH}-TWODIGIT{THEDAY}";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - $tmp = ""; - $tmp .= 'sub do_cmd_datesdmy{'; - $tmp .= ' $dateformat = "THEDAY/THEMONTH THEYEAR";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_dateswedish(@_); -} - -if (defined &swedish_today) -{ - &do_datetime_swedish(@_); -} - -sub do_datetime_turkish{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_dateturkish{'; - $tmp .= ' $dateformat = "THEDAY~MONTHNAME[THEMONTH] THEYEAR";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_dateturkish(@_); -} - -if (defined &turkish_today) -{ - &do_datetime_turkish(@_); -} - -sub do_datetime_ukraineb{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_dateukraineb{'; - $tmp .= ' $dateformat = "THEDAY~MONTHNAME[THEMONTH] THEYEAR~\\\\cyrr.";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_dateukraineb(@_); -} - -if (defined &ukraineb_today) -{ - &do_datetime_ukraineb(@_); -} - -sub do_datetime_usorbian{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_dateusorbian{'; - $tmp .= ' $dateformat = "THEDAY.~MONTHNAME[THEMONTH] THEYEAR";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_dateusorbian(@_); -} - -if (defined &usorbian_today) -{ - &do_datetime_usorbian(@_); -} - -sub do_datetime_welsh{ - local($tmp) = ""; - - $tmp .= 'sub do_cmd_datewelsh{'; - $tmp .= ' $dateformat = "{ORDINALDATE{DAY}}\\ a viz MONTHNAME[THEMONTH] THEYEAR";'; - $tmp .= ' $_[0];'; - $tmp .= '}'; - - eval($tmp); - - $tmp = 'sub do_cmd_ordinaldate{'; - $tmp .= 'local($_) = @_;'; - $tmp .= 'local($num) = &missing_braces unless ($_[0]=~(s/$next_pair_pr_rx//o)&&($num=$2));'; - $tmp .= 'local($before) = $num;'; - - $tmp .= 'if ($num == 1)'; - $tmp .= '{ $before .= \'a\~n\'; }'; - - $tmp .= '$before . $_[0];'; - $tmp .= '}'; - - eval($tmp); - - &do_cmd_datewelsh(@_); -} - -if (defined &welsh_today) -{ - &do_datetime_welsh(@_); -} - -# As far as I know, LaTeX2HTML doesn't implement TeX conditionals. -# $showdow corresponds to LaTeX boolean variable showdow -$showdow = 1; - -sub get_monthname{ - local($month) = @_; - - if ($month eq 'THEMONTH' or $month eq '\THEMONTH') - { - # this is a cludge to help newdateformat work - - 'MONTHNAME[THEMONTH]'; - } - else - { - if ($month eq '') - { - local($today) = &get_date(); - $today =~ m|(\d+)/0?(\d+)/|; - $month = $1; - } - - $Month[$month]; - } -} - -sub do_cmd_monthname{ - local($_) = @_; - local($month,$pat) = &get_next_optional_argument; - - local($monthname) = &get_monthname($month); - join('',$monthname,$_); -} - -sub get_shortmonthname{ - local($month) = @_; - - if ($month eq 'THEMONTH' or $month eq '\THEMONTH') - { - 'SHORTMONTHNAME[THEMONTH]'; - } - else - { - substr(&get_monthname($month), 0, 3); - } -} - -sub do_cmd_shortmonthname{ - local($_) = @_; - local($month,$pat) = &get_next_optional_argument; - - local($monthname) = &get_shortmonthname($month); - - join('',$monthname,$_); -} - -sub is_leap_year{ - local($year) = @_; - local($isleapyear) = 0; - - if (($year%400) == 0) - { - # year mod 400 = 0 => leap year - - $isleapyear = 1; - } - elsif (($year%100) == 0) - { - # year mod 100 = 0 and year mod 400 != 0 => not a leap year - - $isleapyear = 0; - } - elsif (($year%4) == 0) - { - # year mod 4 = 0 and year mod 100 != 0 => leap year - - $isleapyear = 1; - } - - $isleapyear; -} - -sub get_day_of_year{ - local($day,$month,$year) = @_; - local($dayofyear) = 0; - - SWITCH: { - if ($month == 2) {$dayofyear += 31; last SWITCH; } - if ($month == 3) {$dayofyear += 59; last SWITCH; } - if ($month == 4) {$dayofyear += 90; last SWITCH; } - if ($month == 5) {$dayofyear += 120; last SWITCH; } - if ($month == 6) {$dayofyear += 151; last SWITCH; } - if ($month == 7) {$dayofyear += 181; last SWITCH; } - if ($month == 8) {$dayofyear += 212; last SWITCH; } - if ($month == 9) {$dayofyear += 243; last SWITCH; } - if ($month == 10) {$dayofyear += 273; last SWITCH; } - if ($month == 11) {$dayofyear += 304; last SWITCH; } - if ($month == 12) {$dayofyear += 334; last SWITCH; } - } - - if ($month > 2 && &is_leap_year($year)) - { - $dayofyear += 1; - } - - $dayofyear += $day; - local($_)=$dayofyear; -} - -sub get_day_of_week{ - local($day,$month,$year) = @_; - local($dayofyear) = &get_day_of_year($day,$month,$year); - local($_) = (((($year-1901)%28)*1.25 + 2)%7 + $dayofyear - 1)%7 + 1; -} - -sub get_day_of_weekname_english{ - local($dow) = @_; - - local(@DayOfWeek) = ('Sunday', - 'Monday', - 'Tuesday', - 'Wednesday', - 'Thursday', - 'Friday', - 'Saturday'); - - if ($dow <= 0 || $dow > 7) - { - &write_warnings("Invalid day of week number: $dow"); - } - else - { - $DayOfWeek[$dow-1]; - } -} - -sub get_day_of_weekname_french{ - local($dow) = @_; - - local(@DayOfWeek) = ('dimanche', - 'lundi', - 'mardi', - 'mercredi', - 'jeudi', - 'vendredi', - 'samedi'); - - if ($dow <= 0 || $dow > 7) - { - &write_warnings("Invalid day of week number: $dow"); - } - else - { - $DayOfWeek[$dow-1]; - } -} - -sub get_day_of_weekname_spanish{ - local($dow) = @_; - - local(@DayOfWeek) = ('domingo', - 'lunes', - 'martes', - 'mi\\\'ercoles', - 'jueves', - 'viernes', - 's\\\'abado'); - - if ($dow <= 0 || $dow > 7) - { - &write_warnings("Invalid day of week number: $dow"); - } - else - { - $DayOfWeek[$dow-1]; - } -} - -sub get_day_of_weekname_portuges{ - local($dow) = @_; - - local(@DayOfWeek) = ('domingo', - 'segunda-feira', - 'ter\c{c}a-feira', - 'quarta-feira', - 'quinta-feira', - 'sexta-feira', - 'sabado'); - - if ($dow <= 0 || $dow > 7) - { - &write_warnings("Invalid day of week number: $dow"); - } - else - { - $DayOfWeek[$dow-1]; - } -} - -sub get_day_of_weekname_german{ - local($dow) = @_; - - local(@DayOfWeek) = ('Sonntag', - 'Montag', - 'Dienstag', - 'Mittwoch', - 'Donnerstag', - 'Freitag', - 'Samstag'); - - if ($dow <= 0 || $dow > 7) - { - &write_warnings("Invalid day of week number: $dow"); - } - else - { - $DayOfWeek[$dow-1]; - } -} - -sub get_day_of_weekname_ngerman{ - local($dow) = @_; - - local(@DayOfWeek) = ('Sonntag', - 'Montag', - 'Dienstag', - 'Mittwoch', - 'Donnerstag', - 'Freitag', - 'Samstag'); - - if ($dow <= 0 || $dow > 7) - { - &write_warnings("Invalid day of week number: $dow"); - } - else - { - $DayOfWeek[$dow-1]; - } -} - -sub get_day_of_weekname{ - local($dow)=@_; - local($dowsub); - - $dowsub = "get_day_of_weekname_$default_language"; - - if (defined ($dowsub)) - { - &$dowsub($dow); - } - else - { - &get_day_of_weekname_english($dow); - } -} - -sub get_short_day_of_weekname_english{ - local($dow) = @_; - - local(@DayOfWeek) = ('Sun', - 'Mon', - 'Tue', - 'Wed', - 'Thu', - 'Fri', - 'Sat'); - - if ($dow <= 0 || $dow > 7) - { - &write_warnings("Invalid day of week number: $dow"); - } - else - { - $DayOfWeek[$dow-1]; - } -} - -sub get_short_day_of_weekname_german{ - local($dow) = @_; - - local(@DayOfWeek) = ('So', - 'Mo', - 'Di', - 'Mi', - 'Do', - 'Fr', - 'Sa'); - - if ($dow <= 0 || $dow > 7) - { - &write_warnings("Invalid day of week number: $dow"); - } - else - { - $DayOfWeek[$dow-1]; - } -} - -sub get_short_day_of_weekname_ngerman{ - local($dow) = @_; - - local(@DayOfWeek) = ('So', - 'Mo', - 'Di', - 'Mi', - 'Do', - 'Fr', - 'Sa'); - - if ($dow <= 0 || $dow > 7) - { - &write_warnings("Invalid day of week number: $dow"); - } - else - { - $DayOfWeek[$dow-1]; - } -} - -sub get_short_day_of_weekname{ - local($dow)=@_; - local($dowsub); - - $dowsub = "get_short_day_of_weekname_$default_language"; - - if (defined ($dowsub)) - { - &$dowsub($dow); - } - else - { - substr(&get_day_of_weekname($dow),0,3); - } -} - -sub do_cmd_dayofweeknameid{ - local($_) = @_; - local($dow); - - $dow = &missing_braces unless ((s/$next_pair_pr_rx//o)&&($dow=$2)); - - join('',&get_day_of_weekname($dow), $_); -} - -sub do_cmd_dayofweekname{ - local($_) = @_; - local($day,$month,$year); - # read 1st argument - $day = &missing_braces unless ((s/$next_pair_pr_rx//o)&&($day=$2)); - # read 2nd argument - $month = &missing_braces unless ((s/$next_pair_pr_rx//o)&&($month=$2)); - # read 3rd argument - $year = &missing_braces unless ((s/$next_pair_pr_rx//o)&&($year=$2)); - - if ($day eq 'THEDAY' or $day eq '\THEDAY') - { - # this is a cludge to help newdateformat work - - join('', '{DOW}', $_); - } - else - { - local($dow) = &get_day_of_week($day,$month,$year); - - join('',&get_day_of_weekname($dow), $_); - } -} - -sub do_cmd_shortdayofweekname{ - local($_) = @_; - local($day,$month,$year); - # read 1st argument - $day = &missing_braces unless ((s/$next_pair_pr_rx//o)&&($day=$2)); - # read 2nd argument - $month = &missing_braces unless ((s/$next_pair_pr_rx//o)&&($month=$2)); - # read 3rd argument - $year = &missing_braces unless ((s/$next_pair_pr_rx//o)&&($year=$2)); - - local($dow) = &get_day_of_week($day,$month,$year); - - join('',&get_short_day_of_weekname($dow), $_); -} - -sub do_cmd_thisdayofweekname{ - local($dow) = &get_day_of_week($global{DAY}, $global{MONTH}, $global{YEAR}); - - join('',$DayOfWeek[$dow], $_); -} - -sub do_cmd_thisshortdayofweekname{ - local($dow) = &get_day_of_week($global{DAY}, $global{MONTH}, $global{YEAR}); - - join('',&get_short_day_of_weekname($dow), $_); -} - -$dateformat = "\\ifshowdow{DOW}\\fi {ORDINALDATE{DAY}}\\ MONTHNAME[THEMONTH], THEYEAR"; - -sub format_date{ - local($day,$month,$year) = @_; - - local($str) = $dateformat; - - $str =~ s/THEDAY/$day/g; - $str =~ s/THEMONTH/$month/g; - $str =~ s/THEYEAR/$year/g; - - $str =~ s/TWODIGIT{([\d]+)}/&get_twodigit($1)/eg; - $str =~ s/ROMANNUMERAL{([\d]+)}/&froman($1)/eg; - $str =~ s/ROMANNUMERALU{([\d]+)}/uc(&froman($1))/eg; - $str =~ s/TRUNCATE{([\d]+)}/&get_twodigit($1%100)/eg; - $str =~ s/SHORTMONTHNAME\[([\d]+)\]/&get_shortmonthname($1)/eg; - $str =~ s/MONTHNAME\[([\d]+)\]/&get_monthname($1)/eg; - - local($X) = ++$global{'max_id'}; - local($Y) = ++$global{'max_id'}; - local($Z) = ++$global{'max_id'}; - $str =~ s/{DOW}/\\dayofweekname${OP}$X${CP}$day${OP}$X${CP}${OP}$Y${CP}$month${OP}$Y${CP}${OP}$Z${CP}$year${OP}$Z${CP}/g; - $str =~ s/{SDOW}/\\shortdayofweekname${OP}$X${CP}$day${OP}$X${CP}${OP}$Y${CP}$month${OP}$Y${CP}${OP}$Z${CP}$year${OP}$Z${CP}/g; - - local($br_id) = ++$global{'max_id'}; - $suffix = &get_ordinal_suffix($day); - $str =~ s/{ORDINAL{DAY}}/$day\\fmtord${OP}$br_id${CP}$suffix${OP}$br_id${CP}/g; - - $br_id = ++$global{'max_id'}; - $suffix = &get_ordinal_suffix($month); - $str =~ s/{ORDINAL{MONTH}}/$month\\fmtord${OP}$br_id${CP}$suffix${OP}$br_id${CP}/g; - - $br_id = ++$global{'max_id'}; - $suffix = &get_ordinal_suffix($year); - $str =~ s/{ORDINAL{YEAR}}/$year\\fmtord${OP}$br_id${CP}$suffix${OP}$br_id${CP}/g; - - local($br_id) = ++$global{'max_id'}; - $str =~ s/{ORDINALDATE{DAY}}/\\ordinaldate${OP}$br_id${CP}$day${OP}$br_id${CP}/g; - - $str =~ s/{NNUMBERSTRING{DAY}}/&get_Numberstring($day)/eg; - $str =~ s/{NNUMBERSTRING{MONTH}}/&get_Numberstring($month)/eg; - $str =~ s/{NNUMBERSTRING{YEAR}}/&get_Numberstring($year)/eg; - - $str =~ s/{OORDINALSTRING{DAY}}/&get_Ordinalstring($day)/eg; - $str =~ s/{OORDINALSTRING{MONTH}}/&get_Ordinalstring($month)/eg; - $str =~ s/{OORDINALSTRING{YEAR}}/&get_Ordinalstring($year)/eg; - - $str =~ s/{CAPNUMBERSTRING{DAY}}/uc(&get_numberstring($day))/eg; - $str =~ s/{CAPNUMBERSTRING{MONTH}}/uc(&get_numberstring($month))/eg; - $str =~ s/{CAPNUMBERSTRING{YEAR}}/uc(&get_numberstring($year))/eg; - - $str =~ s/{CAPORDINALSTRING{DAY}}/uc(&get_ordinalstring($day))/eg; - $str =~ s/{CAPORDINALSTRING{MONTH}}/uc(&get_ordinalstring($month))/eg; - $str =~ s/{CAPORDINALSTRING{YEAR}}/uc(&get_ordinalstring($year))/eg; - - $str =~ s/{NUMBERSTRING{DAY}}/&get_numberstring($day)/eg; - $str =~ s/{NUMBERSTRING{MONTH}}/&get_numberstring($month)/eg; - $str =~ s/{NUMBERSTRING{YEAR}}/&get_numberstring($year)/eg; - - $str =~ s/{ORDINALSTRING{DAY}}/&get_ordinalstring($day)/eg; - $str =~ s/{ORDINALSTRING{MONTH}}/&get_ordinalstring($month)/eg; - $str =~ s/{ORDINALSTRING{YEAR}}/&get_ordinalstring($year)/eg; - - $str; -} - -sub do_cmd_formatdate{ - local($day,$month,$year); - # read 1st argument - $day = &missing_braces unless ($_[0]=~(s/$next_pair_pr_rx//o)&&($day=$2)); - # read 2nd argument - $month = &missing_braces unless ($_[0]=~(s/$next_pair_pr_rx//o)&&($month=$2)); - # read 3rd argument - $year = &missing_braces unless ($_[0]=~(s/$next_pair_pr_rx//o)&&($year=$2)); - - join('', &format_date($day,$month,$year), $_[0]); -} - -sub do_cmd_today{ - join('', &format_date($global{DAY},$global{MONTH},$global{YEAR}), $_[0]); -} - -sub do_cmd_day{ - join('', $global{DAY}, $_[0]); -} - -sub do_cmd_month{ - join('', $global{MONTH}, $_[0]); -} - -sub do_cmd_year{ - join('', $global{YEAR}, $_[0]); -} - -sub do_cmd_showdowtrue{ - local($_) = @_; - $showdow = 1; - $_[0]; -} - -sub do_cmd_showdowfalse{ - local($_) = @_; - $showdow = 0; - $_[0]; -} - -# This is a bit primative, it doesn't allow for -# nested conditionals - -sub do_cmd_ifshowdow{ - local($_) = @_; - local($ifbit,$elsebit); - - $_[0] =~s/(.*)\\fi//; - - $ifbit = $1; - - $ifbit =~s/(.*)\\else(.*)/\1/g; - - $elsebit = $2; - - if ($showdow) - { - join('', $ifbit, $_[0]); - } - else - { - join('', $elsebit, $_[0]); - } -} - -sub do_cmd_dateseparator{ - join('', '/', $_[0]); -} - -sub do_cmd_longdate{ - $dateformat = "\\ifshowdow{DOW}\\fi {ORDINALDATE{DAY}}\\ MONTHNAME[THEMONTH], THEYEAR"; - - $_[0]; -} - -sub do_cmd_shortdate{ - $dateformat = "\\ifshowdow{SDOW}\\fi {ORDINALDATE{DAY}}\\ SHORTMONTHNAME[THEMONTH], THEYEAR"; - - $_[0]; -} - -sub do_cmd_yyyymmdddate{ - $dateformat = "THEYEAR\\dateseparator TWODIGIT{THEMONTH}\\dateseparator TWODIGIT{THEDAY}"; - - $_[0]; -} - -sub do_cmd_ddmmyyyydate{ - $dateformat = "TWODIGIT{THEDAY}\\dateseparator TWODIGIT{THEMONTH}\\dateseparator THEYEAR"; - - $_[0]; -} - -sub do_cmd_dmyyyydate{ - $dateformat = "THEDAY\\dateseparator THEMONTH\\dateseparator THEYEAR"; - - $_[0]; -} - -sub do_cmd_dmyydate{ - $dateformat = "THEDAY\\dateseparator THEMONTH\\dateseparator TRUNCATE{THEYEAR}"; - - $_[0]; -} - -sub do_cmd_ddmmyydate{ - $dateformat = "TWODIGIT{THEDAY}\\dateseparator TWODIGIT{THEMONTH}\\dateseparator TRUNCATE{THEYEAR}"; - - $_[0]; -} - -sub do_cmd_textdate{ - $dateformat = "\\ifshowdow{DOW} the\\fi {OORDINALSTRING{DAY}} of MONTHNAME[THEMONTH], {NNUMBERSTRING{YEAR}}"; - - $_[0]; -} - -sub do_cmd_usdate{ - $dateformat = "MONTHNAME[THEMONTH] THEDAY, THEYEAR"; - - $_[0]; -} - -sub do_cmd_mmddyyyydate{ - $dateformat = "TWODIGIT{THEMONTH}\\dateseparator TWODIGIT{THEDAY}\\dateseparator THEYEAR"; - - $_[0]; -} - -sub do_cmd_mdyyyydate{ - $dateformat = "THEMONTH\\dateseparator THEDAY\\dateseparator THEYEAR"; - - $_[0]; -} - -sub do_cmd_mmddyydate{ - $dateformat = "TWODIGIT{THEMONTH}\\dateseparator TWODIGIT{THEDAY}\\dateseparator TRUNCATE{THEYEAR}"; - - $_[0]; -} - -sub do_cmd_mdyydate{ - $dateformat = "THEMONTH\\dateseparator THEDAY\\dateseparator TRUNCATE{THEYEAR}"; - - $_[0]; -} - -sub do_cmd_THEYEAR{ - join('', 'THEYEAR', $_[0]); -} - -sub do_cmd_THEMONTH{ - join('', 'THEMONTH', $_[0]); -} - -sub do_cmd_THEDAY{ - join('', 'THEDAY', $_[0]); -} - -sub do_cmd_newdateformat{ - local($_) = @_; - local($cmd,$cmdbody); - local($ntmp); - - $cmd = &missing_braces unless ($_[0]=~(s/$next_pair_pr_rx//o)&&($cmd=$2)); - $cmdbody = &missing_braces unless ($_[0]=~(s/$next_pair_pr_rx//o)&&($cmdbody=$2)); - - $ntmp = 'sub do_cmd_' . $cmd . '{'; - $ntmp .= '$dateformat = "' . $cmdbody . '";'; - - $ntmp .= '$_[0];'; - $ntmp .= '}'; - - eval($ntmp); - - join('', $_[0]); -} - -sub do_cmd_pdfdate{ - local($_) = @_; - - local($timestring) = sprintf "%d%02d%02d%02d%02d%02d", - $global{YEAR}, $global{MONTH}, $global{DAY}, $global{HOUR}, $global{MINUTE}, $global{SECONDS}; - - join('', $timestring, $_[0]); -} - - %userdates = (); - -sub do_cmd_newdate{ - local($_)=@_; - local($datename,$mon,$day,$year); - - $datename = &missing_braces unless ($_[0]=~(s/$next_pair_pr_rx//o)&&($datename=$2)); - - $day = &missing_braces unless ($_[0]=~(s/$next_pair_pr_rx//o)&&($day=$2)); - - $mon = &missing_braces unless ($_[0]=~(s/$next_pair_pr_rx//o)&&($mon =$2)); - - $year = &missing_braces unless ($_[0]=~(s/$next_pair_pr_rx//o)&&($year =$2)); - - $userdates{$datename}{day} = $day; - $userdates{$datename}{month} = $mon; - $userdates{$datename}{year} = $year; - - join('', $_[0]); -} - -sub do_cmd_displaydate{ - local($_)=@_; - local($datename); - local($cmd,$br_id); - - $datename = &missing_braces unless ($_[0]=~(s/$next_pair_pr_rx//o)&&($datename=$2)); - - $br_id = ++$global{'max_id'}; - $cmd = "$OP$br_id$CP" . $userdates{$datename}{day} ."$OP$br_id$CP"; - $br_id = ++$global{'max_id'}; - $cmd .= "$OP$br_id$CP" . $userdates{$datename}{month} ."$OP$br_id$CP"; - $br_id = ++$global{'max_id'}; - $cmd .= "$OP$br_id$CP" . $userdates{$datename}{year} ."$OP$br_id$CP"; - - join('', '\formatdate', $cmd, $_[0]); -} - -sub do_cmd_getdateyear{ - local($_)=@_; - local($datename); - - $datename = &missing_braces unless ($_[0]=~(s/$next_pair_pr_rx//o)&&($datename=$2)); - - join('', $userdates{$datename}{year}, $_[0]); -} - -sub do_cmd_getdatemonth{ - local($_)=@_; - local($datename); - - $datename = &missing_braces unless ($_[0]=~(s/$next_pair_pr_rx//o)&&($datename=$2)); - - join('', $userdates{$datename}{month}, $_[0]); -} - -sub do_cmd_getdateday{ - local($_)=@_; - local($datename); - - $datename = &missing_braces unless ($_[0]=~(s/$next_pair_pr_rx//o)&&($datename=$2)); - - join('', $userdates{$datename}{day}, $_[0]); -} - -# time commands - -sub do_cmd_timeseparator{ - join('', ':', $_[0]); -} - -sub do_cmd_noon{ - local($_) = @_; - - join('', "Noon", $_[0]); -} - -sub do_cmd_midnight{ - local($_) = @_; - - join('', "Midnight", $_[0]); -} - -sub do_cmd_amname{ - local($_) = @_; - - join('', "am", $_[0]); -} - -sub do_cmd_pmname{ - local($_) = @_; - - join('', "pm", $_[0]); -} - -sub do_cmd_amstring{ - local($_) = @_; - - join('', "in the morning", $_[0]); -} - -sub do_cmd_pmstring{ - local($_) = @_; - - join('', "in the afternoon", $_[0]); -} - -sub do_cmd_halfpast{ - local($_) = @_; - - join('', "Half past", $_[0]); -} - -sub do_cmd_quarterpast{ - local($_) = @_; - - join('', "Quarter past", $_[0]); -} - -sub do_cmd_quarterto{ - local($_) = @_; - - join('', "Quarter to", $_[0]); -} - -sub do_cmd_oclockstring{ - local($_) = @_; - - join('', "O'Clock", $_[0]); -} - -sub do_cmd_amorpmname{ - if ($global{HOUR}>12) - { - &do_cmd_pmname; - } - else - { - &do_cmd_amname; - } -} - -sub do_cmd_amorpmstring{ - if ($global{HOUR}>12) - { - &do_cmd_pmstring; - } - else - { - &do_cmd_amstring; - } -} - -sub set_timeformat_hhmmsstime{ - $timeformat = "TWODIGIT{THEHOUR}\\timeseparator TWODIGIT{THEMINUTE}" - . "\\timeseparator TWODIGIT{THESECOND}"; -} - -sub set_timeformat_xxivtime{ - $timeformat = "TWODIGIT{THEHOUR}\\timeseparator TWODIGIT{THEMINUTE}"; -} - -sub format_ampmtime{ - local($hour,$min)=@_; - local($timestring); - local($hourxii) = ($hour == 12 ? 12 : ($hour)%12); - - $timestring = sprintf "%d\\timeseparator %02d", $hourxii, $min; - - $timestring .= ($hour < 12 ? - "\\amname " : ($hour = 12 ? " \\noon" :"\\pmname ")); - - $timestring -} - -sub do_cmd_ampmtime{ - local($_) = @_; - - join('', &format_ampm($global{HOUR},$global{MINUTE}), $_[0]); -} - -sub do_cmd_timeformat_at_ampmtime{ - local($hour,$min,$sec); - # read 1st argument - $hour = &missing_braces unless ($_[0]=~(s/$next_pair_pr_rx//o)&&($day=$2)); - # read 2nd argument - $min = &missing_braces unless ($_[0]=~(s/$next_pair_pr_rx//o)&&($month=$2)); - # read 3rd argument - $sec = &missing_braces unless ($_[0]=~(s/$next_pair_pr_rx//o)&&($year=$2)); - - join('', &format_ampmtime($hour, $min), $_[0]); -} - -sub do_cmd_timeformatATampmtime{&do_cmd_timeformat_at_ampmtime} - -sub set_timeformat_ampmtime{ - $timeformat = "TWODIGIT{THEHOURXII}\\timeseparator TWODIGIT{THEMINUTE}AMORPMNAME"; -} - -sub format_oclock{ - local($hour,$min)=@_; - - local($hourxii) = ($hour == 12 ? 12 : ($hour)%12); - local($tohour) = ($hour == 11 ? 12 :($hour+1)%12); - local($tominute) = ($min == 0? 0 : 60 - $min); - - local($timestring); - - if ($hour == 0 && $min == 0) - { - $timestring = "\\midnight"; - } - elsif ($hour == 12 && $min == 0) - { - $timestring = "\\noon"; - } - else - { - if ($min == 0) - { - $timestring = &get_Numberstring($hourxii) . " \\oclockstring"; - } - elsif ($min == 15) - { - $timestring = "\\quarterpast\\ " . &get_Numberstring($hourxii); - } - elsif ($min == 30) - { - $timestring = "\\halfpast\\ " . &get_Numberstring($hourxii); - } - elsif ($min == 45) - { - $timestring = "\\quarterto\\ " . &get_Numberstring($tohour); - } - elsif ($min < 30) - { - $timestring = get_Numberstring($min); - - $timestring .= ($min == 1 ? " minute" : " minutes") . " past "; - - $timestring .= get_Numberstring($hourxii); - } - else - { - $timestring = get_Numberstring($tominute); - - $timestring .= ($min == 1 ? " minute" : " minutes") . " to "; - - $timestring .= get_Numberstring($tohour); - } - - $timestring .= ($hour < 12 ? " \\amstring" : " \\pmstring"); - } - - $timestring -} - -sub do_cmd_oclock{ - local($_) = @_; - - join('', &format_oclock($global{HOUR},$global{MINUTE}), $_[0]); -} - -sub do_cmd_timeformat_at_oclock{ - local($hour,$min,$sec); - # read 1st argument - $hour = &missing_braces unless ($_[0]=~(s/$next_pair_pr_rx//o)&&($day=$2)); - # read 2nd argument - $min = &missing_braces unless ($_[0]=~(s/$next_pair_pr_rx//o)&&($month=$2)); - # read 3rd argument - $sec = &missing_braces unless ($_[0]=~(s/$next_pair_pr_rx//o)&&($year=$2)); - - join('', &format_oclock($hour, $min), $_[0]); -} - -sub do_cmd_timeformatAToclock{&do_cmd_timeformat_at_oclock} - -sub set_timeformat_oclock{ - $timeformat="OCLOCK"; -} - -sub do_cmd_formattime{ - local($_) = @_; - local($hour,$min,$sec); - - # read 1st argument - $hour = &missing_braces unless - (s/$next_pair_pr_rx/$hour=$2;''/eo); - # read 2nd argument - $min = &missing_braces unless - (s/$next_pair_pr_rx/$min=$2;''/eo); - # read 3rd argument - $sec = &missing_braces unless - (s/$next_pair_pr_rx/$sec=$2;''/eo); - - join('', &format_time($hour,$min,$sec), $_); -} - -sub do_cmd_currenttime{ - join('', &format_time($global{HOUR},$global{MINUTE},$global{SECONDS}), $_[0]); -} - -sub format_time{ - local($hour,$min,$sec) = @_; - - local($str) = $timeformat; - - local($hourxii) = ($hour == 12 ? 12 : ($hour)%12); - local($tohour) = ($hour == 11 ? 12 :($hour+1)%12); - local($tominute) = ($min == 0? 0 : 60 - $min); - local($amorpmname) = ($hour < 12 ? '\amname' : - ($hour == 12 ? ' \noon' : '\pmname')); - - $str =~ s/THEHOURXII/$hourxii/g; - $str =~ s/THEHOUR/$hour/g; - $str =~ s/THEMINUTE/$min/g; - $str =~ s/THESECOND/$sec/g; - $str =~ s/THETOHOUR/$tohour/g; - $str =~ s/THETOMINUTE/$tominute/g; - $str =~ s/AMORPMNAME/$amorpmname/g; - - $str =~ s/TWODIGIT{([\d]+)}/&get_twodigit($1)/eg; - $str =~ s/ROMANNUMERAL{([\d]+)}/&froman($1)/eg; - $str =~ s/ROMANNUMERALU{([\d]+)}/uc(&froman($1))/eg; - - $str =~ s/OCLOCK/&format_oclock($hour,$min)/eg; - - $str; -} - -sub do_cmd_settimeformat{ - local($_) = @_; - local($cmd); - - $cmd = &missing_braces unless ($_[0]=~(s/$next_pair_pr_rx//o)&&($cmd=$2)); - - eval('&set_timeformat_'.$cmd); - - $_[0]; -} - -sub do_cmd_newtimeformat{ - local($_) = @_; - local($cmd,$cmdbody); - - $cmd = &missing_braces unless ($_[0]=~(s/$next_pair_pr_rx//o)&&($cmd=$2)); - $cmdbody = &missing_braces unless ($_[0]=~(s/$next_pair_pr_rx//o)&&($cmdbody=$2)); - - $tmp = 'sub do_cmd_'.$cmd.'{&do_cmd_timeformat_at_'.$cmd.';}'; - eval($tmp); - - $tmp = 'sub set_timeformat_'.$cmd.'{'; - $tmp .= '$timeformat = "'.$cmdbody .'";'; - $tmp .= '}'; - eval($tmp); - - $tmp = 'sub do_cmd_timeformat_at_'.$cmd.'{'; - $tmp .= 'local($_)=@_;'; - $tmp .= 'local($hour,$min,$sec);'; - $tmp .= '$hour=&missing_braces unless '; - $tmp .= '((s/$next_pair_pr_rx//o)&&($hour=$2));'; - $tmp .= '$min=&missing_braces unless '; - $tmp .= '((s/$next_pair_pr_rx//o)&&($min=$2));'; - $tmp .= '$sec=&missing_braces unless '; - $tmp .= '((s/$next_pair_pr_rx//o)&&($sec=$2));'; - $tmp .= '&set_timeformat_'.$cmd.';'; - $tmp .= '&format_time($hour, $min, $sec).$_'; - $tmp .= "}"; - - eval($tmp); - - join('', $_[0]); -} - -sub do_cmd_THEHOUR{ - local($_) = @_; - - join('', $global{HOUR}, $_[0]); -} - -sub do_cmd_THEMINUTE{ - local($_) = @_; - - join('', $global{MINUTE}, $_[0]); -} - -sub do_cmd_THESECOND{ - local($_) = @_; - - join('', $global{SECONDS}, $_[0]); -} - -sub do_cmd_THETOHOUR{ - local($_) = @_; - - join('', $global{TOHOUR}, $_[0]); -} - -sub do_cmd_THETOMINUTE{ - local($_) = @_; - - join('', $global{TOMINUTE}, $_[0]); -} - -sub do_cmd_THEHOURXII{ - local($_) = @_; - - join('', $global{HOURXII}, $_[0]); -} - -1; |