diff options
author | Reinhard Kotucha <reinhard.kotucha@web.de> | 2007-04-08 17:56:27 +0000 |
---|---|---|
committer | Reinhard Kotucha <reinhard.kotucha@web.de> | 2007-04-08 17:56:27 +0000 |
commit | 8c38dc88ed6cf33fd2e9385e102e9935e8b60b00 (patch) | |
tree | 374324d88bb7ddd8f6e57b14683315891102f936 /Master/texmf-dist/tex/latex/datetime/datetime.sty | |
parent | caef592b102b13a49c19d22bc87241b0a99d4045 (diff) |
update datetime to v2.51
git-svn-id: svn://tug.org/texlive/trunk@4130 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/datetime/datetime.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/datetime/datetime.sty | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/latex/datetime/datetime.sty b/Master/texmf-dist/tex/latex/datetime/datetime.sty index 9b5db911e7b..15f0e51d927 100644 --- a/Master/texmf-dist/tex/latex/datetime/datetime.sty +++ b/Master/texmf-dist/tex/latex/datetime/datetime.sty @@ -5,7 +5,7 @@ %% The original source files were: %% %% datetime.dtx (with options: `datetime.sty,package') -%% Copyright (C) 2006 Nicola Talbot, all rights reserved. +%% Copyright (C) 2007 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 @@ -27,7 +27,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{datetime}[2006/12/05 v2.49 Date Time Package] +\ProvidesPackage{datetime}[2007/01/30 v2.51 Date Time Package] \RequirePackage{fmtcount} \newif\if@dt@nodate \@dt@nodatefalse @@ -35,6 +35,8 @@ \newif\if@dt@multilingual \@ifpackageloaded{babel}{% \@dt@multilingualtrue}{\@dt@multilingualfalse} +\@ifpackageloaded{ngerman}{% +\@dt@multilingualtrue}{\@dt@multilingualfalse} \newcommand{\ordinaldateenglish}[1]{\ordinalnum{#1}} \newcommand{\ordinaldatewelsh}[1]{% #1\ifnum#1=1\/\textsuperscript{a\~n}\fi} @@ -45,7 +47,7 @@ \newcommand{\ordinaldate}[1]{% \if@dt@multilingual \@ifundefined{ordinaldate\languagename}{#1}{% -\csname ordinaldate\languagename\endcsname{#1}} +\csname ordinaldate\languagename\endcsname{#1}}% \else \ordinalnum{#1}% \fi} @@ -514,27 +516,29 @@ You can't create a new time format called "#1" as the command \newtimeformat{xxivtime}{% \twodigit\THEHOUR\timeseparator\twodigit\THEMINUTE} \newtimeformat{ampmtime}{% -\THEHOURXII\timeseparator\twodigit\THEMINUTE +\ifthenelse{\value{HOUR}=0}{12}{\THEHOURXII}\timeseparator\twodigit\THEMINUTE \ifthenelse{\value{HOUR}<12}{\amname}{% \ifthenelse{\time=720}{ \noon}{\pmname}}} +\newcommand*{\hourstring}[1]{% +\ifthenelse{\value{#1}=0}{\midnight}{\Numberstring{#1}}} \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}}{% +\quarterpast\ \hourstring{HOUR}}{% \ifthenelse{\value{MINUTE}=30}{% -\halfpast\ \Numberstring{HOUR}}{% +\halfpast\ \hourstring{HOUR}}{% \ifthenelse{\value{MINUTE}=45}{% -\quarterto\ \Numberstring{TOHOUR}}{% +\quarterto\ \hourstring{TOHOUR}}{% \ifthenelse{\value{MINUTE}<30}{% \Numberstring{MINUTE}\ \ifthenelse{\value{MINUTE}=1}{minute}{minutes} -past \Numberstring{HOURXII}}{% +past \hourstring{HOURXII}}{% \Numberstring{TOMINUTE}\ \ifthenelse{% -\value{TOMINUTE}=1}{minute}{minutes} to \Numberstring{TOHOUR}}}}}}\ +\value{TOMINUTE}=1}{minute}{minutes} to \hourstring{TOHOUR}}}}}}% \ifthenelse{\value{HOUR}<12}{% -\amstring}{% -\pmstring}}} +\ifthenelse{\value{HOUR}=0}{}{\ \amstring}}{% +\ifthenelse{\value{TOHOUR}=0}{}{\ \pmstring}}}} \providecommand{\amname}{am} \providecommand{\pmname}{pm} \providecommand{\amorpmname}{% |