diff options
author | Karl Berry <karl@freefriends.org> | 2015-04-02 21:42:15 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-04-02 21:42:15 +0000 |
commit | fdd807f99ca5dbba98a05ce12bd086949df0ad47 (patch) | |
tree | 4e6c7f09c555b3564ffc581a992549da5859b50f /Master/texmf-dist/tex | |
parent | 4b266fa09d104fab165ca24796070c6ce47e4031 (diff) |
datetime2-en-fulltext
git-svn-id: svn://tug.org/texlive/trunk@36705 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/datetime2-en-fulltext/datetime2-en-fulltext.sty | 532 |
1 files changed, 532 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/datetime2-en-fulltext/datetime2-en-fulltext.sty b/Master/texmf-dist/tex/latex/datetime2-en-fulltext/datetime2-en-fulltext.sty new file mode 100644 index 00000000000..42b1853c4de --- /dev/null +++ b/Master/texmf-dist/tex/latex/datetime2-en-fulltext/datetime2-en-fulltext.sty @@ -0,0 +1,532 @@ +%% +%% This is file `datetime2-en-fulltext.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% datetime2-en-fulltext.dtx (with options: `datetime2-en-fulltext.sty,package') +%% +%% datetime2-en-fulltext.dtx +%% Copyright 2015 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 datetime2-en-fulltext.dtx and +%% datetime2-en-fulltext.ins and the derived file +%% datetime2-en-fulltext.sty. +%% +%% \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{datetime2-en-fulltext}[2015/04/01 v1.0] +\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{datetime2}} +\ProcessOptions +\RequirePackage{datetime2} +\RequirePackage{fmtcount} +\def\CurrentTrackedDialect{english} +\RequireDateTimeModule{english-base} +\undef\CurrentTrackedDialect +\DTMnewdatestyle{en-fulltext}{% + \renewcommand*\DTMdisplaydate[4]{% + \ifDTMshowdow + \ifnum##4>-1 + \DTMenglishweekdayname{##4} the\space + \fi + \fi + \protect\ordinalstringnum{##3} of \DTMenglishmonthname{##2}% + \DTMenfulltextmonthyearsep + \protect\numberstringnum{##1}% + }% + \renewcommand*\DTMDisplaydate[4]{% + \ifDTMshowdow + \ifnum##4>-1 + \DTMenglishweekdayname{##4} the\space + \else + \protect\Ordinalstringnum{##3} + \fi + \else + \protect\Ordinalstringnum{##3} + \fi + of \DTMenglishmonthname{##2}% + \DTMenfulltextmonthyearsep + \protect\numberstringnum{##1}% + }% +} +\DTMnewdatestyle{en-FullText}{% + \renewcommand*\DTMdisplaydate[4]{% + \ifDTMshowdow + \ifnum##4>-1 + \DTMenglishweekdayname{##4} the\space + \fi + \fi + \protect\Ordinalstringnum{##3} of \DTMenglishmonthname{##2}% + \DTMenfulltextmonthyearsep + \protect\Numberstringnum{##1}% + }% + \renewcommand*\DTMDisplaydate{\DTMdisplaydate}% +} +\DTMnewdatestyle{en-FULLTEXT}{% + \renewcommand*\DTMdisplaydate[4]{% + \ifDTMshowdow + \ifnum##4>-1 + \MakeUppercase{\DTMenglishweekdayname{##4}} THE\space + \fi + \fi + \protect\ORDINALstringnum{##3} OF + \MakeUppercase{\DTMenglishmonthname{##2}% + \DTMenfulltextmonthyearsep}% + \protect\NUMBERstringnum{##1}% + }% + \renewcommand*\DTMDisplaydate{\DTMdisplaydate}% +} +\newcommand*\DTMenfulltextmonthyearsep{,\space} +\DTMsetdatestyle{en-fulltext} +\DTMnewtimestyle{en-fulltext}{% + \renewcommand*\DTMdisplaytime[3]{% + \ifboolexpr + { test {\ifnumequal{##2}{0}} and + ( + test {\ifnumequal{##1}{0}} + or test {\ifnumequal{##1}{12}} + or test {\ifnumequal{##1}{24}} + ) + }% + {% + \ifnum##1=12 + \DTMenglishnoon + \else + \DTMenglishmidnight + \fi + }% + {% + \ifnum##2=0 + \protect\numberstringnum{##1} \DTMoclockstring + \else + \ifnum##2<31 + \ifnum##2=15 + \DTMquarterpaststring\space + \else + \ifnum##2=30 + \DTMhalfpaststring\space + \else + \protect\numberstringnum{##2} + \ifnum##2=1 \DTMminutepaststring\else \DTMminutespaststring\fi + \space + \fi + \fi + \ifnum##1>12 + \ifnum##1=24 + \DTMenglishmidnight + \else + \protect\numberstringnum{\numexpr##1-12}% + \fi + \else + \ifnum##1=0 + \DTMenglishmidnight + \else + \protect\numberstringnum{##1}% + \fi + \fi + \else + \ifnum##2=45 + \DTMquartertostring\space + \else + \protect\numberstringnum{\numexpr60-##2} + \ifnum##2=59 \DTMminutetostring\else \DTMminutestostring\fi + \space + \fi + \ifnum##1>12 + \ifnum##1=24 + \protect\numberstringnum{1}% + \else + \ifnum##1=23 + \DTMenglishmidnight + \else + \protect\numberstringnum{\numexpr##1-11}% + \fi + \fi + \else + \ifnum##1=12 + \protect\numberstringnum{1}% + \else + \protect\numberstringnum{\numexpr##1+1}% + \fi + \fi + \fi + \fi + \ifnum##1>11 + \ifnum##1=23 + \ifnum##2<31 + \space\DTMafternoonstring + \fi + \else + \ifnum##1=24 + \ifnum##2>30 + \space\DTMmorningstring + \fi + \else + \space\DTMafternoonstring + \fi + \fi + \else + \ifnum##1>0 + \space\DTMmorningstring + \else + \ifnum##2>30 + \space\DTMmorningstring + \fi + \fi + \fi + }% + }% +} +\DTMnewtimestyle{en-Fulltext}{% + \renewcommand*\DTMdisplaytime[3]{% + \ifboolexpr + { test {\ifnumequal{##2}{0}} and + ( + test {\ifnumequal{##1}{0}} + or test {\ifnumequal{##1}{12}} + or test {\ifnumequal{##1}{24}} + ) + }% + {% + \ifnum##1=12 + \expandafter\MakeUppercase\DTMenglishnoon + \else + \expandafter\MakeUppercase\DTMenglishmidnight + \fi + }% + {% + \ifnum##2=0 + \protect\Numberstringnum{##1} \DTMoclockstring + \else + \ifnum##2<31 + \ifnum##2=15 + \expandafter\MakeUppercase\DTMquarterpaststring\space + \else + \ifnum##2=30 + \expandafter\MakeUppercase\DTMhalfpaststring\space + \else + \protect\Numberstringnum{##2} + \ifnum##2=1 \DTMminutepaststring\else \DTMminutespaststring\fi + \space + \fi + \fi + \ifnum##1>12 + \ifnum##1=24 + \DTMenglishmidnight + \else + \protect\numberstringnum{\numexpr##1-12}% + \fi + \else + \ifnum##1=0 + \DTMenglishmidnight + \else + \protect\numberstringnum{##1}% + \fi + \fi + \else + \ifnum##2=45 + \expandafter\MakeUppercase\DTMquartertostring\space + \else + \protect\Numberstringnum{\numexpr60-##2} + \ifnum##2=59 \DTMminutetostring\else \DTMminutestostring\fi + \space + \fi + \ifnum##1>12 + \ifnum##1=24 + \protect\numberstringnum{1}% + \else + \ifnum##1=23 + \DTMenglishmidnight + \else + \protect\numberstringnum{\numexpr##1-11}% + \fi + \fi + \else + \ifnum##1=12 + \protect\numberstringnum{1}% + \else + \protect\numberstringnum{\numexpr##1+1}% + \fi + \fi + \fi + \fi + \ifnum##1>11 + \ifnum##1=23 + \ifnum##2<31 + \space\DTMafternoonstring + \fi + \else + \ifnum##1=24 + \ifnum##2>30 + \space\DTMmorningstring + \fi + \else + \space\DTMafternoonstring + \fi + \fi + \else + \ifnum##1>0 + \space\DTMmorningstring + \else + \ifnum##2>30 + \space\DTMmorningstring + \fi + \fi + \fi + }% + }% +} +\DTMnewtimestyle{en-FULLTEXT}{% + \renewcommand*\DTMdisplaytime[3]{% + \ifboolexpr + { test {\ifnumequal{##2}{0}} and + ( + test {\ifnumequal{##1}{0}} + or test {\ifnumequal{##1}{12}} + or test {\ifnumequal{##1}{24}} + ) + }% + {% + \ifnum##1=12 + \MakeUppercase\DTMenglishnoon + \else + \MakeUppercase\DTMenglishmidnight + \fi + }% + {% + \ifnum##2=0 + \protect\NUMBERstringnum{##1} \MakeUppercase\DTMoclockstring + \else + \ifnum##2<31 + \ifnum##2=15 + \MakeUppercase\DTMquarterpaststring\space + \else + \ifnum##2=30 + \MakeUppercase\DTMhalfpaststring\space + \else + \protect\NUMBERstringnum{##2} + \MakeUppercase + {% + \ifnum##2=1 \DTMminutepaststring\else \DTMminutespaststring\fi + }% + \space + \fi + \fi + \ifnum##1>12 + \ifnum##1=24 + \MakeUppercase\DTMenglishmidnight + \else + \protect\NUMBERstringnum{\numexpr##1-12}% + \fi + \else + \ifnum##1=0 + \MakeUppercase\DTMenglishmidnight + \else + \protect\NUMBERstringnum{##1}% + \fi + \fi + \else + \ifnum##2=45 + \MakeUppercase\DTMquartertostring\space + \else + \protect\NUMBERstringnum{\numexpr60-##2} + \MakeUppercase + {% + \ifnum##2=59 \DTMminutetostring\else \DTMminutestostring\fi + }% + \space + \fi + \ifnum##1>12 + \ifnum##1=24 + \protect\NUMBERstringnum{1}% + \else + \ifnum##1=23 + \MakeUppercase\DTMenglishmidnight + \else + \protect\NUMBERstringnum{\numexpr##1-11}% + \fi + \fi + \else + \ifnum##1=12 + \protect\NUMBERstringnum{1}% + \else + \protect\NUMBERstringnum{\numexpr##1+1}% + \fi + \fi + \fi + \fi + \ifnum##1>11 + \ifnum##1=23 + \ifnum##2<31 + \space\MakeUppercase\DTMafternoonstring + \fi + \else + \ifnum##1=24 + \ifnum##2>30 + \space\MakeUppercase\DTMmorningstring + \fi + \else + \space\MakeUppercase\DTMafternoonstring + \fi + \fi + \else + \ifnum##1>0 + \space\MakeUppercase\DTMmorningstring + \else + \ifnum##2>30 + \space\MakeUppercase\DTMmorningstring + \fi + \fi + \fi + }% + }% +} +\DTMnewtimestyle{en-FullText}{% + \renewcommand*\DTMdisplaytime[3]{% + \ifboolexpr + { test {\ifnumequal{##2}{0}} and + ( + test {\ifnumequal{##1}{0}} + or test {\ifnumequal{##1}{12}} + or test {\ifnumequal{##1}{24}} + ) + }% + {% + \ifnum##1=12 + \expandafter\MakeUppercase\DTMenglishnoon + \else + \expandafter\MakeUppercase\DTMenglishmidnight + \fi + }% + {% + \ifnum##2=0 + \protect\Numberstringnum{##1} \DTMOClockstring + \else + \ifnum##2<31 + \ifnum##2=15 + \DTMQuarterPaststring\space + \else + \ifnum##2=30 + \DTMHalfPaststring\space + \else + \protect\Numberstringnum{##2} + \ifnum##2=1 \DTMMinutePaststring\else \DTMMinutesPaststring\fi + \space + \fi + \fi + \ifnum##1>12 + \ifnum##1=24 + \expandafter\MakeUppercase\DTMenglishmidnight + \else + \protect\Numberstringnum{\numexpr##1-12}% + \fi + \else + \ifnum##1=0 + \expandafter\MakeUppercase\DTMenglishmidnight + \else + \protect\Numberstringnum{##1}% + \fi + \fi + \else + \ifnum##2=45 + \DTMQuarterTostring\space + \else + \protect\Numberstringnum{\numexpr60-##2} + \ifnum##2=59 \DTMMinuteTostring\else \DTMMinutesTostring\fi + \space + \fi + \ifnum##1>12 + \ifnum##1=24 + \protect\Numberstringnum{1}% + \else + \ifnum##1=23 + \expandafter\MakeUppercase\DTMenglishmidnight + \else + \protect\Numberstringnum{\numexpr##1-11}% + \fi + \fi + \else + \ifnum##1=12 + \protect\Numberstringnum{1}% + \else + \protect\Numberstringnum{\numexpr##1+1}% + \fi + \fi + \fi + \fi + \ifnum##1>11 + \ifnum##1=23 + \ifnum##2<31 + \space\DTMAfterNoonstring + \fi + \else + \ifnum##1=24 + \ifnum##2>30 + \space\DTMMorningstring + \fi + \else + \space\DTMAfterNoonstring + \fi + \fi + \else + \ifnum##1>0 + \space\DTMMorningstring + \else + \ifnum##2>30 + \space\DTMMorningstring + \fi + \fi + \fi + }% + }% +} +\newcommand*{\DTMoclockstring}{o'clock} +\newcommand*{\DTMOClockstring}{O'Clock} +\newcommand*{\DTMquarterpaststring}{quarter past} +\newcommand*{\DTMQuarterPaststring}{Quarter Past} +\newcommand*{\DTMminutepaststring}{minute past} +\newcommand*{\DTMminutespaststring}{minutes past} +\newcommand*{\DTMMinutePaststring}{Minute Past} +\newcommand*{\DTMMinutesPaststring}{Minutes Past} +\newcommand*{\DTMhalfpaststring}{half past} +\newcommand*{\DTMHalfPaststring}{Half Past} +\newcommand*{\DTMquartertostring}{quarter to} +\newcommand*{\DTMQuarterTostring}{Quarter to} +\newcommand*{\DTMminutetostring}{minute to} +\newcommand*{\DTMMinuteTostring}{Minute to} +\newcommand*{\DTMminutestostring}{minutes to} +\newcommand*{\DTMMinutesTostring}{Minutes to} +\newcommand*{\DTMmorningstring}{in the morning} +\newcommand*{\DTMMorningstring}{in the Morning} +\newcommand*{\DTMafternoonstring}{in the afternoon} +\newcommand*{\DTMAfterNoonstring}{in the Afternoon} +\DTMsettimestyle{en-fulltext} +\endinput +%% +%% End of file `datetime2-en-fulltext.sty'. |