summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-01-06 01:30:41 +0000
committerKarl Berry <karl@freefriends.org>2010-01-06 01:30:41 +0000
commitf30988fcf5a859f3c9bbca97434679d6b3a33f92 (patch)
tree55092f9893f026dc124a8ebdff9f508002f1012b /Master/texmf-dist/source
parent5c8a45dcb9242b82ba4ae1888fc8c2f99b518668 (diff)
isodate update (5jan10)
git-svn-id: svn://tug.org/texlive/trunk@16613 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/latex/isodate/isodate.dtx1541
-rw-r--r--Master/texmf-dist/source/latex/isodate/isodate.ins2
2 files changed, 934 insertions, 609 deletions
diff --git a/Master/texmf-dist/source/latex/isodate/isodate.dtx b/Master/texmf-dist/source/latex/isodate/isodate.dtx
index 6d657256e9b..8f280c8f35a 100644
--- a/Master/texmf-dist/source/latex/isodate/isodate.dtx
+++ b/Master/texmf-dist/source/latex/isodate/isodate.dtx
@@ -1,5 +1,5 @@
% \iffalse meta comment
-% File: isodate.dtx Copyright (C) 2000--2005 Harald Harders
+% File: isodate.dtx Copyright (C) 2000--2010 Harald Harders
% \fi
%
% \iffalse
@@ -44,13 +44,16 @@
\DoNotIndex{\begingroup,\endgroup,\begin,\end,\CurrentOption}
\CodelineNumbered
\RecordChanges
-\CheckSum{2471}
+\CheckSum{2493}
\begin{document}
\DocInput{isodate.dtx}
\end{document}
%</driver>
% \fi
%
+% \changes{2.30}{2010/01/03}{Add a month-year format}%
+% \changes{2.30}{2010/01/03}{Move defintion of language-independent
+% formats into the main style file}%
% \changes{2.26}{2005/03/10}{Support different input formats
% containing slashes}%
% \changes{2.23}{2004/11/19}{Avoid to use the \texttt{calc} package
@@ -183,7 +186,7 @@
% change it locally inside a group; e.g.,
% \begin{verbatim}
%\today, {\origdate\today}, \today\end{verbatim}
-% leads to ``\today, {\origdate\today}, \today''.
+% leads to `\today, {\origdate\today}, \today'.
%
% \DescribeMacro{\printyearoff}%
% \DescribeMacro{\printyearon}%
@@ -196,8 +199,14 @@
% An example:
% \begin{verbatim}
%\today, {\printyearoff\today}, \today\end{verbatim}
-% leads to ``{\origdate\today, {\printyearoff\today}, \today}''.
+% leads to `{\origdate\today, {\printyearoff\today}, \today}'.
%
+% \DescribeMacro{\printdayoff}%
+% \DescribeMacro{\printdayon}%
+% Likewise you can switch on or off printing the day using
+% \cs{printdayon} and \cs{printdayoff}.
+% Note that you still have to provide complete dates in the
+% \cs{printdate} command, described in Section~\ref{sec:anydate} below.
%
% \subsection{Printing today's date}
%
@@ -206,6 +215,7 @@
% appearance is influenced by the current date format
%
% \subsection{Printing any date}
+% \label{sec:anydate}
%
% \DescribeMacro{\printdate}%
% The command \verb|\printdate{#1}| prints any date in the current
@@ -224,10 +234,10 @@
%\printdateTeX{2000/12/24}\end{verbatim}
% This command is useful for printing version information stored in a
% macro. For example the version of this package is stored in
-% the macro \verb|\filedate| (``\filedate''). To print it with the actual
+% the macro \verb|\filedate| (`\filedate'). To print it with the actual
% date format you can use the command \verb|\printdateTeX{\filedate}|
-% which leads to e.g., ``\printdateTeX{\filedate}'' or
-% {\origdate``\printdateTeX{\filedate}''}.
+% which leads to e.g., `\printdateTeX{\filedate}' or
+% {\origdate`\printdateTeX{\filedate}'}.
% Another possibility is to switch the input format to |tex| using
% \cs{dateinputformat}, described below.
%
@@ -263,12 +273,12 @@
% \subsection{Changing the ISO format}
%
% \DescribeMacro{\isodash}%
-% The ISO norm says that the date format is ``yyyy-mm-dd'' or
-% ``yyyymmdd'' \cite{iso8601a}.
-% By default I use the hyphen ``-'' as separator. You can change this
-% using the \verb|\isodash|\footnote{The name ``isodash'' is a little
+% The ISO norm says that the date format is `yyyy-mm-dd' or
+% `yyyymmdd' \cite{iso8601a}.
+% By default I use the hyphen `-' as separator. You can change this
+% using the \verb|\isodash|\footnote{The name `isodash' is a little
% bit confusing and was chosen due to my limited knowledge in
-% English. It should be named ``isoseparator'' or ``isosep''. But for
+% English. It should be named `isoseparator' or `isosep'. But for
% compatiblity reasons I will not change it.} command, e.g.,
% \begin{verbatim}
%\printdate{24/12/2000},
@@ -276,11 +286,37 @@
%\printdate{24/12/2000},
%\isodash{}%
%\printdate{24/12/2000}\end{verbatim}
-% leads to ``2000-12-24, 2000--12--24, 20001224''. Or for example
+% leads to `2000-12-24, 2000--12--24, 20001224'. Or for example
% \begin{verbatim}
%\isodash{$\cdot$}
%\printdate{24/12/2000}\end{verbatim}
-% leads to ``2000$\cdot$12$\cdot$24''.
+% leads to `2000$\cdot$12$\cdot$24'.
+%
+%
+% \subsection{Changing the original and short original format}
+%
+% \DescribeMacro{\isospacebeforeday}%
+% \DescribeMacro{\isospacebeforemonth}%
+% \DescribeMacro{\isospacebeforeyear}%
+%
+% By default, the original and short original format prints
+% unbreakable spaces between the parts of the dates, e.g.,
+% `|19~May~2001|'.
+% If you want to allow breakable spaces or other characters, you can
+% redefine the spaces using \cs{isospacebeforeday},
+% \cs{isospacebeforemonth}, and \cs{isospacebeforeyear}:
+% \begin{verbatim}
+%\isospacebeforeyear{\ }\end{verbatim}
+% leads to `|19~May\ 2001|'. Notice that the space is written as
+% \verb*|\ | to ensure that the space is not getting lost under all
+% circumstances.
+%
+% As the names imply, the spaces before the specified part (day, month,
+% or year) is changed. For most formats, only \cs{isospacebeforemonth}
+% and \cs{isospacebeforeyear} are relevant, while for US English,
+% \cs{isospacebeforeday} and \cs{isospacebeforeyear} are used.
+%
+% This only effects the \verb|orig| and \verb|shortorig| formats.
%
%
% \subsection{Changing the short original format}
@@ -288,15 +324,15 @@
% \DescribeMacro{\shortyearsign}%
%
% The short original format normally prints the year with two digits, e.g.,
-% ``19th May 01''.
+% `19th May 01'.
% Some people want to add an additional sign before the year, e.g.,
-% ``19th May '01''.
+% `19th May '01'.
% This can be achieved by using the command \verb|\shortyearsign|, e.g.,
% \begin{verbatim}
%\printdate{24/12/2000},
%\shortyearsign{'}%
%\printdate{24/12/2000}\end{verbatim}
-% leads to ``24 december 00, 24 december '00'' in English.
+% leads to `24 december 00, 24 december '00' in English.
%
% This only effects the \verb|shortorig| format. The \verb|short| numerical
% format stays unchanged.
@@ -313,37 +349,44 @@
% is possible to change them.
% \DescribeMacro{\daymonthsepgerman}%
% \DescribeMacro{\monthyearsepgerman}%
+% \DescribeMacro{\monthyearsepnodaygerman}%
% You can change the spacing between the day and the month using the
-% command \verb|\daymonthsepgerman|. Using the command
-% \verb|\monthyearsepgerman| you can change the spacing between the
+% command \cs{daymonthsepgerman}. Using the command
+% \cs{monthyearsepgerman} you can change the spacing between the
% month and the year for the long and the short format, e.g.,
% \begin{verbatim}
%\daymonthsepgerman{\quad}%
%\monthyearsepgerman{\qquad}{\quad}%
%{\numdate\printdate{24.12.2000}}, {\shortdate\printdate{24.12.2000}}\end{verbatim}
-% leads to ``24.\quad12.\qquad2000, 24.\quad12.\quad00''.
+% leads to `24.\quad12.\qquad2000, 24.\quad12.\quad00'.
+%
+% The default values are `\cs{,}' for the separator between day and
+% month resp.\ `\cs{,}' between month and year in the short format
+% and `|~|' in the long format.
%
-% The default values are ``\cs{,}'' for the separator between day and
-% month resp.\ ``\cs{,}'' between month and year in the short format
-% and ``|~|'' in the long format.
+% Likewise, \cs{monthyearsepnodaygerman} is used for defining the
+% spacing between the month and the year when printing the day is
+% switched off (using \cs{printdayoff}).
+% The arguments are the same as for \cs{monthyearsepgerman}.
+% Default is no space for long and short format.
%
%
% \subsection{Changing the English format}
%
% \changes{2.28}{2005/04/15}{Introduce option cleanlook for English
% date format}%
-% By default, the English date format looks like ``24th December
-% 2000''.
+% By default, the English date format looks like `24th December
+% 2000'.
% During the last years, a change has occured in many documents
-% towards ``24 December 2000''.
-% This new format is called ``clean look''.
+% towards `24 December 2000'.
+% This new format is called `clean look'.
% \DescribeMacro{\cleanlookdateon}%
% \DescribeMacro{\cleanlookdateoff}%
% Isodate's behaviour can be changed towards it using
% \cs{cleanlookdateon} and \cs{cleanlookdateoff}.
% This can also be done globally using the |cleanlook| package option.
%
-% At the moment, the ``clean look'' functionality only affects British
+% At the moment, the `clean look' functionality only affects British
% English.
% If this trend also counts for different languages, please tell it me
% that I can add support for them.
@@ -367,7 +410,7 @@
% You may do similar things, e.g.,
% \begin{verbatim}
%\numdate[Alph]\end{verbatim}
-% prints the months with the command \cs{Alph}, ``A'', ``B'', \ldots{}
+% prints the months with the command \cs{Alph}, `A', `B', \ldots{}
% The day is printed with two digits since every call of \cs{numdate}
% or \cs{shortdate} calls \cs{isotwodigitdaytrue} which switches
% printing the day with two digits on.
@@ -390,22 +433,22 @@
%\numdate[boldnum]%
%\printdate{24.3.2000}}\end{verbatim}
% leas to
-% ``{\def\boldnum#1{\textbf{\twodigitarabic{#1}}}\ignorespaces
+% `{\def\boldnum#1{\textbf{\twodigitarabic{#1}}}\ignorespaces
% \numdate[boldnum]\ignorespaces
-% \printdate{24.3.2000}}''.
+% \printdate{24.3.2000}}'.
% \DescribeMacro{\twodigitarabic}
% Here, the \cs{twodigitarabic} command has been used that prints a
% positive number with at least two digits.\footnote{This command is
% also used for the numerical date formats.}
%
% If you, for example want a numerical date format with the day and
-% month printed with the ``natural'' number of digits rather than with
+% month printed with the `natural' number of digits rather than with
% two digits, you may do it as follows:
% \begin{verbatim}
%{\numdate[arabic]\isotwodigitdayfalse
%\printdate{1.2.2000}}\end{verbatim}
-% which leads to ``{\numdate[arabic]\isotwodigitdayfalse
-% \printdate{1.2.2000}}''.
+% which leads to `{\numdate[arabic]\isotwodigitdayfalse
+% \printdate{1.2.2000}}'.
%
% Using one of the other date formats reset the numerical format to
% its standard settings with arabic numerals (with two digits), e.g.,
@@ -413,9 +456,9 @@
%{\numdate[Alph]\printdate{6.12.2000};
%\isodate\printdate{6.12.2000};
%\numdate\printdate{6.12.2000}}\end{verbatim}
-% leads to ``{\numdate[Alph]\isotwodigitdayfalse\printdate{6.12.2000};
+% leads to `{\numdate[Alph]\isotwodigitdayfalse\printdate{6.12.2000};
% \isodate\printdate{6.12.2000};
-% \numdate\printdate{6.12.2000}}''.
+% \numdate\printdate{6.12.2000}}'.
%
% \subsection{Switching the date input format}
%
@@ -518,8 +561,11 @@
% \verb|inputlatex|& \TeX\ date input format\\
% \verb|inputLaTeX|& \TeX\ date input format\\
% \hline
-% \verb|cleanlook|&use ``clean look'' for English dates\\
-% \verb|nocleanlook|&don't use ``clean look'' for English dates\\
+% \verb|cleanlook|&use `clean look' for English dates\\
+% \verb|nocleanlook|&don't use `clean look' for English dates (default)\\
+% \hline
+% \verb|printdayon|&print complete date including the day (default)\\
+% \verb|printdayoff|&omit the day in the date\\
% \hline
% \end{tabular}
% \end{minipage}
@@ -602,7 +648,7 @@
%
% \section{Licence}
%
-% Copyright 2000--2005 Harald Harders
+% Copyright 2000--2010 Harald Harders
%
% This program can be redistributed and/or modified under the terms
% of the LaTeX Project Public License Distributed from CTAN
@@ -617,16 +663,15 @@
% \item The language definition files \verb|french.idf| and
% \verb|german.idf| are not yet commented.
% \item Isodate and draftcopy do not work together.
+% \item Documentation of the code is partly poor.
% \end{itemize}
%
% \section{Planned features and changes}
%
% \begin{itemize}
-% \item Of course eliminate the errors.
% \item Add other languages.
% Please help me with this topic. I don't know the date formats in
% other languages.
-% \item Add a command that prints only the month and the year of a date.
% \item Format short given years to four digits and calculate
% reasonable first and second digits.
% \end{itemize}
@@ -659,8 +704,8 @@
%<italian>\ProvidesFile{italian.idf}
%<norsk>\ProvidesFile{norsk.idf}
%<swedish>\ProvidesFile{swedish.idf}
-%<isodate> [2005/04/15 v2.28 Print dates with different formats (HH)]
-%<language> [2005/04/15 v2.28 Language definitions for isodate package (HH)]
+%<isodate> [2010/01/03 v2.30 Print dates with different formats (HH)]
+%<language> [2010/01/03 v2.30 Language definitions for isodate package (HH)]
% \end{macrocode}
% The package:
% \begin{macrocode}
@@ -692,6 +737,12 @@
\DeclareOption{cleanlook}{\AtEndOfPackage{\cleanlookdateon}}
\DeclareOption{nocleanlook}{\AtEndOfPackage{\cleanlookdateoff}}
% \end{macrocode}
+% \changes{2.30}{2010/01/03}{Add a month-year format}%
+% Declare the options which decide wheather day is printed.
+% \begin{macrocode}
+\DeclareOption{printdayoff}{\AtEndOfPackage{\printdayoff}}
+\DeclareOption{printdayon}{\AtEndOfPackage{\printdayon}}
+% \end{macrocode}
% \changes{2.26}{2005/03/10}{Support different input formats
% containing slashes}%
% Declare the options for the default date input format.
@@ -743,7 +794,7 @@
% \end{macrocode}
% Set default option to \verb|orig|.
% \begin{macrocode}
-\ExecuteOptions{orig,nocleanlook}
+\ExecuteOptions{orig,nocleanlook,printdayon}
% \end{macrocode}
% Process the options.
% \begin{macrocode}
@@ -863,20 +914,20 @@
% \begin{macrocode}
\DeclareRobustCommand*\dateinputformat[1]{%
\ifthenelse{%
- \equal{#1}{english}\or
- \equal{#1}{british}\or
+ \equal{#1}{english}\OR
+ \equal{#1}{british}\OR
\equal{#1}{UKenglish}}{%
\def\iso@inputformat{english}%
}{%
\ifthenelse{%
- \equal{#1}{american}\or
+ \equal{#1}{american}\OR
\equal{#1}{USenglish}}{%
\def\iso@inputformat{american}%
}{%
\ifthenelse{%
- \equal{#1}{tex}\or
- \equal{#1}{TeX}\or
- \equal{#1}{latex}\or
+ \equal{#1}{tex}\OR
+ \equal{#1}{TeX}\OR
+ \equal{#1}{latex}\OR
\equal{#1}{LaTeX}}{%
\def\iso@inputformat{tex}%
}{%
@@ -1008,7 +1059,7 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\isodash}
-% Changes the dash in the ISO date format. The default is ``-''.
+% Changes the dash in the ISO date format. The default is `-'.
% \begin{macrocode}
\def\iso@isodash{-}%
\DeclareRobustCommand*\isodash[1]{\def\iso@isodash{#1}}%
@@ -1024,7 +1075,7 @@
% \end{macro}
% \begin{macro}{\isorangesign}
% Defines the sign or word that is printed between the two dates in a
-% date range. e.g., in English the default is ``~to~''.
+% date range. e.g., in English the default is `~to~'.
% \begin{macrocode}
\def\iso@rangesign{\csname iso@rangesign@\iso@languagename\endcsname}%
\DeclareRobustCommand*\isorangesign[1]{\def\iso@rangesign{#1}}%
@@ -1043,12 +1094,25 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \begin{macro}{\printdayoff}
+% \begin{macro}{\printdayon}
+% \changes{2.30}{2010/01/03}{Add a month-year format}%
+% Switch on or off suppressing the day in date output.
+% Default is not print the day.
+% \begin{macrocode}
+\newif\ifiso@doprintday
+\DeclareRobustCommand*\printdayon{\iso@doprintdaytrue}
+\DeclareRobustCommand*\printdayoff{\iso@doprintdayfalse}
+\printdayon
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
% \begin{macro}{\cleanlookdateoff}
% \begin{macro}{\cleanlookdateon}
% \changes{2.28}{2005/04/15}{Introduce option cleanlook for English
% date format}%
-% Switch on or off ``clean look'' for English dates.
-% Default is not to use ``clean look''.
+% Switch on or off `clean look' for English dates.
+% Default is not to use `clean look'.
% \begin{macrocode}
\newif\ifiso@cleanlook
\DeclareRobustCommand*\cleanlookdateon{\iso@cleanlooktrue}
@@ -1057,6 +1121,24 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \begin{macro}{\isospacebeforeday}
+% \begin{macro}{\isospacebeforemonth}
+% \begin{macro}{\isospacebeforeyear}
+% \changes{2.29}{2007/04/09}{Allow to change the unbreakable spaces in
+% the orig and shortorig format}%
+% Change the spaces in the orig and short orig format.
+% Default is |~| for all of them.
+% \begin{macrocode}
+\newcommand*\iso@daysep{~}
+\newcommand*\iso@monthsep{~}
+\newcommand*\iso@yearsep{~}
+\DeclareRobustCommand*\isospacebeforeday[1]{\def\iso@daysep{#1}}
+\DeclareRobustCommand*\isospacebeforemonth[1]{\def\iso@monthsep{#1}}
+\DeclareRobustCommand*\isospacebeforeyear[1]{\def\iso@yearsep{#1}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
% \begin{macro}{\iso@printdate}
% Defines the command \verb|iso@printdate| which takes three arguments
% (year, month, day) and prints the date by using the \cs{today} command.
@@ -1099,25 +1181,25 @@
% \begin{macrocode}
\edef\iso@date{#1}%
% \end{macrocode}
-% Count appearances of ``/'', ``-'', and ``.'' in the argument.
+% Count appearances of `/', `-', and `.' in the argument.
% \begin{macrocode}
\SubStringsToCounter{iso@slash}{/}{\iso@date}%
\SubStringsToCounter{iso@minus}{-}{\iso@date}%
\SubStringsToCounter{iso@dot}{.}{\iso@date}%
% \end{macrocode}
-% If number of ``.'' in the argument is equal to 2 then the German
+% If number of `.' in the argument is equal to 2 then the German
% format \verb|dd.mm.yyyy| is used.
% \begin{macrocode}
\ifthenelse{\equal{\theiso@dot}{2}}{%
\expandafter\iso@input@german\iso@date\@empty}{%
% \end{macrocode}
-% If number of ``-'' in the argument is equal to 2 then the ISO
+% If number of `-' in the argument is equal to 2 then the ISO
% format \verb|yyyy-mm-dd| is used.
% \begin{macrocode}
\ifthenelse{\equal{\theiso@minus}{2}}{%
\expandafter\iso@input@iso\iso@date\@empty}{%
% \end{macrocode}
-% If number of ``/'' in the argument is equal to 2 then the British English
+% If number of `/' in the argument is equal to 2 then the British English
% format \verb|dd/mm/yyyy| is used.
% \begin{macrocode}
\ifthenelse{\equal{\theiso@slash}{2}}{%
@@ -1180,11 +1262,11 @@
% \begin{macrocode}
\edef\iso@date{#1}%
% \end{macrocode}
-% Count appearances of ``/'' in the argument.
+% Count appearances of `/' in the argument.
% \begin{macrocode}
\SubStringsToCounter{iso@slash}{/}{\iso@date}%
% \end{macrocode}
-% If number of ``/'' in the argument is equal to 2 then the \LaTeX\
+% If number of `/' in the argument is equal to 2 then the \LaTeX\
% format \verb|yyyy/mm/dd| is used.
% \begin{macrocode}
\ifthenelse{\equal{\theiso@slash}{2}}{%
@@ -1210,6 +1292,80 @@
\def\iso@input@TeX#1/#2/#3\@empty{\iso@printdate{#1}{#2}{#3}}
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\iso@printmonthday@int}
+% ??????
+% \begin{macrocode}
+\def\iso@printmonthday@int#1#2{%
+ \ifthenelse{\equal{\iso@dateformat}{iso}}{%
+ \iso@printmonth{#1}%
+ \ifiso@doprintday
+ \iso@isodash\iso@printday{#2}%
+ \fi
+ }{%
+ \ifthenelse{\equal{\iso@dateformat}{TeX}}{%
+ \iso@printmonth{#1}%
+ \ifiso@doprintday
+ /\iso@printday{#2}%
+ \fi
+ }{%
+ \PackageError{isodate.sty}{\csname iso@printmonthday\endcsname:
+ Invalid date format `\iso@dateformat'}{Internal error. Please
+ report to the package author.}
+ }%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\iso@printdate@int}
+% ??????
+% \begin{macrocode}
+\def\iso@printdate@int#1#2#3{%
+ \ifiso@printyear
+ \ifthenelse{\equal{\iso@dateformat}{iso}}{%
+ \iso@yearfour{\number#1}\iso@isodash%
+ }{%
+ \ifthenelse{\equal{\iso@dateformat}{TeX}}{%
+ \iso@yearfour{\number#1}/%
+ }{%
+ \PackageError{isodate.sty}{\csname iso@printmonthday\endcsname:
+ Invalid date format `\iso@dateformat'}{Internal error. Please
+ report to the package author.}
+ }%
+ }%
+ \fi
+ \csname iso@printmonthday@int\endcsname{\number#2}{\number#3}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\iso@daterange@int}
+% ??????
+% \begin{macrocode}
+\def\iso@daterange@int#1#2#3#4#5#6{%
+ \ifthenelse{\equal{\iso@dateformat}{iso}\OR
+ \equal{\iso@dateformat}{TeX}}{%
+ \csname iso@printdate@\iso@languagename\endcsname{#1}{#2}{#3}%
+ \iso@rangesign%
+ \ifthenelse{\equal{\number#1}{\number#4}}{%
+ \ifthenelse{\equal{\number#2}{\number#5}}{%
+ \ifiso@doprintday
+ \iso@printday{#6}%
+ \else
+ \iso@printmonthday@int{#5}{#6}%
+ \fi
+ }{%
+ \iso@printmonthday@int{#5}{#6}%
+ }%
+ }{%
+ \iso@printdate@int{#4}{#5}{#6}%
+ }%
+ }{%
+ \PackageError{isodate.sty}{\csname iso@printmonthday\endcsname:
+ Invalid date format `\iso@dateformat'}{Internal error. Please
+ report to the package author.}
+ }%
+}
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{\daterange}
% Prints a date range.
% \begin{macrocode}
@@ -1223,7 +1379,7 @@
\edef\iso@@date{#2}%
\edef\iso@@@date{\iso@date,\iso@@date}%
% \end{macrocode}
-% Count appearances of ``/'', ``-'', and ``.'' in the arguments.
+% Count appearances of `/', `-', and `.' in the arguments.
% \begin{macrocode}
\SubStringsToCounter{iso@slash}{/}{\iso@date}%
\SubStringsToCounter{iso@minus}{-}{\iso@date}%
@@ -1232,22 +1388,22 @@
\SubStringsToCounter{iso@@minus}{-}{\iso@@date}%
\SubStringsToCounter{iso@@dot}{.}{\iso@@date}%
% \end{macrocode}
-% If number of ``.'' in both arguments is equal to 2 then the German
+% If number of `.' in both arguments is equal to 2 then the German
% format \verb|dd.mm.yyyy| is used.
% \begin{macrocode}
- \ifthenelse{\equal{\theiso@dot}{2}\and\equal{\theiso@@dot}{2}}{%
+ \ifthenelse{\equal{\theiso@dot}{2}\AND\equal{\theiso@@dot}{2}}{%
\expandafter\iso@range@input@german\iso@@@date\@empty}{%
% \end{macrocode}
-% If number of ``-'' in both arguments is equal to 2 then the ISO
+% If number of `-' in both arguments is equal to 2 then the ISO
% format \verb|yyyy-mm-dd| is used.
% \begin{macrocode}
- \ifthenelse{\equal{\theiso@minus}{2}\and\equal{\theiso@@minus}{2}}{%
+ \ifthenelse{\equal{\theiso@minus}{2}\AND\equal{\theiso@@minus}{2}}{%
\expandafter\iso@range@input@iso\iso@@@date\@empty}{%
% \end{macrocode}
-% If number of ``/'' in both arguments is equal to 2 then the British English
+% If number of `/' in both arguments is equal to 2 then the British English
% format \verb|dd/mm/yyyy| is used.
% \begin{macrocode}
- \ifthenelse{\equal{\theiso@slash}{2}\and%
+ \ifthenelse{\equal{\theiso@slash}{2}\AND
\equal{\theiso@@slash}{2}}{%
\expandafter\iso@range@input@english\iso@@@date\@empty}{%
% \end{macrocode}
@@ -1393,8 +1549,8 @@
}
% \end{macrocode}
% \end{macro}
-% Define the counters for conting the appearances of ``.'', ``-'', and
-% ''/'' in the arguments.
+% Define the counters for conting the appearances of `.', `-', and
+% '/' in the arguments.
% \begin{macrocode}
\newcounter{iso@slash}
\newcounter{iso@minus}
@@ -1408,7 +1564,7 @@
% babel.sty, german.sty, or ngerman.sty.
%
% If neither babel.sty nor german.sty nor ngerman.sty is loaded my
-% computer returns ``nohyphenation'' when using \verb|\languagename|.
+% computer returns `nohyphenation' when using \verb|\languagename|.
% So this is the indication that none of the above packages is loaded.
% \changes{2.01}{2000/08/24}{Handle case of not loaded language
% package babel, german and ngerman}
@@ -1430,7 +1586,7 @@
\typeout{isodate: ngerman.sty has been loaded}%
}{}%
% \end{macrocode}
-% The language is not equal ``nohyphenation''. So one of the language
+% The language is not equal `nohyphenation'. So one of the language
% packages is loaded. Replace the internal language name
% \verb|\iso@languagename| by the global language name \verb|\languagename|.
% \begin{macrocode}
@@ -1482,88 +1638,106 @@
% Prints the month and the day given as two arguments
% (\verb|{mm}{dd}|) in the current date format.
% \begin{macrocode}
- \def\iso@printmonthday@danish#1#2{%
+\def\iso@printmonthday@danish#1#2{%
+ \ifthenelse{\equal{\iso@dateformat}{iso}\OR
+ \equal{\iso@dateformat}{TeX}}{%
+ \iso@printmonthday@int{#1}{#2}%
+ }{%
% \end{macrocode}
% Numeric and short date format: \verb|dd/mm/|
% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{numeric}\or%
- \equal{\iso@dateformat}{short}}{%
- \iso@printday{#2}/\iso@printmonth{#1}\ifiso@printyear/\fi}{%
-% \end{macrocode}
-% ISO date format: \verb|-mm-dd|
-% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{iso}}{%
- \ifiso@printyear\iso@isodash\fi\iso@printmonth{#1}%
- \iso@isodash\iso@printday{#2}}{%
-% \end{macrocode}
-% \LaTeX\ date format: \verb|/mm/dd|
-% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{TeX}}{%
- \ifiso@printyear/\fi\iso@printmonth{#1}/\iso@printday{#2}}{%
+ \ifthenelse{\equal{\iso@dateformat}{numeric}\OR
+ \equal{\iso@dateformat}{short}}{%
+ \ifiso@doprintday
+ \iso@printday{#2}/%
+ \fi
+ \iso@printmonth{#1}%
+ }{%
% \end{macrocode}
% Original date format: \verb|d. mmm|
% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{orig}\or
- \equal{\iso@dateformat}{shortorig}}{%
- \iso@printday{#2}.~\begingroup
- \edef\lmonth{#1}\def\month{\lmonth}%
- \month@danish%
- \endgroup
- }{}}}}%
- }
+ \ifthenelse{\equal{\iso@dateformat}{orig}\OR
+ \equal{\iso@dateformat}{shortorig}}{%
+ \ifiso@doprintday
+ \iso@printday{#2}.\iso@monthsep
+ \fi
+ \begingroup
+ \edef\lmonth{#1}\def\month{\lmonth}%
+ \month@danish%
+ \endgroup
+ }{}%
+ }%
+ }%
+}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\iso@printdate@danish}
% Prints the date given as three arguments (\verb|{yyyy}{mm}{dd}|) in
% the actual date format
% \begin{macrocode}
- \def\iso@printdate@danish#1#2#3{%
+\def\iso@printdate@danish#1#2#3{%
% \end{macrocode}
% ISO or \LaTeX date format: \verb|yyyy\iso@printmonthday@danish|
% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{iso}\or%
- \equal{\iso@dateformat}{TeX}}{%
- \ifiso@printyear
- \number#1%
- \fi}{}%
+ \ifthenelse{\equal{\iso@dateformat}{iso}\OR
+ \equal{\iso@dateformat}{TeX}}{%
+ \iso@printdate@int{#1}{#2}{#3}%
+ }{%
\iso@printmonthday@danish{\number#2}{\number#3}%
\ifiso@printyear
% \end{macrocode}
+% ?????
+% \begin{macrocode}
+ \ifthenelse{\equal{\iso@dateformat}{orig}\OR
+ \equal{\iso@dateformat}{shortorig}}{%
+ }{%
+ /%
+ }%
+% \end{macrocode}
% numeric date format: \verb|\iso@printmonthday@danish yyyy|
% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{numeric}}{\iso@yearfour{\number#1}}{%
+ \ifthenelse{\equal{\iso@dateformat}{numeric}}{%
+ \iso@yearfour{\number#1}%
+ }{%
% \end{macrocode}
% original date format: \verb|\iso@printmonthday@danish~yyyy|
% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{orig}}{~\iso@yearfour{\number#1}}{%
+ \ifthenelse{\equal{\iso@dateformat}{orig}}{%
+ \iso@yearsep\iso@yearfour{\number#1}%
+ }{%
% \end{macrocode}
% short original date format: \verb|\iso@printmonthday@danish~yy|
% \begin{macrocode}
\ifthenelse{\equal{\iso@dateformat}{shortorig}}{%
- ~\iso@twodigitsign\iso@yeartwo{\number#1}}{%
+ \iso@yearsep\iso@twodigitsign\iso@yeartwo{\number#1}%
+ }{%
% \end{macrocode}
% short date format: \verb|\iso@printmonthday@danish yy|
% \begin{macrocode}
\ifthenelse{\equal{\iso@dateformat}{short}}{%
- \iso@yeartwo{\number#1}}{%
- }}}}%
- \fi
- }
+ \iso@yeartwo{\number#1}%
+ }{}%
+ }%
+ }%
+ }%
+ \fi
+ }%
+}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\iso@datedanish}
% This command redefines the \cs{today} command to print in the
% actual date format.
% \begin{macrocode}
- \def\iso@datedanish{%
- \def\today{\iso@printdate@danish{\year}{\month}{\day}}}%
+\def\iso@datedanish{%
+ \def\today{\iso@printdate@danish{\year}{\month}{\day}}}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\iso@daterange@...}
% Define date-range commands for dialects.
% \begin{macrocode}
- \expandafter\def\csname iso@daterange@\CurrentOption\endcsname{%
- \iso@daterange@danish}%
+\expandafter\def\csname iso@daterange@\CurrentOption\endcsname{%
+ \iso@daterange@danish}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\iso@daterange@danish}
@@ -1575,22 +1749,12 @@
% \end{macrocode}
% ISO or \LaTeX\ date format.
% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{iso}\or%
+ \ifthenelse{\equal{\iso@dateformat}{iso}\OR
\equal{\iso@dateformat}{TeX}}{%
% \end{macrocode}
-% Print the start date.
-% \begin{macrocode}
- \csname iso@printdate@\iso@languagename\endcsname{%
- #1}{#2}{#3}\iso@rangesign%
-% \end{macrocode}
-% If year and month are equal, only print the day of the end date. If
-% only the year is equal, only print month and day of the end
-% date. Otherwise print the whole end date.
+% Call the appropriate international routine.
% \begin{macrocode}
- \ifthenelse{\equal{\number#1}{\number#4}}{%
- \ifthenelse{\equal{\number#2}{\number#5}}{\iso@printday{#6}%
- }{\iso@printmonthday@danish{#5}{#6}}}{%
- \csname iso@printdate@\iso@languagename\endcsname{#4}{#5}{#6}}%
+ \iso@daterange@int{#1}{#2}{#3}{#4}{#5}{#6}%
}{%
% \end{macrocode}
% Numeric, short, or original date format.
@@ -1601,27 +1765,33 @@
% \begin{macrocode}
\ifthenelse{\equal{\number#1}{\number#4}}{%
\ifthenelse{\equal{\number#2}{\number#5}}{%
- \ifthenelse{\equal{\iso@dateformat}{orig}\or
- \equal{\iso@dateformat}{shortorig}}{%
- \iso@printday{#3}.}{\iso@printday{#3}}%
- }{\iso@printmonthday@danish{#2}{#3}}}{%
- \begingroup
- \printyearon
- \csname iso@printdate@\iso@languagename\endcsname{%
- #1}{#2}{#3}%
- \endgroup}%
+ \ifiso@doprintday
+ \ifthenelse{\equal{\iso@dateformat}{orig}\OR
+ \equal{\iso@dateformat}{shortorig}}{%
+ \iso@printday{#3}.%
+ }{%
+ \iso@printday{#3}%
+ }%
+ \else
+ \iso@printmonthday@danish{#2}{#3}%
+ \fi
+ }{%
+ \iso@printmonthday@danish{#2}{#3}%
+ }%
+ }{%
+ \csname iso@printdate@\iso@languagename\endcsname{#1}{#2}{#3}%
+ }%
% \end{macrocode}
% Print the end date.
% \begin{macrocode}
- \iso@rangesign\csname iso@printdate@\iso@languagename\endcsname{%
- #4}{#5}{#6}%
- }{%
+ \iso@rangesign
+ \csname iso@printdate@\iso@languagename\endcsname{#4}{#5}{#6}%
}%
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\iso@rangesign@danish}
-% Sets the word between start and end date in a date range to ``~til~''.
+% Sets the word between start and end date in a date range to `~til~'.
% \begin{macrocode}
\expandafter\def\csname iso@rangesign@\CurrentOption\endcsname{~til~}
% \end{macrocode}
@@ -1675,10 +1845,10 @@
%
% First handle British English.
% \begin{macrocode}
-\ifthenelse{\equal{\CurrentOption}{english}\or
- \equal{\CurrentOption}{british}\or
+\ifthenelse{\equal{\CurrentOption}{english}\OR
+ \equal{\CurrentOption}{british}\OR
\equal{\CurrentOption}{UKenglish}}{%
-\typeout{Define commands for English date format}
+ \typeout{Define commands for English date format}
% \end{macrocode}
% \begin{macro}{\day@english}
% \changes{2.28}{2005/04/15}{Introduce option cleanlook for English
@@ -1710,31 +1880,34 @@
% \end{macrocode}
% Numeric and short date format: \verb|dd/mm/|
% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{numeric}\or%
- \equal{\iso@dateformat}{short}}{%
- \iso@printday{#2}/\iso@printmonth{#1}\ifiso@printyear/\fi}{%
-% \end{macrocode}
-% ISO date format: \verb|mm-dd|
-% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{iso}}{%
- \iso@printmonth{#1}\iso@isodash\iso@printday{#2}}{%
-% \end{macrocode}
-% \LaTeX\ date format: \verb|mm/dd|
-% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{TeX}}{%
- \iso@printmonth{#1}/\iso@printday{#2}}{%
+ \ifthenelse{\equal{\iso@dateformat}{iso}\OR
+ \equal{\iso@dateformat}{TeX}}{%
+ \iso@printmonthday@int{#1}{#2}%
+ }{%
+ \ifthenelse{\equal{\iso@dateformat}{numeric}\OR
+ \equal{\iso@dateformat}{short}}{%
+ \ifiso@doprintday
+ \iso@printday{#2}/%
+ \fi
+ \iso@printmonth{#1}%
+ }{%
% \end{macrocode}
% Original date format: \verb|ddd mmm|
% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{orig}\or
- \equal{\iso@dateformat}{shortorig}}{%
- \begingroup
- \edef\lday{#2}\def\day{\lday}%
- \edef\lmonth{#1}\def\month{\lmonth}%
- \day@english~\month@english%
- \endgroup
- }{}}}}%
- }
+ \ifthenelse{\equal{\iso@dateformat}{orig}\OR
+ \equal{\iso@dateformat}{shortorig}}{%
+ \begingroup
+ \edef\lday{#2}\def\day{\lday}%
+ \edef\lmonth{#1}\def\month{\lmonth}%
+ \ifiso@doprintday
+ \day@english\iso@monthsep\@empty
+ \fi
+ \month@english
+ \endgroup
+ }{}%
+ }%
+ }%
+ }
% \end{macrocode}
% \end{macro}
% \begin{macro}{\iso@printdate@english}
@@ -1742,39 +1915,49 @@
% the actual date format.
% \begin{macrocode}
\def\iso@printdate@english#1#2#3{%
+ \ifthenelse{\equal{\iso@dateformat}{iso}\OR
+ \equal{\iso@dateformat}{TeX}}{%
+ \iso@printdate@int{#1}{#2}{#3}%
+ }{%
% \end{macrocode}
% ISO date format: \verb|yyyy-\iso@printmonthday@english|
% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{iso}}{%
- \ifiso@printyear\iso@yearfour{\number#1}\iso@isodash\fi}{%
-% \end{macrocode}
-% \LaTeX\ date format: \verb|yyyy/\iso@printmonthday@english|
-% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{TeX}}{%
- \ifiso@printyear\iso@yearfour{\number#1}/\fi}{}}%
- \iso@printmonthday@english{\number#2}{\number#3}%
+ \iso@printmonthday@english{\number#2}{\number#3}%
% \end{macrocode}
% Numeric date format: \verb|\iso@printmonthday@english yyyy|
% \begin{macrocode}
- \ifiso@printyear
- \ifthenelse{\equal{\iso@dateformat}{numeric}}{\iso@yearfour{\number#1}}{%
+ \ifiso@printyear
+ \ifthenelse{\equal{\iso@dateformat}{orig}\OR
+ \equal{\iso@dateformat}{shortorig}}{%
+ }{%
+ /%
+ }%
+ \ifthenelse{\equal{\iso@dateformat}{numeric}}{%
+ \iso@yearfour{\number#1}%
+ }{%
% \end{macrocode}
% Original date format: \verb|\iso@printmonthday@english~yyyy|
% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{orig}}{~\iso@yearfour{\number#1}}{%
+ \ifthenelse{\equal{\iso@dateformat}{orig}}{%
+ \iso@yearsep\iso@yearfour{\number#1}%
+ }{%
% \end{macrocode}
% Short original date format: \verb|\iso@printmonthday@english~yy|
% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{shortorig}}{%
- ~\iso@twodigitsign\iso@yeartwo{\number#1}}{%
+ \ifthenelse{\equal{\iso@dateformat}{shortorig}}{%
+ \iso@yearsep\iso@twodigitsign\iso@yeartwo{\number#1}%
+ }{%
% \end{macrocode}
% Short date format: \verb|\iso@printmonthday@english yy|
% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{short}}{%
- \iso@yeartwo{\number#1}}{%
- }}}%
- }%
- \fi
+ \ifthenelse{\equal{\iso@dateformat}{short}}{%
+ \iso@yeartwo{\number#1}%
+ }{}%
+ }%
+ }%
+ }%
+ \fi
+ }%
}
% \end{macrocode}
% \end{macro}
@@ -1809,22 +1992,13 @@
% \end{macrocode}
% ISO or \LaTeX\ date format.
% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{iso}\or%
+ \ifthenelse{\equal{\iso@dateformat}{iso}\OR
\equal{\iso@dateformat}{TeX}}{%
% \end{macrocode}
% Print the start date.
% \begin{macrocode}
- \csname iso@printdate@\iso@languagename\endcsname{%
- #1}{#2}{#3}\iso@rangesign%
-% \end{macrocode}
-% If year and month are equal, only print the day of the end date. If
-% only the year is equal, only print month and day of the end
-% date. Otherwise print the whole end date.
-% \begin{macrocode}
- \ifthenelse{\equal{\number#1}{\number#4}}{%
- \ifthenelse{\equal{\number#2}{\number#5}}{\iso@printday{#6}%
- }{\iso@printmonthday@english{#5}{#6}}}{%
- \csname iso@printdate@\iso@languagename\endcsname{#4}{#5}{#6}}}{%
+ \iso@daterange@int{#1}{#2}{#3}{#4}{#5}{#6}%
+ }{%
% \end{macrocode}
% Numeric, short, or original date format.
%
@@ -1834,19 +2008,30 @@
% \begin{macrocode}
\ifthenelse{\equal{\number#1}{\number#4}}{%
\ifthenelse{\equal{\number#2}{\number#5}}{%
- \ifthenelse{\equal{\iso@dateformat}{orig}\or
- \equal{\iso@dateformat}{shortorig}}{%
- \begingroup
+ \ifiso@doprintday
+ \ifthenelse{\equal{\iso@dateformat}{orig}\OR
+ \equal{\iso@dateformat}{shortorig}}{%
+ \begingroup
\edef\lday{#3}\def\day{\lday}%
- \day@english\endgroup}{\iso@printday{#3}}%
- }{\iso@printmonthday@english{#2}{#3}}}{%
- \csname iso@printdate@\iso@languagename\endcsname{#1}{#2}{#3}}%
+ \day@english
+ \endgroup
+ }{%
+ \iso@printday{#3}%
+ }%
+ \else
+ \csname iso@printmonthday@\iso@languagename\endcsname{#2}{#3}%
+ \fi
+ }{%
+ \csname iso@printmonthday@\iso@languagename\endcsname{#2}{#3}%
+ }%
+ }{%
+ \csname iso@printdate@\iso@languagename\endcsname{#1}{#2}{#3}%
+ }%
% \end{macrocode}
% Print the end date.
% \begin{macrocode}
- \iso@rangesign\csname iso@printdate@\iso@languagename\endcsname{%
- #4}{#5}{#6}%
- }{%
+ \iso@rangesign
+ \csname iso@printdate@\iso@languagename\endcsname{#4}{#5}{#6}%
}%
}
% \end{macrocode}
@@ -1866,43 +2051,45 @@
% Second handle Australian and New Zealand.
% \begin{macrocode}
}{%
- \ifthenelse{\equal{\CurrentOption}{australian}\or%
+ \ifthenelse{\equal{\CurrentOption}{australian}\OR
\equal{\CurrentOption}{newzealand}}{%
- \typeout{Define commands for Australian date format}
+ \typeout{Define commands for Australian date format}
% \end{macrocode}
% \begin{macro}{\iso@printmonthday@australian}
% Prints the month and the day given as two arguments
% (\verb|{mm}{dd}|) in the current date format.
% \begin{macrocode}
\def\iso@printmonthday@australian#1#2{%
+ \ifthenelse{\equal{\iso@dateformat}{iso}\OR
+ \equal{\iso@dateformat}{TeX}}{%
+ \iso@printmonthday@int{#1}{#2}%
+ }{%
% \end{macrocode}
% Numeric and short date format: \verb|dd/mm/|
% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{numeric}\or%
- \equal{\iso@dateformat}{short}}{%
- \iso@printday{#2}/\iso@printmonth{#1}\ifiso@printyear/\fi}{%
-% \end{macrocode}
-% ISO date format: \verb|mm-dd|
-% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{iso}}{%
- \iso@printmonth{#1}\iso@isodash\iso@printday{#2}}{%
-% \end{macrocode}
-% \LaTeX\ date format: \verb|mm/dd|
-% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{TeX}}{%
- \iso@printmonth{#1}/\iso@printday{#2}}{%
+ \ifthenelse{\equal{\iso@dateformat}{numeric}\OR
+ \equal{\iso@dateformat}{short}}{%
+ \ifiso@doprintday
+ \iso@printday{#2}/%
+ \fi
+ \iso@printmonth{#1}%
+ }{%
% \end{macrocode}
% Original date format: \verb|ddd mmm|
% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{orig}\or
- \equal{\iso@dateformat}{shortorig}}{%
- \begingroup
-% \edef\lday{#2}\def\day{\lday}%
- \edef\lmonth{#1}\def\month{\lmonth}%
- \iso@printday{#2}~\month@english%
- \endgroup
- }{}}}}%
- }
+ \ifthenelse{\equal{\iso@dateformat}{orig}\OR
+ \equal{\iso@dateformat}{shortorig}}{%
+ \begingroup
+ \edef\lmonth{#1}\def\month{\lmonth}%
+ \ifiso@doprintday
+ \iso@printday{#2}\iso@monthsep\@empty
+ \fi
+ \month@english
+ \endgroup
+ }{}%
+ }%
+ }%
+ }
% \end{macrocode}
% \end{macro}
% \begin{macro}{\iso@printdate@australian}
@@ -1910,44 +2097,46 @@
% the actual date format.
% \begin{macrocode}
\def\iso@printdate@australian#1#2#3{%
-% \end{macrocode}
-% ISO date format: \verb|yyyy-\iso@printmonthday@australian|
-% \begin{macrocode}
- \ifiso@printyear
- \ifthenelse{\equal{\iso@dateformat}{iso}}{%
- \iso@yearfour{\number#1}\iso@isodash}{%
-% \end{macrocode}
-% \LaTeX\ date format: \verb|yyyy/\iso@printmonthday@australian|
-% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{TeX}}{%
- \iso@yearfour{\number#1}/}{}%
- }%
- \fi
- \iso@printmonthday@australian{\number#2}{\number#3}%
+ \ifthenelse{\equal{\iso@dateformat}{iso}\OR
+ \equal{\iso@dateformat}{TeX}}{%
+ \iso@printdate@int{#1}{#2}{#3}%
+ }{%
+ \iso@printmonthday@australian{\number#2}{\number#3}%
% \end{macrocode}
% Numeric date format: \verb|\iso@printmonthday@australian yyyy|
% \begin{macrocode}
- \ifiso@printyear
- \ifthenelse{\equal{\iso@dateformat}{numeric}}{%
- \iso@yearfour{\number#1}}{%
+ \ifiso@printyear
+ \ifthenelse{\equal{\iso@dateformat}{orig}\OR
+ \equal{\iso@dateformat}{shortorig}}{%
+ }{%
+ /%
+ }%
+ \ifthenelse{\equal{\iso@dateformat}{numeric}}{%
+ \iso@yearfour{\number#1}%
+ }{%
% \end{macrocode}
% Original date format: \verb|\iso@printmonthday@australian~yyyy|
% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{orig}}{%
- ~\iso@yearfour{\number#1}}{%
+ \ifthenelse{\equal{\iso@dateformat}{orig}}{%
+ \iso@yearsep\iso@yearfour{\number#1}%
+ }{%
% \end{macrocode}
% Short original date format: \verb|\iso@printmonthday@australian~yy|
% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{shortorig}}{%
- ~\iso@twodigitsign\iso@yeartwo{\number#1}}{%
+ \ifthenelse{\equal{\iso@dateformat}{shortorig}}{%
+ \iso@yearsep\iso@twodigitsign\iso@yeartwo{\number#1}%
+ }{%
% \end{macrocode}
% Short date format: \verb|\iso@printmonthday@australian yy|
% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{short}}{%
- \iso@yeartwo{\number#1}}{%
- }}}%
- }%
- \fi
+ \ifthenelse{\equal{\iso@dateformat}{short}}{%
+ \iso@yeartwo{\number#1}%
+ }{}%
+ }%
+ }%
+ }%
+ \fi
+ }%
}
% \end{macrocode}
% \end{macro}
@@ -1968,8 +2157,8 @@
% \begin{macro}{\iso@daterange@...}
% Define date-range commands for dialects of Australian.
% \begin{macrocode}
- \expandafter\def\csname iso@daterange@\CurrentOption\endcsname{%
- \iso@daterange@australian}%
+ \expandafter\def\csname iso@daterange@\CurrentOption\endcsname{%
+ \iso@daterange@australian}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\iso@daterange@australian}
@@ -1981,22 +2170,13 @@
% \end{macrocode}
% ISO or \LaTeX\ date format.
% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{iso}\or%
+ \ifthenelse{\equal{\iso@dateformat}{iso}\OR
\equal{\iso@dateformat}{TeX}}{%
% \end{macrocode}
% Print the start date.
% \begin{macrocode}
- \csname iso@printdate@\iso@languagename\endcsname{%
- #1}{#2}{#3}\iso@rangesign%
-% \end{macrocode}
-% If year and month are equal, only print the day of the end date. If
-% only the year is equal, only print month and day of the end
-% date. Otherwise print the whole end date.
-% \begin{macrocode}
- \ifthenelse{\equal{\number#1}{\number#4}}{%
- \ifthenelse{\equal{\number#2}{\number#5}}{\iso@printday{#6}%
- }{\iso@printmonthday@australian{#5}{#6}}}{%
- \csname iso@printdate@\iso@languagename\endcsname{#4}{#5}{#6}}}{%
+ \iso@daterange@int{#1}{#2}{#3}{#4}{#5}{#6}%
+ }{%
% \end{macrocode}
% Numeric, short, or original date format.
%
@@ -2006,18 +2186,22 @@
% \begin{macrocode}
\ifthenelse{\equal{\number#1}{\number#4}}{%
\ifthenelse{\equal{\number#2}{\number#5}}{%
- \ifthenelse{\equal{\iso@dateformat}{orig}}{%
- \begingroup
-% \edef\lday{#3}\def\day{\lday}%
- \iso@printday{#3}\endgroup}{\iso@printday{#3}}%
- }{\iso@printmonthday@australian{#2}{#3}}}{%
- \csname iso@printdate@\iso@languagename\endcsname{#1}{#2}{#3}}%
+ \ifiso@doprintday
+ \iso@printday{#3}%
+ \else
+ \csname iso@printmonthday@\iso@languagename\endcsname{#2}{#3}%
+ \fi
+ }{%
+ \iso@printmonthday@australian{#2}{#3}%
+ }%
+ }{%
+ \csname iso@printdate@\iso@languagename\endcsname{#1}{#2}{#3}%
+ }%
% \end{macrocode}
% Print the end date.
% \begin{macrocode}
- \iso@rangesign\csname iso@printdate@\iso@languagename\endcsname{%
- #4}{#5}{#6}%
- }{%
+ \iso@rangesign
+ \csname iso@printdate@\iso@languagename\endcsname{#4}{#5}{#6}%
}%
}
% \end{macrocode}
@@ -2036,40 +2220,42 @@
% Third, handle American.
% \begin{macrocode}
}{%
- \typeout{Define commands for American date format}
+ \typeout{Define commands for American date format}
% \end{macrocode}
% \begin{macro}{\iso@printmonthday@american}
% Prints the month and the day given as two arguments
% (\verb|{mm}{dd}|) in the current date format.
% \begin{macrocode}
\def\iso@printmonthday@american#1#2{%
+ \ifthenelse{\equal{\iso@dateformat}{iso}\OR
+ \equal{\iso@dateformat}{TeX}}{%
+ \iso@printmonthday@int{#1}{#2}%
+ }{%
% \end{macrocode}
% Numeric and short date format: \verb|mm/dd/|
% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{numeric}\or%
- \equal{\iso@dateformat}{short}}{%
- \iso@printmonth{#1}/\iso@printday{#2}\ifiso@printyear/\fi}{%
-% \end{macrocode}
-% ISO date format: \verb|mm-dd|
-% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{iso}}{%
- \iso@printmonth{#1}\iso@isodash\iso@printday{#2}}{%
-% \end{macrocode}
-% \LaTeX\ date format: \verb|mm/dd|
-% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{TeX}}{%
- \iso@printmonth{#1}/\iso@printday{#2}}{%
+ \ifthenelse{\equal{\iso@dateformat}{numeric}\OR
+ \equal{\iso@dateformat}{short}}{%
+ \iso@printmonth{#1}%
+ \ifiso@doprintday
+ /\iso@printday{#2}%
+ \fi
+ }{%
% \end{macrocode}
% Original date format: \verb|mmm d|
% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{orig}\or
- \equal{\iso@dateformat}{shortorig}}{%
- \begingroup%
- \edef\lmonth{#1}%
- \def\month{\lmonth}\month@english%
- \endgroup
- ~\iso@printday{#2}%
- }{}}}%
+ \ifthenelse{\equal{\iso@dateformat}{orig}\OR
+ \equal{\iso@dateformat}{shortorig}}{%
+ \begingroup%
+ \edef\lmonth{#1}%
+ \def\month{\lmonth}%
+ \month@english%
+ \endgroup
+ \ifiso@doprintday
+ \iso@daysep\iso@printday{#2}%
+ \fi
+ }{}%
+ }%
}%
}
% \end{macrocode}
@@ -2079,42 +2265,48 @@
% the actual date format.
% \begin{macrocode}
\def\iso@printdate@american#1#2#3{%
-% \end{macrocode}
-% ISO date format: \verb|yyyy-\iso@printmonthday@american|
-% \begin{macrocode}
- \ifiso@printyear
- \ifthenelse{\equal{\iso@dateformat}{iso}}{%
- \iso@yearfour{\number#1}\iso@isodash}{%
-% \end{macrocode}
-% \LaTeX\ date format: \verb|yyyy/\iso@printmonthday@american|
-% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{TeX}}{%
- \iso@yearfour{\number#1}/}{}}%
- \fi
- \iso@printmonthday@american{\number#2}{\number#3}%
+ \ifthenelse{\equal{\iso@dateformat}{iso}\OR
+ \equal{\iso@dateformat}{TeX}}{%
+ \iso@printdate@int{#1}{#2}{#3}%
+ }{%
+ \iso@printmonthday@american{\number#2}{\number#3}%
% \end{macrocode}
% Numeric date format: \verb|\iso@printmonthday@american yyyy|
% \begin{macrocode}
- \ifiso@printyear
- \ifthenelse{\equal{\iso@dateformat}{numeric}}{%
- \iso@yearfour{\number#1}}{%
+ \ifiso@printyear
+ \ifthenelse{\equal{\iso@dateformat}{orig}\OR
+ \equal{\iso@dateformat}{shortorig}}{%
+ }{%
+ /%
+ }%
+ \ifthenelse{\equal{\iso@dateformat}{numeric}}{%
+ \iso@yearfour{\number#1}%
+ }{%
% \end{macrocode}
% Original date format: \verb|\iso@printmonthday@american,~yyyy|
% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{orig}}{%
- ,~\iso@yearfour{\number#1}}{%
+ \ifthenelse{\equal{\iso@dateformat}{orig}}{%
+ \ifiso@doprintday,\fi
+ \iso@yearsep\iso@yearfour{\number#1}%
+ }{%
% \end{macrocode}
% Short original date format: \verb|\iso@printmonthday@american,~yyyy|
% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{shortorig}}{%
- ,~\iso@twodigitsign\iso@yeartwo{\number#1}}{%
+ \ifthenelse{\equal{\iso@dateformat}{shortorig}}{%
+ \ifiso@doprintday,\fi
+ \iso@yearsep\iso@twodigitsign\iso@yeartwo{\number#1}%
+ }{%
% \end{macrocode}
% Short date format: \verb|\iso@printmonthday@american yy|
% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{short}}{%
- \iso@yeartwo{\number#1}}{}}}%
- }%
- \fi
+ \ifthenelse{\equal{\iso@dateformat}{short}}{%
+ \iso@yeartwo{\number#1}%
+ }{}%
+ }%
+ }%
+ }%
+ \fi
+ }%
}
% \end{macrocode}
% \end{macro}
@@ -2135,8 +2327,8 @@
% \begin{macro}{\iso@daterange@...}
% Define date-range commands for dialects of American.
% \begin{macrocode}
- \expandafter\def\csname iso@daterange@\CurrentOption\endcsname{%
- \iso@daterange@american}%
+ \expandafter\def\csname iso@daterange@\CurrentOption\endcsname{%
+ \iso@daterange@american}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\iso@daterange@american}
@@ -2148,23 +2340,13 @@
% \end{macrocode}
% ISO or \LaTeX\ date format.
% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{iso}\or%
+ \ifthenelse{\equal{\iso@dateformat}{iso}\OR
\equal{\iso@dateformat}{TeX}}{%
% \end{macrocode}
% Print the start date.
% \begin{macrocode}
- \csname iso@printdate@\iso@languagename\endcsname{#1}{#2}{#3}%
- \iso@rangesign%
-% \end{macrocode}
-% If year and month are equal, only print the day of the end date. If
-% only the year is equal, only print month and day of the end
-% date. Otherwise print the whole end date.
-% \begin{macrocode}
- \ifthenelse{\equal{\number#1}{\number#4}}{%
- \ifthenelse{\equal{\number#2}{\number#5}}{\iso@printday{#6}%
- }{\iso@printmonthday@american{#5}{#6}}}{%
- \csname iso@printdate@\iso@languagename\endcsname{%
- #4}{#5}{#6}}}{%
+ \iso@daterange@int{#1}{#2}{#3}{#4}{#5}{#6}%
+ }{%
% \end{macrocode}
% Original date format.
%
@@ -2172,22 +2354,34 @@
% only the year is equal, print \verb|mmm1 d1 to mmm2 d2, yyyy|.
% Otherwise print the whole start and end date.
% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{orig}\or
+ \ifthenelse{\equal{\iso@dateformat}{orig}\OR
\equal{\iso@dateformat}{shortorig}}{%
\ifthenelse{\equal{\number#1}{\number#4}}{%
\ifthenelse{\equal{\number#2}{\number#5}}{%
- \iso@printmonthday@american{#2}{#3}\iso@rangesign%
- \iso@printday{#6},~%
+ \iso@printmonthday@american{#2}{#3}%
+ \iso@rangesign
+ \ifiso@doprintday
+ \iso@printday{#6},\iso@yearsep\@empty
+ \else
+ \iso@printmonthday@american{#5}{#6}\iso@yearsep\@empty
+ \fi
\ifthenelse{\equal{\iso@dateformat}{orig}}{%
- \number#4}{\iso@twodigitsign\iso@yeartwo{\number#4}}%
+ \iso@yearfour{\number#4}%
}{%
- \iso@printmonthday@american{#2}{#3}\iso@rangesign%
+ \iso@twodigitsign\iso@yeartwo{\number#4}%
+ }%
+ }{%
+ \iso@printmonthday@american{#2}{#3}%
+ \iso@rangesign
\csname iso@printdate@\iso@languagename\endcsname{%
- #4}{#5}{#6}}}{%
+ #4}{#5}{#6}%
+ }%
+ }{%
\csname iso@printdate@\iso@languagename\endcsname{#1}{#2}{#3}%
\iso@rangesign%
- \csname iso@printdate@\iso@languagename\endcsname{%
- #4}{#5}{#6}}}{%
+ \csname iso@printdate@\iso@languagename\endcsname{#4}{#5}{#6}%
+ }%
+ }{%
% \end{macrocode}
% Numeric or short date format.
%
@@ -2195,13 +2389,16 @@
% Otherwise print the whole end date.
% \begin{macrocode}
\ifthenelse{\equal{\number#1}{\number#4}}{%
- \iso@printmonthday@american{#2}{#3}}{%
- \csname iso@printdate@\iso@languagename\endcsname{#1}{#2}{#3}}%
+ \iso@printmonthday@american{#2}{#3}%
+ }{%
+ \csname iso@printdate@\iso@languagename\endcsname{#1}{#2}{#3}%
+ }%
% \end{macrocode}
% Print the end date.
% \begin{macrocode}
- \iso@rangesign\csname iso@printdate@\iso@languagename\endcsname{%
- #4}{#5}{#6}}%
+ \iso@rangesign
+ \csname iso@printdate@\iso@languagename\endcsname{#4}{#5}{#6}%
+ }%
}%
}
% \end{macrocode}
@@ -2221,7 +2418,7 @@
}
% \end{macrocode}
% \begin{macro}{\iso@rangesign@...}
-% Sets the word between start and end date in a date range to ``~to''.
+% Sets the word between start and end date in a date range to `~to'.
% \begin{macrocode}
\expandafter\def\csname iso@rangesign@\CurrentOption\endcsname{~to~}
% \end{macrocode}
@@ -2273,38 +2470,62 @@
% \end{macrocode}
% \begin{macrocode}
\def\iso@printmonthday@french#1#2{%
- \ifthenelse{\equal{\iso@dateformat}{numeric}\or%
- \equal{\iso@dateformat}{short}}{%
- \iso@printday{#2}/\iso@printmonth{#1}\ifiso@printyear/\fi}{%
- \ifthenelse{\equal{\iso@dateformat}{iso}}{%
- \ifiso@printyear\iso@isodash\fi\iso@printmonth{#1}%
- \iso@isodash\iso@printday{#2}}{%
- \ifthenelse{\equal{\iso@dateformat}{TeX}}{%
- \ifiso@printyear/\fi\iso@printmonth{#1}/\iso@printday{#2}}{%
- \ifthenelse{\equal{\iso@dateformat}{orig}\or
- \equal{\iso@dateformat}{shortorig}}{%
- \begingroup
- \edef\lday{#2}\edef\day{\lday}%
- \edef\lmonth{#1}\def\month{\lmonth}%
- \number\day\ifnum1=\day \noexpand\ier\fi~\month@french%
- \endgroup
- }{}}}}%
- }
+ \ifthenelse{\equal{\iso@dateformat}{iso}\OR
+ \equal{\iso@dateformat}{TeX}}{%
+ \iso@printmonthday@int{#1}{#2}%
+ }{%
+ \ifthenelse{\equal{\iso@dateformat}{numeric}\OR
+ \equal{\iso@dateformat}{short}}{%
+ \ifiso@doprintday
+ \iso@printday{#2}/%
+ \fi
+ \iso@printmonth{#1}%
+ }{%
+ \ifthenelse{\equal{\iso@dateformat}{orig}\OR
+ \equal{\iso@dateformat}{shortorig}}{%
+ \begingroup
+ \edef\lday{#2}\edef\day{\lday}%
+ \edef\lmonth{#1}\def\month{\lmonth}%
+ \ifiso@doprintday
+ \number\day\ifnum1=\day \noexpand\ier\fi\iso@monthsep
+ \fi
+ \month@french
+ \endgroup
+ }{}%
+ }%
+ }%
+}
% \end{macrocode}
% \begin{macrocode}
\def\iso@printdate@french#1#2#3{%
- \ifthenelse{\equal{\iso@dateformat}{iso}\or%
- \equal{\iso@dateformat}{TeX}}{%
- \ifiso@printyear\iso@yearfour{\number#1}\fi}{}%
- \iso@printmonthday@french{\number#2}{\number#3}%
- \ifiso@printyear
- \ifthenelse{\equal{\iso@dateformat}{numeric}}{\iso@yearfour{\number#1}}{%
- \ifthenelse{\equal{\iso@dateformat}{orig}}{~\iso@yearfour{\number#1}}{%
- \ifthenelse{\equal{\iso@dateformat}{shortorig}}{%
- ~\iso@twodigitsign\iso@yeartwo{\number#1}}{%
- \ifthenelse{\equal{\iso@dateformat}{short}}{%
- \iso@yeartwo{\number#1}}{}}}}%
- \fi
+ \ifthenelse{\equal{\iso@dateformat}{iso}\OR
+ \equal{\iso@dateformat}{TeX}}{%
+ \iso@printdate@int{#1}{#2}{#3}%
+ }{%
+ \iso@printmonthday@french{\number#2}{\number#3}%
+ \ifiso@printyear
+ \ifthenelse{\equal{\iso@dateformat}{orig}\OR
+ \equal{\iso@dateformat}{shortorig}}{%
+ }{%
+ /%
+ }%
+ \ifthenelse{\equal{\iso@dateformat}{numeric}}{%
+ \iso@yearfour{\number#1}%
+ }{%
+ \ifthenelse{\equal{\iso@dateformat}{orig}}{%
+ \iso@yearsep\iso@yearfour{\number#1}%
+ }{%
+ \ifthenelse{\equal{\iso@dateformat}{shortorig}}{%
+ \iso@yearsep\iso@twodigitsign\iso@yeartwo{\number#1}%
+ }{%
+ \ifthenelse{\equal{\iso@dateformat}{short}}{%
+ \iso@yeartwo{\number#1}%
+ }{}%
+ }%
+ }%
+ }%
+ \fi
+ }%
}
% \end{macrocode}
% \begin{macrocode}
@@ -2314,35 +2535,41 @@
% \begin{macro}{\iso@daterange@...}
% Define date-range commands for dialects.
% \begin{macrocode}
- \expandafter\def\csname iso@daterange@\CurrentOption\endcsname{%
- \iso@daterange@french}%
+\expandafter\def\csname iso@daterange@\CurrentOption\endcsname{%
+ \iso@daterange@french}%
% \end{macrocode}
% \end{macro}
% \begin{macrocode}
\def\iso@daterange@french#1#2#3#4#5#6{%
- \ifthenelse{\equal{\iso@dateformat}{iso}\or%
+ \ifthenelse{\equal{\iso@dateformat}{iso}\OR
\equal{\iso@dateformat}{TeX}}{%
- \csname iso@printdate@\iso@languagename\endcsname{#1}{#2}{#3}%
- \iso@rangesign%
- \ifthenelse{\equal{\number#1}{\number#4}}{%
- \ifthenelse{\equal{\number#2}{\number#5}}{\iso@printday{#6}%
- }{\iso@printmonthday@french{#5}{#6}}}{%
- \csname iso@printdate@\iso@languagename\endcsname{#4}{#5}{#6}}}{%
+ \iso@daterange@int{#1}{#2}{#3}{#4}{#5}{#6}%
+ }{%
% \end{macrocode}
% \begin{macrocode}
\ifthenelse{\equal{\number#1}{\number#4}}{%
\ifthenelse{\equal{\number#2}{\number#5}}{%
- \ifthenelse{\equal{\iso@dateformat}{orig}}{%
- \begingroup
+ \ifiso@doprintday
+ \ifthenelse{\equal{\iso@dateformat}{orig}}{%
+ \begingroup
\edef\lday{#3}\edef\day{\lday}%
\number\day\ifnum1=\day \noexpand\ier\fi
- \endgroup}{\iso@printday{#3}}%
- }{\iso@printmonthday@french{#2}{#3}}}{%
- \csname iso@printdate@\iso@languagename\endcsname{#1}{#2}{#3}}%
- \iso@rangesign\csname iso@printdate@\iso@languagename\endcsname{%
- #4}{#5}{#6}%
-}{%
+ \endgroup
+ }{%
+ \iso@printday{#3}%
+ }%
+ \else
+ \csname iso@printmonthday@\iso@languagename\endcsname{#2}{#3}%
+ \fi
+ }{%
+ \iso@printmonthday@french{#2}{#3}%
+ }%
+ }{%
+ \csname iso@printdate@\iso@languagename\endcsname{#1}{#2}{#3}%
}%
+ \iso@rangesign
+ \csname iso@printdate@\iso@languagename\endcsname{#4}{#5}{#6}%
+ }%
}
% \end{macrocode}
% \begin{macrocode}
@@ -2393,6 +2620,8 @@
\def\iso@dmsepgerman{\,}%
\def\iso@mylongsepgerman{~}%
\def\iso@myshortsepgerman{\,}%
+\def\iso@mylongsepnodaygerman{}%
+\def\iso@myshortsepnodaygerman{}%
% \end{macrocode}
% \begin{macro}{\daymonthsepgerman}
% Change space between day and month in numeric date formats for the
@@ -2409,6 +2638,9 @@
\DeclareRobustCommand*\monthyearsepgerman[2]{%
\def\iso@mylongsepgerman{#1}%
\def\iso@myshortsepgerman{#2}}
+\DeclareRobustCommand*\monthyearsepnodaygerman[2]{%
+ \def\iso@mylongsepnodaygerman{#1}%
+ \def\iso@myshortsepnodaygerman{#2}}
% \end{macrocode}
% \end{macro}
% \changes{2.02}{2000/10/03}{Changed the umlauts to normal \TeX\ commands to
@@ -2424,64 +2656,97 @@
% \end{macrocode}
% \begin{macrocode}
\@namedef{iso@printmonthday@\CurrentOption}#1#2{%
- \ifthenelse{\equal{\iso@dateformat}{numeric}\or%
- \equal{\iso@dateformat}{short}}{%
- \iso@printday{#2}.\iso@dmsepgerman\iso@printmonth{#1}.}{%
- \ifthenelse{\equal{\iso@dateformat}{iso}}{%
- \iso@printmonth{#1}\iso@isodash\iso@printday{#2}}{%
- \ifthenelse{\equal{\iso@dateformat}{TeX}}{%
- \iso@printmonth{#1}/\iso@printday{#2}}{%
- \ifthenelse{\equal{\iso@dateformat}{orig}\or
- \equal{\iso@dateformat}{shortorig}}{%
- \iso@printday{#2}.~\begingroup
- \edef\lmonth{#1}%
- \def\month{\lmonth}\csname month@\iso@languagename\endcsname%
- \endgroup
- }{}}}}%
+ \ifthenelse{\equal{\iso@dateformat}{iso}\OR
+ \equal{\iso@dateformat}{TeX}}{%
+ \iso@printmonthday@int{#1}{#2}%
+ }{%
+ \ifthenelse{\equal{\iso@dateformat}{numeric}\OR
+ \equal{\iso@dateformat}{short}}{%
+ \ifiso@doprintday
+ \iso@printday{#2}.\iso@dmsepgerman
+ \fi
+ \iso@printmonth{#1}%
+ }{%
+ \ifthenelse{\equal{\iso@dateformat}{orig}\OR
+ \equal{\iso@dateformat}{shortorig}}{%
+ \ifiso@doprintday
+ \iso@printday{#2}.\iso@monthsep\@empty
+ \fi
+ \begingroup
+ \edef\lmonth{#1}%
+ \def\month{\lmonth}\csname month@\iso@languagename\endcsname%
+ \endgroup
+ }{}%
+ }%
+ }%
}
% \end{macrocode}
% \begin{macrocode}
\@namedef{iso@printdate@\CurrentOption}#1#2#3{%
- \ifiso@printyear
- \ifthenelse{\equal{\iso@dateformat}{iso}}{%
- \iso@yearfour{\number#1}\iso@isodash}{%
- \ifthenelse{\equal{\iso@dateformat}{TeX}}{%
- \iso@yearfour{\number#1}/}{}}%
- \fi
- \csname iso@printmonthday@\iso@languagename\endcsname{%
- \number#2}{\number#3}%
- \ifiso@printyear
- \ifthenelse{\equal{\iso@dateformat}{numeric}}{%
- \iso@mylongsepgerman\iso@yearfour{\number#1}}{%
- \ifthenelse{\equal{\iso@dateformat}{orig}}{~\iso@yearfour{\number#1}}{%
- \ifthenelse{\equal{\iso@dateformat}{shortorig}}{%
- ~\iso@twodigitsign\iso@yeartwo{\number#1}}{%
- \ifthenelse{\equal{\iso@dateformat}{short}}{%
- \iso@myshortsepgerman\iso@yeartwo{\number#1}}{}}}}%
- \fi
+ \ifthenelse{\equal{\iso@dateformat}{iso}\OR
+ \equal{\iso@dateformat}{TeX}}{%
+ \iso@printdate@int{#1}{#2}{#3}%
+ }{%
+ \csname iso@printmonthday@\iso@languagename\endcsname{%
+ \number#2}{\number#3}%
+ \ifiso@printyear
+ \ifthenelse{\equal{\iso@dateformat}{orig}\OR
+ \equal{\iso@dateformat}{shortorig}}{%
+ }{%
+ \ifiso@doprintday.\else/\fi
+ }%
+ \ifthenelse{\equal{\iso@dateformat}{numeric}}{%
+ \ifiso@doprintday
+ \iso@mylongsepgerman\@empty
+ \else
+ \iso@mylongsepnodaygerman\@empty
+ \fi
+ \iso@yearfour{\number#1}%
+ }{%
+ \ifthenelse{\equal{\iso@dateformat}{orig}}{%
+ \iso@yearsep\iso@yearfour{\number#1}%
+ }{%
+ \ifthenelse{\equal{\iso@dateformat}{shortorig}}{%
+ \iso@yearsep\iso@twodigitsign\iso@yeartwo{\number#1}%
+ }{%
+ \ifthenelse{\equal{\iso@dateformat}{short}}{%
+ \ifiso@doprintday
+ \iso@myshortsepgerman\@empty
+ \else
+ \iso@myshortsepnodaygerman\@empty
+ \fi
+ \iso@yeartwo{\number#1}%
+ }{}%
+ }%
+ }%
+ }%
+ \fi
+ }%
}
% \end{macrocode}
% \begin{macrocode}
\@namedef{iso@daterange@\CurrentOption}#1#2#3#4#5#6{%
- \ifthenelse{\equal{\iso@dateformat}{iso}\or%
+ \ifthenelse{\equal{\iso@dateformat}{iso}\OR
\equal{\iso@dateformat}{TeX}}{%
- \csname iso@printdate@\iso@languagename\endcsname{#1}{#2}{#3}%
- \iso@rangesign%
- \ifthenelse{\equal{\number#1}{\number#4}}{%
- \ifthenelse{\equal{\number#2}{\number#5}}{\iso@printday{#6}%
- }{\csname iso@printmonthday@\iso@languagename\endcsname{#5}{#6}}}{%
- \csname iso@printdate@\iso@languagename\endcsname{#4}{#5}{#6}}}{%
+ \iso@daterange@int{#1}{#2}{#3}{#4}{#5}{#6}%
+ }{%
% \end{macrocode}
% \begin{macrocode}
\ifthenelse{\equal{\number#1}{\number#4}}{%
\ifthenelse{\equal{\number#2}{\number#5}}{%
- \ifthenelse{\equal{\iso@dateformat}{orig}}{%
- \iso@printday{#3}}{\iso@printday{#3}}.%
- }{\csname iso@printmonthday@\iso@languagename\endcsname{%
- #2}{#3}}}{%
- \csname iso@printdate@\iso@languagename\endcsname{#1}{#2}{#3}}%
- \iso@rangesign\csname iso@printdate@\iso@languagename\endcsname{%
- #4}{#5}{#6}%
+ \ifiso@doprintday
+ \iso@printday{#3}.%
+ \else
+ \csname iso@printmonthday@\iso@languagename\endcsname{#2}{#3}%
+ \fi
+ }{%
+ \csname iso@printmonthday@\iso@languagename\endcsname{#2}{#3}%
+ }%
+ }{%
+ \csname iso@printdate@\iso@languagename\endcsname{#1}{#2}{#3}%
+ }%
+ \iso@rangesign
+ \csname iso@printdate@\iso@languagename\endcsname{#4}{#5}{#6}%
}%
}
% \end{macrocode}
@@ -2595,38 +2860,63 @@
% \end{macrocode}
% \begin{macrocode}
\def\iso@printmonthday@italian#1#2{%
- \ifthenelse{\equal{\iso@dateformat}{numeric}\or%
- \equal{\iso@dateformat}{short}}{%
- \iso@printday{#2}/\iso@printmonth{#1}\ifiso@printyear/\fi}{%
- \ifthenelse{\equal{\iso@dateformat}{iso}}{%
- \ifiso@printyear\iso@isodash\fi\iso@printmonth{#1}%
- \iso@isodash\iso@printday{#2}}{%
- \ifthenelse{\equal{\iso@dateformat}{TeX}}{%
- \ifiso@printyear/\fi\iso@printmonth{#1}/\iso@printday{#2}}{%
- \ifthenelse{\equal{\iso@dateformat}{orig}\or
- \equal{\iso@dateformat}{shortorig}}{%
- \begingroup
- \edef\lday{#2}\edef\day{\lday}%
- \edef\lmonth{#1}\def\month{\lmonth}%
- \number\day\ifnum1=\day \noexpand\textordmasculine\fi~\month@italian%
- \endgroup
- }{}}}}%
- }
+ \ifthenelse{\equal{\iso@dateformat}{iso}\OR
+ \equal{\iso@dateformat}{TeX}}{%
+ \iso@printmonthday@int{#1}{#2}%
+ }{%
+ \ifthenelse{\equal{\iso@dateformat}{numeric}\OR
+ \equal{\iso@dateformat}{short}}{%
+ \ifiso@doprintday
+ \iso@printday{#2}/%
+ \fi
+ \iso@printmonth{#1}%
+ }{%
+ \ifthenelse{\equal{\iso@dateformat}{orig}\OR
+ \equal{\iso@dateformat}{shortorig}}{%
+ \begingroup
+ \edef\lday{#2}\edef\day{\lday}%
+ \edef\lmonth{#1}\def\month{\lmonth}%
+ \ifiso@doprintday
+ \number\day\ifnum1=\day \noexpand\textordmasculine\fi
+ \iso@monthsep
+ \fi
+ \month@italian
+ \endgroup
+ }{}%
+ }%
+ }%
+}
% \end{macrocode}
% \begin{macrocode}
\def\iso@printdate@italian#1#2#3{%
- \ifthenelse{\equal{\iso@dateformat}{iso}\or%
+ \ifthenelse{\equal{\iso@dateformat}{iso}\OR
\equal{\iso@dateformat}{TeX}}{%
- \ifiso@printyear\iso@yearfour{\number#1}\fi}{}%
- \iso@printmonthday@italian{\number#2}{\number#3}%
- \ifiso@printyear
- \ifthenelse{\equal{\iso@dateformat}{numeric}}{\iso@yearfour{\number#1}}{%
- \ifthenelse{\equal{\iso@dateformat}{orig}}{~\iso@yearfour{\number#1}}{%
- \ifthenelse{\equal{\iso@dateformat}{shortorig}}{%
- ~\iso@twodigitsign\iso@yeartwo{\number#1}}{%
- \ifthenelse{\equal{\iso@dateformat}{short}}{%
- \iso@yeartwo{\number#1}}{}}}}%
- \fi
+ \iso@printdate@int{#1}{#2}{#3}%
+ }{%
+ \iso@printmonthday@italian{\number#2}{\number#3}%
+ \ifiso@printyear
+ \ifthenelse{\equal{\iso@dateformat}{orig}\OR
+ \equal{\iso@dateformat}{shortorig}}{%
+ }{%
+ /%
+ }%
+ \ifthenelse{\equal{\iso@dateformat}{numeric}}{%
+ \iso@yearfour{\number#1}%
+ }{%
+ \ifthenelse{\equal{\iso@dateformat}{orig}}{%
+ \iso@yearsep\iso@yearfour{\number#1}%
+ }{%
+ \ifthenelse{\equal{\iso@dateformat}{shortorig}}{%
+ \iso@yearsep\iso@twodigitsign\iso@yeartwo{\number#1}%
+ }{%
+ \ifthenelse{\equal{\iso@dateformat}{short}}{%
+ \iso@yeartwo{\number#1}%
+ }{}%
+ }%
+ }%
+ }%
+ \fi
+ }%
}
% \end{macrocode}
% \begin{macrocode}
@@ -2636,35 +2926,41 @@
% \begin{macro}{\iso@daterange@...}
% Define date-range commands for dialects.
% \begin{macrocode}
- \expandafter\def\csname iso@daterange@\CurrentOption\endcsname{%
- \iso@daterange@italian}%
+\expandafter\def\csname iso@daterange@\CurrentOption\endcsname{%
+ \iso@daterange@italian}%
% \end{macrocode}
% \end{macro}
% \begin{macrocode}
\def\iso@daterange@italian#1#2#3#4#5#6{%
- \ifthenelse{\equal{\iso@dateformat}{iso}\or%
+ \ifthenelse{\equal{\iso@dateformat}{iso}\OR
\equal{\iso@dateformat}{TeX}}{%
- \csname iso@printdate@\iso@languagename\endcsname{#1}{#2}{#3}%
- \iso@rangesign%
- \ifthenelse{\equal{\number#1}{\number#4}}{%
- \ifthenelse{\equal{\number#2}{\number#5}}{\iso@printday{#6}%
- }{\iso@printmonthday@italian{#5}{#6}}}{%
- \csname iso@printdate@\iso@languagename\endcsname{#4}{#5}{#6}}}{%
+ \iso@daterange@int{#1}{#2}{#3}{#4}{#5}{#6}%
+ }{%
% \end{macrocode}
% \begin{macrocode}
\ifthenelse{\equal{\number#1}{\number#4}}{%
\ifthenelse{\equal{\number#2}{\number#5}}{%
- \ifthenelse{\equal{\iso@dateformat}{orig}}{%
- \begingroup
+ \ifiso@doprintday
+ \ifthenelse{\equal{\iso@dateformat}{orig}}{%
+ \begingroup
\edef\lday{#3}\edef\day{\lday}%
\number\day\ifnum1=\day \noexpand\textordmasculine\fi
- \endgroup}{\iso@printday{#3}}%
- }{\iso@printmonthday@italian{#2}{#3}}}{%
- \csname iso@printdate@\iso@languagename\endcsname{#1}{#2}{#3}}%
- \iso@rangesign\csname iso@printdate@\iso@languagename\endcsname{%
- #4}{#5}{#6}%
-}{%
+ \endgroup
+ }{%
+ \iso@printday{#3}%
+ }%
+ \else
+ \iso@printmonthday@italian{#2}{#3}%
+ \fi
+ }{%
+ \iso@printmonthday@italian{#2}{#3}%
+ }%
+ }{%
+ \csname iso@printdate@\iso@languagename\endcsname{#1}{#2}{#3}%
}%
+ \iso@rangesign
+ \csname iso@printdate@\iso@languagename\endcsname{#4}{#5}{#6}%
+ }%
}
% \end{macrocode}
% \begin{macrocode}
@@ -2718,86 +3014,103 @@
% Prints the month and the day given as two arguments
% (\verb|{mm}{dd}|) in the current date format.
% \begin{macrocode}
- \def\iso@printmonthday@norsk#1#2{%
+\def\iso@printmonthday@norsk#1#2{%
+ \ifthenelse{\equal{\iso@dateformat}{iso}\OR
+ \equal{\iso@dateformat}{TeX}}{%
+ \iso@printmonthday@int{#1}{#2}%
+ }{%
% \end{macrocode}
% Numeric and short date format: \verb|dd/mm/|
% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{numeric}\or%
- \equal{\iso@dateformat}{short}}{%
- \iso@printday{#2}/\iso@printmonth{#1}\ifiso@printyear/\fi}{%
-% \end{macrocode}
-% ISO date format: \verb|-mm-dd|
-% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{iso}}{%
- \ifiso@printyear\iso@isodash\fi
- \iso@printmonth{#1}\iso@isodash\iso@printday{#2}}{%
-% \end{macrocode}
-% \LaTeX\ date format: \verb|/mm/dd|
-% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{TeX}}{%
- \ifiso@printyear/\fi\iso@printmonth{#1}/\iso@printday{#2}}{%
+ \ifthenelse{\equal{\iso@dateformat}{numeric}\OR
+ \equal{\iso@dateformat}{short}}{%
+ \ifiso@doprintday
+ \iso@printday{#2}/%
+ \fi
+ \iso@printmonth{#1}%
+ }{%
% \end{macrocode}
% Original date format: \verb|d. mmm|
% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{orig}\or
- \equal{\iso@dateformat}{shortorig}}{%
- \iso@printday{#2}.~\begingroup
- \edef\lmonth{#1}\def\month{\lmonth}%
- \month@norsk%
- \endgroup
- }{}}}}%
- }
+ \ifthenelse{\equal{\iso@dateformat}{orig}\OR
+ \equal{\iso@dateformat}{shortorig}}{%
+ \ifiso@doprintday
+ \iso@printday{#2}.\iso@monthsep
+ \fi
+ \begingroup
+ \edef\lmonth{#1}\def\month{\lmonth}%
+ \month@norsk%
+ \endgroup
+ }{}%
+ }%
+ }%
+}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\iso@printdate@norsk}
% Prints the date given as three arguments (\verb|{yyyy}{mm}{dd}|) in
% the actual date format
% \begin{macrocode}
- \def\iso@printdate@norsk#1#2#3{%
+\def\iso@printdate@norsk#1#2#3{%
% \end{macrocode}
% ISO or \LaTeX date format: \verb|yyyy\iso@printmonthday@norsk|
% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{iso}\or%
- \equal{\iso@dateformat}{TeX}}{%
- \ifiso@printyear\iso@yearfour{\number#1}\fi}{}%
+ \ifthenelse{\equal{\iso@dateformat}{iso}\OR
+ \equal{\iso@dateformat}{TeX}}{%
+ \iso@printdate@int{#1}{#2}{#3}%
+ }{%
\iso@printmonthday@norsk{\number#2}{\number#3}%
% \end{macrocode}
% numeric date format: \verb|\iso@printmonthday@norsk yyyy|
% \begin{macrocode}
\ifiso@printyear
- \ifthenelse{\equal{\iso@dateformat}{numeric}}{\iso@yearfour{\number#1}}{%
+ \ifthenelse{\equal{\iso@dateformat}{orig}\OR
+ \equal{\iso@dateformat}{shortorig}}{%
+ }{%
+ /%
+ }%
+ \ifthenelse{\equal{\iso@dateformat}{numeric}}{%
+ \iso@yearfour{\number#1}%
+ }{%
% \end{macrocode}
% original date format: \verb|\iso@printmonthday@norsk~yyyy|
% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{orig}}{~\iso@yearfour{\number#1}}{%
+ \ifthenelse{\equal{\iso@dateformat}{orig}}{%
+ \iso@yearsep\iso@yearfour{\number#1}%
+ }{%
% \end{macrocode}
% short original date format: \verb|\iso@printmonthday@norsk~yyyy|
% \begin{macrocode}
\ifthenelse{\equal{\iso@dateformat}{shortorig}}{%
- ~\iso@twodigitsign\iso@yeartwo{\number#1}}{%
+ \iso@yearsep\iso@twodigitsign\iso@yeartwo{\number#1}%
+ }{%
% \end{macrocode}
% short date format: \verb|\iso@printmonthday@norsk yy|
% \begin{macrocode}
\ifthenelse{\equal{\iso@dateformat}{short}}{%
- \iso@yeartwo{\number#1}}{%
- }}}}%
+ \iso@yeartwo{\number#1}%
+ }{}%
+ }%
+ }%
+ }%
\fi
- }
+ }%
+}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\iso@datenorsk}
% This command redefines the \cs{today} command to print in the
% actual date format.
% \begin{macrocode}
- \def\iso@datenorsk{%
- \def\today{\iso@printdate@norsk{\year}{\month}{\day}}}%
+\def\iso@datenorsk{%
+ \def\today{\iso@printdate@norsk{\year}{\month}{\day}}}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\iso@daterange@...}
% Define date-range commands for dialects.
% \begin{macrocode}
- \expandafter\def\csname iso@daterange@\CurrentOption\endcsname{%
- \iso@daterange@norsk}%
+\expandafter\def\csname iso@daterange@\CurrentOption\endcsname{%
+ \iso@daterange@norsk}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\iso@daterange@norsk}
@@ -2809,22 +3122,10 @@
% \end{macrocode}
% ISO or \LaTeX\ date format.
% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{iso}\or%
+ \ifthenelse{\equal{\iso@dateformat}{iso}\OR
\equal{\iso@dateformat}{TeX}}{%
-% \end{macrocode}
-% Print the start date.
-% \begin{macrocode}
- \csname iso@printdate@\iso@languagename\endcsname{#1}{#2}{#3}%
- \iso@rangesign%
-% \end{macrocode}
-% If year and month are equal, only print the day of the end date. If
-% only the year is equal, only print month and day of the end
-% date. Otherwise print the whole end date.
-% \begin{macrocode}
- \ifthenelse{\equal{\number#1}{\number#4}}{%
- \ifthenelse{\equal{\number#2}{\number#5}}{\iso@printday{#6}%
- }{\iso@printmonthday@norsk{#5}{#6}}}{%
- \csname iso@printdate@\iso@languagename\endcsname{#4}{#5}{#6}}}{%
+ \iso@daterange@int{#1}{#2}{#3}{#4}{#5}{#6}%
+ }{%
% \end{macrocode}
% Numeric, short, or original date format.
%
@@ -2834,23 +3135,33 @@
% \begin{macrocode}
\ifthenelse{\equal{\number#1}{\number#4}}{%
\ifthenelse{\equal{\number#2}{\number#5}}{%
- \ifthenelse{\equal{\iso@dateformat}{orig}\or
- \equal{\iso@dateformat}{shortorig}}{%
- \iso@printday{#3}.}{\iso@printday{#3}}%
- }{\iso@printmonthday@norsk{#2}{#3}}}{%
- \csname iso@printdate@\iso@languagename\endcsname{#1}{#2}{#3}}%
+ \ifiso@doprintday
+ \ifthenelse{\equal{\iso@dateformat}{orig}\OR
+ \equal{\iso@dateformat}{shortorig}}{%
+ \iso@printday{#3}.%
+ }{%
+ \iso@printday{#3}%
+ }%
+ \else
+ \iso@printmonthday@norsk{#2}{#3}%
+ \fi
+ }{%
+ \iso@printmonthday@norsk{#2}{#3}%
+ }%
+ }{%
+ \csname iso@printdate@\iso@languagename\endcsname{#1}{#2}{#3}%
+ }%
% \end{macrocode}
% Print the end date.
% \begin{macrocode}
- \iso@rangesign\csname iso@printdate@\iso@languagename\endcsname{%
- #4}{#5}{#6}%
- }{%
+ \iso@rangesign
+ \csname iso@printdate@\iso@languagename\endcsname{#4}{#5}{#6}%
}%
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\iso@rangesign@norsk}
-% Sets the word between start and end date in a date range to ``~til~''.
+% Sets the word between start and end date in a date range to `~til~'.
% \begin{macrocode}
\expandafter\def\csname iso@rangesign@\CurrentOption\endcsname{~til~}
% \end{macrocode}
@@ -2908,86 +3219,103 @@
% Prints the month and the day given as two arguments
% (\verb|{mm}{dd}|) in the current date format.
% \begin{macrocode}
- \def\iso@printmonthday@swedish#1#2{%
+\def\iso@printmonthday@swedish#1#2{%
+ \ifthenelse{\equal{\iso@dateformat}{iso}\OR
+ \equal{\iso@dateformat}{TeX}}{%
+ \iso@printmonthday@int{#1}{#2}%
+ }{%
% \end{macrocode}
% Numeric and short date format: \verb|dd/mm/|
% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{numeric}\or%
- \equal{\iso@dateformat}{short}}{%
- \iso@printday{#2}/\iso@printmonth{#1}\ifiso@printyear/\fi}{%
-% \end{macrocode}
-% ISO date format: \verb|-mm-dd|
-% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{iso}}{%
- \ifiso@printyear\iso@isodash\fi\iso@printmonth{#1}%
- \iso@isodash\iso@printday{#2}}{%
-% \end{macrocode}
-% \LaTeX\ date format: \verb|/mm/dd|
-% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{TeX}}{%
- \ifiso@printyear/\fi\iso@printmonth{#1}/\iso@printday{#2}}{%
+ \ifthenelse{\equal{\iso@dateformat}{numeric}\OR
+ \equal{\iso@dateformat}{short}}{%
+ \ifiso@doprintday
+ \iso@printday{#2}/%
+ \fi
+ \iso@printmonth{#1}%
+ }{%
% \end{macrocode}
% Original date format: \verb|d. mmm|
% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{orig}\or
- \equal{\iso@dateformat}{shortorig}}{%
- \iso@printday{#2}.~\begingroup
- \edef\lmonth{#1}\def\month{\lmonth}%
- \month@swedish%
- \endgroup
- }{}}}}%
- }
+ \ifthenelse{\equal{\iso@dateformat}{orig}\OR
+ \equal{\iso@dateformat}{shortorig}}{%
+ \ifiso@doprintday
+ \iso@printday{#2}.\iso@monthsep
+ \fi
+ \begingroup
+ \edef\lmonth{#1}\def\month{\lmonth}%
+ \month@swedish%
+ \endgroup
+ }{}%
+ }%
+ }%
+}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\iso@printdate@swedish}
% Prints the date given as three arguments (\verb|{yyyy}{mm}{dd}|) in
% the actual date format
% \begin{macrocode}
- \def\iso@printdate@swedish#1#2#3{%
+\def\iso@printdate@swedish#1#2#3{%
% \end{macrocode}
% ISO or \LaTeX date format: \verb|yyyy\iso@printmonthday@swedish|
% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{iso}\or%
- \equal{\iso@dateformat}{TeX}}{%
- \ifiso@printyear\iso@yearfour{\number#1}\fi}{}%
+ \ifthenelse{\equal{\iso@dateformat}{iso}\OR
+ \equal{\iso@dateformat}{TeX}}{%
+ \iso@printdate@int{#1}{#2}{#3}%
+ }{%
\iso@printmonthday@swedish{\number#2}{\number#3}%
% \end{macrocode}
% numeric date format: \verb|\iso@printmonthday@swedish yyyy|
% \begin{macrocode}
\ifiso@printyear
- \ifthenelse{\equal{\iso@dateformat}{numeric}}{\iso@yearfour{\number#1}}{%
+ \ifthenelse{\equal{\iso@dateformat}{orig}\OR
+ \equal{\iso@dateformat}{shortorig}}{%
+ }{%
+ /%
+ }%
+ \ifthenelse{\equal{\iso@dateformat}{numeric}}{%
+ \iso@yearfour{\number#1}%
+ }{%
% \end{macrocode}
% original date format: \verb|\iso@printmonthday@swedish~yyyy|
% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{orig}}{~\iso@yearfour{\number#1}}{%
+ \ifthenelse{\equal{\iso@dateformat}{orig}}{%
+ \iso@yearsep\iso@yearfour{\number#1}%
+ }{%
% \end{macrocode}
% short original date format: \verb|\iso@printmonthday@swedish~yy|
% \begin{macrocode}
\ifthenelse{\equal{\iso@dateformat}{shortorig}}{%
- ~\iso@twodigitsign\iso@yeartwo{\number#1}}{%
+ \iso@yearsep\iso@twodigitsign\iso@yeartwo{\number#1}%
+ }{%
% \end{macrocode}
% short date format: \verb|\iso@printmonthday@swedish yy|
% \begin{macrocode}
\ifthenelse{\equal{\iso@dateformat}{short}}{%
- \iso@yeartwo{\number#1}}{%
- }}}}%
+ \iso@yeartwo{\number#1}%
+ }{}%
+ }%
+ }%
+ }%
\fi
- }
+ }%
+}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\iso@dateswedish}
% This command redefines the \cs{today} command to print in the
% actual date format.
% \begin{macrocode}
- \def\iso@dateswedish{%
- \def\today{\iso@printdate@swedish{\year}{\month}{\day}}}%
+\def\iso@dateswedish{%
+ \def\today{\iso@printdate@swedish{\year}{\month}{\day}}}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\iso@daterange@...}
% Define date-range commands for dialects.
% \begin{macrocode}
- \expandafter\def\csname iso@daterange@\CurrentOption\endcsname{%
- \iso@daterange@swedish}%
+\expandafter\def\csname iso@daterange@\CurrentOption\endcsname{%
+ \iso@daterange@swedish}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\iso@daterange@swedish}
@@ -2999,22 +3327,10 @@
% \end{macrocode}
% ISO or \LaTeX\ date format.
% \begin{macrocode}
- \ifthenelse{\equal{\iso@dateformat}{iso}\or%
+ \ifthenelse{\equal{\iso@dateformat}{iso}\OR
\equal{\iso@dateformat}{TeX}}{%
-% \end{macrocode}
-% Print the start date.
-% \begin{macrocode}
- \csname iso@printdate@\iso@languagename\endcsname{%
- #1}{#2}{#3}\iso@rangesign%
-% \end{macrocode}
-% If year and month are equal, only print the day of the end date. If
-% only the year is equal, only print month and day of the end
-% date. Otherwise print the whole end date.
-% \begin{macrocode}
- \ifthenelse{\equal{\number#1}{\number#4}}{%
- \ifthenelse{\equal{\number#2}{\number#5}}{\iso@printday{#6}%
- }{\iso@printmonthday@swedish{#5}{#6}}}{%
- \csname iso@printdate@\iso@languagename\endcsname{#4}{#5}{#6}}}{%
+ \iso@daterange@int{#1}{#2}{#3}{#4}{#5}{#6}%
+ }{%
% \end{macrocode}
% Numeric, short, or original date format.
%
@@ -3024,24 +3340,33 @@
% \begin{macrocode}
\ifthenelse{\equal{\number#1}{\number#4}}{%
\ifthenelse{\equal{\number#2}{\number#5}}{%
- \ifthenelse{\equal{\iso@dateformat}{orig}\or
- \equal{\iso@dateformat}{shortorig}}{%
- \iso@printday{#3}.}{\iso@printday{#3}}%
- }{\iso@printmonthday@swedish{#2}{#3}}}{%
- \csname iso@printdate@\iso@languagename\endcsname{%
- #1}{#2}{#3}}%
+ \ifiso@doprintday
+ \ifthenelse{\equal{\iso@dateformat}{orig}\OR
+ \equal{\iso@dateformat}{shortorig}}{%
+ \iso@printday{#3}.%
+ }{%
+ \iso@printday{#3}%
+ }%
+ \else
+ \iso@printmonthday@swedish{#2}{#3}%
+ \fi
+ }{%
+ \iso@printmonthday@swedish{#2}{#3}%
+ }%
+ }{%
+ \csname iso@printdate@\iso@languagename\endcsname{#1}{#2}{#3}%
+ }%
% \end{macrocode}
% Print the end date.
% \begin{macrocode}
- \iso@rangesign\csname iso@printdate@\iso@languagename\endcsname{%
- #4}{#5}{#6}%
-}{%
- }%
+ \iso@rangesign
+ \csname iso@printdate@\iso@languagename\endcsname{#4}{#5}{#6}%
+ }%
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\iso@rangesign@swedish}
-% Sets the word between start and end date in a date range to ``~till~''.
+% Sets the word between start and end date in a date range to `~till~'.
% \begin{macrocode}
\expandafter\def\csname iso@rangesign@\CurrentOption\endcsname{~till~}
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/isodate/isodate.ins b/Master/texmf-dist/source/latex/isodate/isodate.ins
index 81aff73ea62..f9b1dfa823c 100644
--- a/Master/texmf-dist/source/latex/isodate/isodate.ins
+++ b/Master/texmf-dist/source/latex/isodate/isodate.ins
@@ -4,7 +4,7 @@
isodate package
- Copyright 2000--2005 Harald Harders
+ Copyright 2000--2010 Harald Harders
This program can be redistributed and/or modified under the terms
of the LaTeX Project Public License Distributed from CTAN