%%
%% This is file `datetime.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% datetime.dtx  (with options: `datetime.sty,package')
%% Copyright (C) 2005 Nicola Talbot, all rights reserved.
%% If you modify this file, you must change its name first.
%% You are NOT ALLOWED to distribute this file alone. You are NOT
%% ALLOWED to take money for the distribution or use of either this
%% file or a changed version, except for a nominal charge for copying
%% etc.
%% \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}[2005/09/30 v2.46 Date Time Package]
\RequirePackage{fmtcount}
\newif\if@dt@nodate
\@dt@nodatefalse
\newcommand{\dateseparator}{/}
\newcommand{\ordinaldateenglish}[1]{\ordinalnum{#1}}
\let\ordinaldatenohyphenation=\ordinaldateenglish

\newcommand{\ordinaldatewelsh}[1]{%
#1\ifnum#1=1\/\textsuperscript{a\~n}\fi}

\newcommand{\ordinaldatebreton}[1]{%
#1\ifnum#1=1\/\textsuperscript{a\~n}\fi}

\newcommand{\ordinaldatefrench}[1]{%
#1\ifnum#1=1\ier\fi}

\newcommand{\ordinaldate}[1]{%
\@ifundefined{languagename}{\ordinalnum{#1}}{%
\@ifundefined{ordinaldate\languagename}{#1}{%
\csname ordinaldate\languagename\endcsname{#1}}}}
\newif\ifshowdow % show the day of week if true

\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}}

\providecommand*{\twodigit}[1]{{\@dtctr=#1\relax\ifnum\@dtctr<10 0\fi\the\@dtctr}}

\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
\@Ordinalstring\@day\ of \monthname[\@month], \@Numberstring\@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}}}
\DeclareRobustCommand*{\currenttime}{\xxivtime}

\newcommand{\timeseparator}{:}

\providecommand{\settimeformat}[1]{\DeclareRobustCommand*\currenttime{\csname#1\endcsname}}
\longdate
\showdowtrue
\InputIfFileExists{datetime.cfg}{\typeout{Loading local datetime configurations}}{\typeout{No datetime.cfg file found}}
\RequirePackage{fmtcount}
\DeclareOption{long}{\longdate}
\DeclareOption{short}{\shortdate}
\DeclareOption{ddmmyyyy}{\ddmmyyyydate}
\DeclareOption{dmyyyy}{\dmyyyydate}
\DeclareOption{ddmmyy}{\ddmmyydate}
\DeclareOption{dmyy}{\dmyydate}
\DeclareOption{text}{\textdate}
\DeclareOption{us}{\usdate}
\DeclareOption{mmddyyyy}{\mmddyyyydate}
\DeclareOption{mdyyyy}{\mdyyyydate}
\DeclareOption{mmddyy}{\mmddyydate}
\DeclareOption{mdyy}{\mdyydate}
\DeclareOption{level}{\fmtcountsetoptions{fmtord=level}}
\DeclareOption{raise}{\fmtcountsetoptions{fmtord=raise}}
\DeclareOption{dayofweek}{\showdowtrue}
\DeclareOption{nodayofweek}{\showdowfalse}
\DeclareOption{nodate}{\@dt@nodatetrue}
\DeclareOption{24hr}{\settimeformat{xxivtime}}
\DeclareOption{12hr}{\settimeformat{ampmtime}}
\DeclareOption{oclock}{\settimeformat{oclock}}


\DeclareOption{austrian}{\input{dt-austrian.def}}
\DeclareOption{bahasa}{\input{dt-bahasa.def}}
\DeclareOption{basque}{\input{dt-basque.def}}
\DeclareOption{breton}{\input{dt-breton.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}}
\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}}
\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{welsh}{\input{dt-welsh.def}}

\ProcessOptions
\RequirePackage{ifthen}
\if@dt@nodate
\typeout{datetime package message : option "nodate" used, so not defining \protect\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}

 %\let\monthname=\monthnameenglish
\newcommand{\monthname}{\@ifundefined{languagename}{%
\monthnameenglish}{\@ifundefined{monthname\languagename}{%
\monthnameenglish}{\csname monthname\languagename\endcsname}}}
\fi
\if@dt@nodate
\typeout{datetime package message : 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}

 %\let\shortmonthname=\shortmonthnameenglish

\newcommand{\shortmonthname}{\@ifundefined{languagename}{%
\shortmonthnameenglish}{\@ifundefined{shortmonthname\languagename}{%
\shortmonthnameenglish}{\csname shortmonthname\languagename\endcsname}}}
\fi
\newif\ifleapyear

\newcount\@dtctr

\if@dt@nodate
\typeout{datetime package message : option "nodate" used, so not defining \protect\dayofweek \space or \protect\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 \protect\computedayofyear
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]{%
\@ifundefined{languagename}{%
\dayofweeknameidenglish{#1}}{%
\@ifundefined{dayofweeknameid\languagename}{%
\dayofweeknameidenglish{#1}}{%
\csname dayofweeknameid\languagename\endcsname{#1}}}%
}

\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}%
\@ifundefined{languagename}{%
\shortdayofweeknameidenglish{\dayofweek}}{%
\@ifundefined{shortdayofweeknameid\languagename}{%
\shortdayofweeknameidenglish{\dayofweek}}{%
\csname shortdayofweeknameid\languagename\endcsname\dayofweek}}%
}

\fi

\providecommand{\thisshortdayofweekname}{\dayofweekname{\day}{\month}{\year}}
\if@dt@nodate
\else
\DeclareRobustCommand*{\today}{\formatdate{\day}{\month}{\year}}
\fi
\if@dt@nodate
\else
\@ifundefined{dateenglish}{}{\let\dateenglish\longdate}
\@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
\if@dt@nodate
\typeout{datetime package message : option "nodate" used, so not defining \protect\newdateformat}
\else

\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{\dateformat}[4]{\@day=#2\relax\@month=#3\relax\@year=#4\relax#1}

\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 you new date format a different name}}}
\fi

\newcount\c@HOUR
\newcount\c@HOURXII
\newcount\c@MINUTE
\newcount\c@TOHOUR
\newcount\c@TOMINUTE
\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}

\providecommand{\newtimeformat}[2]{%
\@ifundefined{#1}{%
\expandafter\def\csname#1\endcsname{%
\c@HOUR=\time%
\divide\c@HOUR by 60\relax
\c@HOURXII=\c@HOUR
\ifnum\c@HOURXII>12
\advance\c@HOURXII by -12\relax
\fi
\c@MINUTE=\time%
\@modulo{\c@MINUTE}{60}%
\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
#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{ampmtime}{\THEHOURXII\timeseparator\twodigit\THEMINUTE\ifthenelse{\value{HOUR}<12}{\amname}{\ifthenelse{\time=720}{ \noon}{\pmname}}}

\newtimeformat{oclock}{\ifthenelse{\time=0 \or \time=720}{%
\ifthenelse{\time=0}{\midnight}{\noon}}{%
\ifthenelse{\value{MINUTE}=0}{%
\Numberstring{HOUR} \oclockstring}{%
\ifthenelse{\value{MINUTE}=15}{%
\quarterpast\ \Numberstring{HOUR}}{%
\ifthenelse{\value{MINUTE}=30}{%
\halfpast\ \Numberstring{HOUR}}{%
\ifthenelse{\value{MINUTE}=45}{%
\quarterto\ \Numberstring{TOHOUR}}{%
\ifthenelse{\value{MINUTE}<30}{%
\Numberstring{MINUTE}\ \ifthenelse{\value{MINUTE}=1}{minute}{minutes} past \Numberstring{HOURXII}}{%
\Numberstring{TOMINUTE}\ \ifthenelse{\value{TOMINUTE}=1}{minute}{minutes} to \Numberstring{TOHOUR}}}}}}\
\ifthenelse{\value{HOUR}<12}{%
\amstring}{%
\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}

\newcount\pdftimectr
\newcount\pdfdatectr

\pdftimectr=0\relax
\@dtctr=\time%
\divide\@dtctr by 60\relax
\multiply\@dtctr by 10000\relax
\pdftimectr=\@dtctr
\@dtctr=\time%
\@modulo{\@dtctr}{60}%
\multiply\@dtctr by 100\relax
\advance\pdftimectr by \@dtctr
\pdfdatectr=\day
\@dtctr=\month
\multiply\@dtctr by 100\relax
\advance\pdfdatectr by \@dtctr
\@dtctr=\year
\multiply\@dtctr by 10000\relax
\advance\pdfdatectr by \@dtctr
\ifnum\pdftimectr<100000
\edef\pdfdate{\the\pdfdatectr0\the\pdftimectr}
\else
\edef\pdfdate{\the\pdfdatectr\the\pdftimectr}
\fi
\endinput
%%
%% End of file `datetime.sty'.
