%%
%% This is file `datetime.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% datetime.dtx  (with options: `datetime.sty,package')
%% 
%%  datetime.dtx
%%  Copyright 2010 Nicola Talbot
%% 
%%  This work may be distributed and/or modified under the
%%  conditions of the LaTeX Project Public License, either version 1.3
%%  of this license of (at your option) any later version.
%%  The latest version of this license is in
%%    http://www.latex-project.org/lppl.txt
%%  and version 1.3 or later is part of all distributions of LaTeX
%%  version 2005/12/01 or later.
%% 
%%  This work has the LPPL maintenance status `maintained'.
%% 
%%  The Current Maintainer of this work is Nicola Talbot.
%% 
%%  This work consists of the files datetime.dtx and datetime.ins and the derived files datetime.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.
%% 
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{datetime}[2010/02/06 v2.57 Date Time Package]
\RequirePackage{fmtcount}
\RequirePackage{ifthen}
\newif\if@dt@nodate
\@dt@nodatefalse
\newcommand{\dateseparator}{/}
\newif\if@dt@multilingual
\@ifpackageloaded{babel}{%
\@dt@multilingualtrue}{%
\@ifpackageloaded{ngerman}{%
\@dt@multilingualtrue}{\@dt@multilingualfalse}}
\newcommand*{\ordinaldateenglish}[1]{\ordinalnum{#1}}
\newcommand*{\ordinaldate}[1]{%
\if@dt@multilingual
\@ifundefined{ordinaldate\languagename}{#1}{%
\csname ordinaldate\languagename\endcsname{#1}}%
\else
\ordinalnum{#1}%
\fi}
\newif\ifshowdow
\providecommand*{\formatdate}[3]{}
\newcount\@day
\newcount\@month
\newcount\@year
\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}}
\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}}
\let\twodigit\two@digits
\DeclareRobustCommand*{\yyyymmdddate}{%
\renewcommand*{\formatdate}[3]{%
\@day=##1\relax\@month=##2\relax\@year=##3\relax
\the\@year\dateseparator \twodigit\@month\dateseparator
\twodigit\@day}}
\DeclareRobustCommand*{\ddmmyyyydate}{%
\renewcommand*{\formatdate}[3]{%
\@day=##1\relax\@month=##2\relax\@year=##3\relax
\twodigit\@day\dateseparator \twodigit\@month\dateseparator
\the\@year}}
\DeclareRobustCommand*{\dmyyyydate}{%
\renewcommand*{\formatdate}[3]{%
\@day=##1\relax\@month=##2\relax\@year=##3\relax
\the\@day\dateseparator \the\@month\dateseparator \the\@year}}
\DeclareRobustCommand*{\ddmmyydate}{\renewcommand*{\formatdate}[3]{%
\@day=##1\relax\@month=##2\relax\@year=##3\relax
\@dtctr=\@year%
\@modulo{\@dtctr}{100}%
\twodigit\@day\dateseparator \twodigit\@month\dateseparator
\twodigit\@dtctr}}
\DeclareRobustCommand*{\dmyydate}{\renewcommand*{\formatdate}[3]{%
\@day=##1\relax\@month=##2\relax\@year=##3\relax
\@dtctr=\@year%
\@modulo{\@dtctr}{100}%
\the\@day\dateseparator \the\@month\dateseparator \twodigit\@dtctr}}
\DeclareRobustCommand*{\textdate}{%
\renewcommand*{\formatdate}[3]{%
\ifshowdow\dayofweekname{##1}{##2}{##3} the \fi
\@day=##1\relax\@month=##2\relax\@year=##3\relax
\Ordinalstringnum{\@day}\ of \monthname[\@month],
\Numberstringnum{\@year}%
}}
\DeclareRobustCommand*{\usdate}{%
\renewcommand*{\formatdate}[3]{%
\@day=##1\relax\@month=##2\relax\@year=##3\relax
\monthname[\@month]\ \the\@day, \the\@year}}
\DeclareRobustCommand*{\mmddyyyydate}{%
\renewcommand*{\formatdate}[3]{%
\@day=##1\relax\@month=##2\relax\@year=##3\relax
\twodigit\@month\dateseparator \twodigit\@day\dateseparator
\the\@year}}
\DeclareRobustCommand*{\mdyyyydate}{%
\renewcommand*{\formatdate}[3]{%
\@day=##1\relax\@month=##2\relax\@year=##3\relax
\the\@month\dateseparator \the\@day\dateseparator \the\@year}}
\DeclareRobustCommand*{\mmddyydate}{\renewcommand*{\formatdate}[3]{%
\@day=##1\relax\@month=##2\relax\@year=##3\relax
\@dtctr=\@year%
\@modulo{\@dtctr}{100}%
\twodigit\@month\dateseparator \twodigit\@day\dateseparator
\twodigit\@dtctr}}
\DeclareRobustCommand*{\mdyydate}{\renewcommand*{\formatdate}[3]{%
\@day=##1\relax\@month=##2\relax\@year=##3\relax
\@dtctr=\@year%
\@modulo{\@dtctr}{100}%
\the\@month\dateseparator \the\@day\dateseparator \twodigit\@dtctr}}
\newcommand*{\newdate}[4]{%
\@ifundefined{date@#1@y}{%
\@namedef{date@#1@d}{#2}%
\@namedef{date@#1@m}{#3}%
\@namedef{date@#1@y}{#4}}{%
\PackageError{datetime}{Date `#1' already defined}{}}}
\newcommand*{\getdateyear}[1]{%
\@ifundefined{date@#1@y}{%
\PackageError{datetime}{Date `#1' not defined}{}}{%
\csname date@#1@y\endcsname}}
\newcommand*{\getdatemonth}[1]{%
\@ifundefined{date@#1@m}{%
\PackageError{datetime}{Date `#1' not defined}{}}{%
\csname date@#1@m\endcsname}}
\newcommand{\getdateday}[1]{%
\@ifundefined{date@#1@d}{%
\PackageError{datetime}{Date `#1' not defined}{}}{%
\csname date@#1@d\endcsname}}
\newcommand*{\displaydate}[1]{%
\@ifundefined{date@#1@y}{%
\PackageError{datetime}{Date `#1' not defined}{}}{%
\formatdate{\csname date@#1@d\endcsname}{%
\csname date@#1@m\endcsname}{%
\csname date@#1@y\endcsname}}}
\longdate
\showdowtrue
\providecommand*\THEDAY{\the\@day}
\providecommand*\THEMONTH{\the\@month}
\providecommand*\THEYEAR{\the\@year}
\let\c@DAY=\@day
\let\c@MONTH=\@month
\let\c@YEAR=\@year
\providecommand{\newdateformat}[2]{%
\@ifundefined{#1}{%
\expandafter\DeclareRobustCommand\csname#1\endcsname{%
\renewcommand{\formatdate}{\dateformat{#2}}}}{%
\PackageError{datetime}{Can't create new date format, command
\textbackslash#1 already defined}{You will need to
give your new date format a different name}}}
\DeclareRobustCommand*{\currenttime}{%
  \formattime{\currenthour}{\currentminute}{\currentsecond}%
}
\newcommand*{\formattime}[3]{\protect\@formattime{#1}{#2}{#3}}
\newcommand*{\@formattime}[3]{%
  \csname timeformat@xxivtime\endcsname{#1}{#2}{#3}}
\newcommand*{\timeseparator}{:}
\providecommand*{\settimeformat}[1]{%
  \@ifundefined{timeformat@#1}{%
    \PackageError{datetime}{Unknown time format `#1'}{}%
  }{%
    \renewcommand*{\@formattime}[3]{%
      \csname timeformat@#1\endcsname{##1}{##2}{##3}}%
  }%
}
\newcount\c@HOUR
\newcount\c@HOURXII
\newcount\c@MINUTE
\newcount\c@TOHOUR
\newcount\c@TOMINUTE
\newcount\c@SECOND
\def\THEHOUR{\the\c@HOUR}
\def\THEHOURXII{\the\c@HOURXII}
\def\THEMINUTE{\the\c@MINUTE}
\def\THETOHOUR{\the\c@TOHOUR}
\def\THETOMINUTE{\the\c@TOMINUTE}
\def\THESECOND{\the\c@SECOND}
\newcount\currenthour
\newcount\currentminute
\newcount\currentsecond
{\catcode`\D=12\relax
  \gdef\@dt@getdate D:#1#2#3#4#5#6#7#8{\@dt@gettime}%
}
\@ifundefined{pdfcreationdate}{%
  \currenthour=\time\relax
  \divide\currenthour by 60\relax
  \currentminute=\time\relax
  \@modulo{\currentminute}{60}%
  \currentsecond=0\relax
}{%
  \def\@dt@gettime#1#2#3#4#5#6#7\relax{%
    \currenthour=#1#2\relax
    \currentminute=#3#4\relax
    \currentsecond=#5#6\relax}%
  \expandafter\@dt@getdate\pdfcreationdate\relax
}
\providecommand*{\newtimeformat}[2]{%
\@ifundefined{#1}{%
\expandafter\def\csname#1\endcsname{%
  \csname timeformat@#1\endcsname{\currenthour}{\currentminute}%
  {\currentsecond}%
}%
\expandafter\def\csname timeformat@#1\endcsname##1##2##3{%
\c@HOUR=##1%
\c@HOURXII=\c@HOUR
\ifnum\c@HOURXII>12
\advance\c@HOURXII by -12\relax
\fi
\c@MINUTE=##2%
\c@TOHOUR=\c@HOURXII
\advance\c@TOHOUR by 1\relax
\@modulo{\c@TOHOUR}{12}%
\c@TOMINUTE=\c@MINUTE
\advance\c@TOMINUTE by -60\relax
\multiply\c@TOMINUTE by -1\relax
\c@SECOND=##3\relax
#2\relax
}}{%
\PackageError{datetime}{Command \textbackslash#1  already defined}{%
You can't create a new time format called "#1" as the command
\textbackslash#1 already exists}}}
\newtimeformat{xxivtime}{%
\twodigit\THEHOUR\timeseparator\twodigit\THEMINUTE}
\newtimeformat{hhmmsstime}{%
\twodigit\THEHOUR\timeseparator\twodigit\THEMINUTE\timeseparator
\twodigit\THESECOND}
\newtimeformat{ampmtime}{%
\ifthenelse{\value{HOUR}=0}{12}{\THEHOURXII}\timeseparator
\twodigit\THEMINUTE
\ifthenelse{\value{HOUR}<12}{\amname}{%
\ifthenelse{\value{HOUR}=12}{ \noon}{\pmname}}}
\newcommand*{\hourstring}[1]{%
\ifthenelse{\value{#1}=0}{\midnight}{\Numberstring{#1}}}
\newtimeformat{oclock}{%
  \ifthenelse{\(\value{HOUR}=0 \OR \value{HOUR}=12 \OR\value{HOUR}=24\)\AND
 \value{MINUTE}=0}{%
\ifthenelse{\value{HOUR}=12}{\noon}{\midnight}}{%
\ifthenelse{\value{MINUTE}=0}{%
\Numberstring{HOUR} \oclockstring}{%
\ifthenelse{\value{MINUTE}=15}{%
\quarterpast\ \hourstring{HOUR}}{%
\ifthenelse{\value{MINUTE}=30}{%
\halfpast\ \hourstring{HOUR}}{%
\ifthenelse{\value{MINUTE}=45}{%
\quarterto\ \hourstring{TOHOUR}}{%
\ifthenelse{\value{MINUTE}<30}{%
\Numberstring{MINUTE}\ \ifthenelse{\value{MINUTE}=1}{minute}{minutes}
past \hourstring{HOURXII}}{%
\Numberstring{TOMINUTE}\ \ifthenelse{%
\value{TOMINUTE}=1}{minute}{minutes} to \hourstring{TOHOUR}}}}}}%
\ifthenelse{\value{HOUR}<12}{%
\ifthenelse{\value{HOUR}=0}{}{\ \amstring}}{%
\ifthenelse{\value{TOHOUR}=0}{}{\ \pmstring}}}}
\providecommand*{\amname}{am}
\providecommand*{\pmname}{pm}
\providecommand*{\amorpmname}{%
\ifthenelse{\value{HOUR}>12}{\pmname}{\amname}}
\providecommand*{\amstring}{in the morning}
\providecommand*{\pmstring}{in the afternoon}
\providecommand*{\amorpmstring}{%
\ifthenelse{\value{HOUR}>12}{\pmstring}{\amstring}}
\providecommand*{\halfpast}{Half past}
\providecommand*{\quarterpast}{Quarter past}
\providecommand*{\quarterto}{Quarter to}
\providecommand*{\noon}{Noon}
\providecommand*{\midnight}{Midnight}
\providecommand*{\oclockstring}{O'Clock}
\InputIfFileExists{datetime.cfg}{\PackageInfo{datetime}{%
Loading local datetime configurations}}{%
\PackageInfo{datetime}{No datetime.cfg file found, using default
settings}}
\@ifpackageloaded{babel}{%
  \newcommand*{\dt@addtoextras}[1]{%
    \@ifundefined{extrasenglish}{}{%
      \addto\extrasenglish{#1}%
    }%
    \@ifundefined{extrasamerican}{}{%
      \addto\extrasamerican{#1}%
    }%
    \@ifundefined{extrasaustrian}{}{%
      \addto\extrasaustrian{#1}%
    }%
    \@ifundefined{extrasbahasa}{}{%
      \addto\extrasbahasa{#1}%
    }%
    \@ifundefined{extrasbreton}{}{%
      \addto\extrasbreton{#1}%
    }%
    \@ifundefined{extrasbritish}{}{%
      \addto\extrasbritish{#1}%
    }%
    \@ifundefined{extrasbulgarian}{}{%
      \addto\extrasbulgarian{#1}%
    }%
    \@ifundefined{extrascatalan}{}{%
      \addto\extrascatalan{#1}%
    }%
    \@ifundefined{extrascroatian}{}{%
      \addto\extrascroatian{#1}%
    }%
    \@ifundefined{extrasczech}{}{%
      \addto\extrasczech{#1}%
    }%
    \@ifundefined{extrasdanish}{}{%
      \addto\extrasdanish{#1}%
    }%
    \@ifundefined{extrasesperanto}{}{%
      \addto\extrasesperanto{#1}%
    }%
    \@ifundefined{extrasestonian}{}{%
      \addto\extrasestonian{#1}%
    }%
    \@ifundefined{extrasfinnish}{}{%
      \addto\extrasfinnish{#1}%
    }%
    \@ifundefined{extrasfrench}{}{%
      \addto\extrasfrench{#1}%
    }%
    \@ifundefined{extrasgalician}{}{%
      \addto\extrasgalician{#1}%
    }%
    \@ifundefined{extrasgerman}{}{%
      \addto\extrasgerman{#1}%
    }%
    \@ifundefined{extrasgreek}{}{%
      \addto\extrasgreek{#1}%
    }%
    \@ifundefined{extrashebrew}{}{%
      \addto\extrashebrew{#1}%
    }%
    \@ifundefined{extrasicelandic}{}{%
      \addto\extrasicelandic{#1}%
    }%
    \@ifundefined{extrasirish}{}{%
      \addto\extrasirish{#1}%
    }%
    \@ifundefined{extrasitalian}{}{%
      \addto\extrasitalian{#1}%
    }%
    \@ifundefined{extraslatin}{}{%
      \addto\extraslatin{#1}%
    }%
    \@ifundefined{extraslsorbian}{}{%
      \addto\extraslsorbian{#1}%
    }%
    \@ifundefined{extrasmagyar}{}{%
      \addto\extrasmagyar{#1}%
    }%
    \@ifundefined{extrasnaustrian}{}{%
      \addto\extrasnaustrian{#1}%
    }%
    \@ifundefined{extrasngerman}{}{%
      \addto\extrasngerman{#1}%
    }%
    \@ifundefined{extrasnorsk}{}{%
      \addto\extrasnorsk{#1}%
    }%
    \@ifundefined{extraspolish}{}{%
      \addto\extraspolish{#1}%
    }%
    \@ifundefined{extrasportuges}{}{%
      \addto\extrasportuges{#1}%
    }%
    \@ifundefined{extrasromanian}{}{%
      \addto\extrasromanian{#1}%
    }%
    \@ifundefined{extrasrussian}{}{%
      \addto\extrasrussian{#1}%
    }%
    \@ifundefined{extrassamin}{}{%
      \addto\extrassamin{#1}%
    }%
    \@ifundefined{extrasscottish}{}{%
      \addto\extrasscottish{#1}%
    }%
    \@ifundefined{extrasserbian}{}{%
      \addto\extrasserbian{#1}%
    }%
    \@ifundefined{extrasslovak}{}{%
      \addto\extrasslovak{#1}%
    }%
    \@ifundefined{extrasslovene}{}{%
      \addto\extrasslovene{#1}%
    }%
    \@ifundefined{extrasspanish}{}{%
      \addto\extrasspanish{#1}%
    }%
    \@ifundefined{extrasswedish}{}{%
      \addto\extrasswedish{#1}%
    }%
    \@ifundefined{extrasturkish}{}{%
      \addto\extrasturkish{#1}%
    }%
    \@ifundefined{extrasUKenglish}{}{%
      \addto\extrasUKenglish{#1}%
    }%
    \@ifundefined{extrasukraine}{}{%
      \addto\extrasukraine{#1}%
    }%
    \@ifundefined{extrasUSenglish}{}{%
      \addto\extrasUSenglish{#1}%
    }%
    \@ifundefined{extrasusorbian}{}{%
      \addto\extrasusorbian{#1}%
    }%
    \@ifundefined{extraswelsh}{}{%
      \addto\extraswelsh{#1}%
    }%
  }
}{%
  \newcommand*{\dt@addtoextras}[1]{}
}
\newcommand*{\setdefaultdate}[1]{\dt@addtoextras{#1}#1}
\RequirePackage{fmtcount}
\DeclareOption{long}{\setdefaultdate{\longdate}}
\DeclareOption{short}{\setdefaultdate{\shortdate}}
\DeclareOption{yyyymmdd}{\setdefaultdate{\yyyymmdddate}}
\DeclareOption{ddmmyyyy}{\setdefaultdate{\ddmmyyyydate}}
\DeclareOption{dmyyyy}{\setdefaultdate{\dmyyyydate}}
\DeclareOption{ddmmyy}{\setdefaultdate{\ddmmyydate}}
\DeclareOption{dmyy}{\setdefaultdate{\dmyydate}}
\DeclareOption{text}{\setdefaultdate{\textdate}}
\DeclareOption{us}{\setdefaultdate{\usdate}}
\DeclareOption{mmddyyyy}{\setdefaultdate{\mmddyyyydate}}
\DeclareOption{mdyyyy}{\setdefaultdate{\mdyyyydate}}
\DeclareOption{mmddyy}{\setdefaultdate{\mmddyydate}}
\DeclareOption{mdyy}{\setdefaultdate{\mdyydate}}
\DeclareOption{level}{\fmtcountsetoptions{fmtord=level}}
\DeclareOption{raise}{\fmtcountsetoptions{fmtord=raise}}
\DeclareOption{dayofweek}{\showdowtrue}
\DeclareOption{nodayofweek}{\showdowfalse}
\DeclareOption{nodate}{\@dt@nodatetrue}
\DeclareOption{hhmmss}{\settimeformat{hhmmsstime}}
\DeclareOption{24hr}{\settimeformat{xxivtime}}
\DeclareOption{12hr}{\settimeformat{ampmtime}}
\DeclareOption{oclock}{\settimeformat{oclock}}
\DeclareOption{iso}{%
  \setdefaultdate{\yyyymmdddate}\settimeformat{hhmmsstime}%
  \renewcommand*{\dateseparator}{-}%
  \renewcommand*{\timeseparator}{:}%
}
\DeclareOption{austrian}{\input{dt-austrian.def}}
\DeclareOption{american}{\input{dt-american.def}}
\DeclareOption{bahasa}{\input{dt-bahasa.def}}
\DeclareOption{basque}{\input{dt-basque.def}}
\DeclareOption{breton}{\input{dt-breton.def}}
\DeclareOption{british}{\input{dt-british.def}}
\DeclareOption{bulgarian}{\input{dt-bulgarian.def}}
\DeclareOption{catalan}{\input{dt-catalan.def}}
\DeclareOption{croatian}{\input{dt-croatian.def}}
\DeclareOption{czech}{\input{dt-czech.def}}
\DeclareOption{danish}{\input{dt-danish.def}}
\DeclareOption{dutch}{\input{dt-dutch.def}}
\DeclareOption{esperanto}{\input{dt-esperanto.def}}
\DeclareOption{estonian}{\input{dt-estonian.def}}
\DeclareOption{finnish}{\input{dt-finnish.def}}
\DeclareOption{french}{\input{dt-french.def}}
\DeclareOption{galician}{\input{dt-galician.def}}
\DeclareOption{german}{\input{dt-german.def}\dategerman}
\DeclareOption{greek}{\input{dt-greek.def}}
\DeclareOption{hebrew}{\input{dt-hebrew.def}}
\DeclareOption{icelandic}{\input{dt-icelandic.def}}
\DeclareOption{irish}{\input{dt-irish.def}}
\DeclareOption{italian}{\input{dt-italian.def}}
\DeclareOption{latin}{\input{dt-latin.def}}
\DeclareOption{lsorbian}{\input{dt-lsorbian.def}}
\DeclareOption{magyar}{\input{dt-magyar.def}}
\DeclareOption{naustrian}{\input{dt-naustrian.def}}
\DeclareOption{ngerman}{\input{dt-ngerman.def}\datengerman}
\DeclareOption{norsk}{\input{dt-norsk.def}}
\DeclareOption{polish}{\input{dt-polish.def}}
\DeclareOption{portuges}{\input{dt-portuges.def}}
\DeclareOption{romanian}{\input{dt-romanian.def}}
\DeclareOption{russian}{\input{dt-russian.def}}
\DeclareOption{samin}{\input{dt-samin.def}}
\DeclareOption{scottish}{\input{dt-scottish.def}}
\DeclareOption{serbian}{\input{dt-serbian.def}}
\DeclareOption{slovak}{\input{dt-slovak.def}}
\DeclareOption{slovene}{\input{dt-slovene.def}}
\DeclareOption{spanish}{\input{dt-spanish.def}}
\DeclareOption{swedish}{\input{dt-swedish.def}}
\DeclareOption{turkish}{\input{dt-turkish.def}}
\DeclareOption{ukraineb}{\input{dt-ukraineb.def}}
\DeclareOption{usorbian}{\input{dt-usorbian.def}}
\DeclareOption{UKenglish}{\input{dt-UKenglish.def}}
\DeclareOption{USenglish}{\input{dt-USenglish.def}}
\DeclareOption{welsh}{\input{dt-welsh.def}}
\ProcessOptions
\if@dt@nodate
  \PackageInfo{datetime}{option "nodate" used, so note defining
\string\dateformat}
\else
\providecommand*{\dateformat}[4]{%
\@day=#2\relax\@month=#3\relax\@year=#4\relax#1}
\fi
\if@dt@nodate
\PackageInfo{datetime}{option "nodate" used, so not defining
\string\monthname}
\else
\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}
\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}
\fi
\if@dt@nodate
\PackageInfo{datetime}{option "nodate" used, so not defining
\protect\shortmonthname}
\else
\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}
\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}
\fi
\newif\ifleapyear
\newcount\@dtctr
\if@dt@nodate
\PackageInfo{datetime}{option "nodate" used, so not defining
\string\dayofweek \space or \string\shortdayofweek}
\else
\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
}
\newcount\dayofyear
\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
}
\newcount\dayofweek
\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}
\providecommand*{\dayofweeknameidenglish}[1]{%
\ifcase#1\relax
\or Sunday%
\or Monday%
\or Tuesday%
\or Wednesday%
\or Thursday%
\or Friday%
\or Saturday%
\fi}
\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
}
\providecommand*{\dayofweekname}[3]{%
\computedayofweek{#1}{#2}{#3}%
\dayofweeknameid{\dayofweek}%
}
\providecommand*{\thisdayofweekname}{%
\dayofweekname{\day}{\month}{\year}}
\providecommand*{\shortdayofweeknameidenglish}[1]{%
\ifcase#1\relax
\or Sun%
\or Mon%
\or Tue%
\or Wed%
\or Thu%
\or Fri%
\or Sat%
\fi}
\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}%
\fi
}
\providecommand*{\thisshortdayofweekname}{%
\dayofweekname{\day}{\month}{\year}}
\fi
\if@dt@nodate
\else
\DeclareRobustCommand*{\today}{\formatdate{\day}{\month}{\year}}
\fi
\if@dt@nodate
\else
\@ifundefined{dateenglish}{}{\let\dateenglish\longdate}
\@ifundefined{dateUKenglish}{}{\input{dt-UKenglish.def}}
\@ifundefined{dateUSenglish}{}{\input{dt-USenglish.def}}
\@ifundefined{datebritish}{}{\input{dt-british.def}}
\@ifundefined{dateamerican}{}{\input{dt-american.def}}
\@ifundefined{dateaustrian}{}{\input{dt-austrian.def}}
\@ifundefined{datebahasa}{}{\input{dt-bahasa.def}}
\@ifundefined{datebasque}{}{\input{dt-basque.def}}
\@ifundefined{datebreton}{}{\input{dt-breton.def}}
\@ifundefined{datebulgarian}{}{\input{dt-bulgarian.def}}
\@ifundefined{datecatalan}{}{\input{dt-catalan.def}}
\@ifundefined{datecroatian}{}{\input{dt-croatian.def}}
\@ifundefined{dateczech}{}{\input{dt-czech.def}}
\@ifundefined{datedanish}{}{\input{dt-danish.def}}
\@ifundefined{datedutch}{}{\input{dt-dutch.def}}
\@ifundefined{dateesperanto}{}{\input{dt-esperanto.def}}
\@ifundefined{dateestonian}{}{\input{dt-estonian.def}}
\@ifundefined{datefinnish}{}{\input{dt-finnish.def}}
\@ifundefined{datefrench}{}{\input{dt-french.def}}
\@ifundefined{dategalician}{}{\input{dt-galician.def}}
\@ifundefined{dategerman}{}{\input{dt-german.def}}
\@ifundefined{dategreek}{}{\input{dt-greek.def}}
\@ifundefined{datehebrew}{}{\input{dt-hebrew.def}}
\@ifundefined{dateicelandic}{}{\input{dt-icelandic.def}}
\@ifundefined{dateirish}{}{\input{dt-irish.def}}
\@ifundefined{dateitalian}{}{\input{dt-italian.def}}
\@ifundefined{datelatin}{}{\input{dt-latin.def}}
\@ifundefined{datelsorbian}{}{\input{dt-lsorbian.def}}
\@ifundefined{datemagyar}{}{\input{dt-magyar.def}}
\@ifundefined{datenaustrian}{}{\input{dt-naustrian.def}}
\@ifundefined{datengerman}{}{\input{dt-ngerman.def}}
\@ifundefined{datenorsk}{}{\input{dt-norsk.def}}
\@ifundefined{datepolish}{}{\input{dt-polish.def}}
\@ifundefined{dateportuges}{}{\input{dt-portuges.def}}
\@ifundefined{dateromanian}{}{\input{dt-romanian.def}}
\@ifundefined{daterussian}{}{\input{dt-russian.def}}
\@ifundefined{datesamin}{}{\input{dt-samin.def}}
\@ifundefined{datescottish}{}{\input{dt-scottish.def}}
\@ifundefined{dateserbian}{}{\input{dt-serbian.def}}
\@ifundefined{dateslovak}{}{\input{dt-slovak.def}}
\@ifundefined{dateslovene}{}{\input{dt-slovene.def}}
\@ifundefined{datespanish}{}{\input{dt-spanish.def}}
\@ifundefined{dateswedish}{}{\input{dt-swedish.def}}
\@ifundefined{dateturkish}{}{\input{dt-turkish.def}}
\@ifundefined{dateukraineb}{}{\input{dt-ukraineb.def}}
\@ifundefined{dateusorbian}{}{\input{dt-usorbian.def}}
\@ifundefined{datewelsh}{}{\input{dt-welsh.def}}
\fi
\newtoks\dt@a \newtoks\dt@b
\edef\pdfdate{\the\year}
\dt@b=\expandafter{\pdfdate}
\dt@a=\expandafter{\the\month}
\ifnum\month<10\relax
\edef\pdfdate{\the\dt@b0\the\dt@a}
\else
\edef\pdfdate{\the\dt@b\the\dt@a}
\fi
\dt@b=\expandafter{\pdfdate}
\dt@a=\expandafter{\the\day}
\ifnum\day<10\relax
\edef\pdfdate{\the\dt@b0\the\dt@a}
\else
\edef\pdfdate{\the\dt@b\the\dt@a}
\fi
\@dtctr=\time%
\divide\@dtctr by 60\relax
\dt@b=\expandafter{\pdfdate}
\dt@a=\expandafter{\the\@dtctr}
\ifnum\@dtctr<10
\edef\pdfdate{\the\dt@b0\the\dt@a}
\else
\edef\pdfdate{\the\dt@b\the\dt@a}
\fi
\@dtctr=\time%
\@modulo{\@dtctr}{60}%
\dt@b=\expandafter{\pdfdate}
\dt@a=\expandafter{\the\@dtctr}
\ifnum\@dtctr<10\relax
\edef\pdfdate{\the\dt@b0\the\dt@a}
\else
\edef\pdfdate{\the\dt@b\the\dt@a}
\fi
\dt@a={00}
\dt@b=\expandafter{\pdfdate}
\edef\pdfdate{\the\dt@b\the\dt@a}
\endinput
%%
%% End of file `datetime.sty'.
