| 1 |
%\iffalse |
| 2 |
%<*package> |
| 3 |
%% \CharacterTable |
| 4 |
%% {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 |
| 5 |
%% 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 |
| 6 |
%% Digits \0\1\2\3\4\5\6\7\8\9 |
| 7 |
%% Exclamation \! Double quote \" Hash (number) \# |
| 8 |
%% Dollar \$ Percent \% Ampersand \& |
| 9 |
%% Acute accent \' Left paren \( Right paren \) |
| 10 |
%% Asterisk \* Plus \+ Comma \, |
| 11 |
%% Minus \- Point \. Solidus \/ |
| 12 |
%% Colon \: Semicolon \; Less than \< |
| 13 |
%% Equals \= Greater than \> Question mark \? |
| 14 |
%% Commercial at \@ Left bracket \[ Backslash \\ |
| 15 |
%% Right bracket \] Circumflex \^ Underscore \_ |
| 16 |
%% Grave accent \` Left brace \{ Vertical bar \| |
| 17 |
%% Right brace \} Tilde \~} |
| 18 |
%</package> |
| 19 |
%\fi |
| 20 |
% \iffalse |
| 21 |
% Doc-Source file to use with LaTeX2e |
| 22 |
% Copyright (C) 2015 Nicola Talbot, all rights reserved. |
| 23 |
% \fi |
| 24 |
% \iffalse |
| 25 |
%<*driver> |
| 26 |
\documentclass{ltxdoc} |
| 27 |
|
| 28 |
\usepackage{alltt} |
| 29 |
\usepackage{graphicx} |
| 30 |
\usepackage[utf8]{inputenc} |
| 31 |
\usepackage[T1]{fontenc} |
| 32 |
\usepackage{datetime2-en-fulltext} |
| 33 |
\usepackage[colorlinks, |
| 34 |
bookmarks, |
| 35 |
hyperindex=false, |
| 36 |
pdfauthor={Nicola L.C. Talbot}, |
| 37 |
pdftitle={datetime2-en-fulltext.sty: English Full Text |
| 38 |
Date and Time Styles}]{hyperref} |
| 39 |
|
| 40 |
|
| 41 |
\CheckSum{649} |
| 42 |
|
| 43 |
\renewcommand*{\usage}[1]{\hyperpage{#1}} |
| 44 |
\renewcommand*{\main}[1]{\hyperpage{#1}} |
| 45 |
\IndexPrologue{\section*{\indexname}\markboth{\indexname}{\indexname}} |
| 46 |
\setcounter{IndexColumns}{2} |
| 47 |
|
| 48 |
\newcommand*{\sty}[1]{\textsf{#1}} |
| 49 |
\newcommand*{\opt}[1]{\texttt{#1}\index{#1=\texttt{#1}|main}} |
| 50 |
|
| 51 |
\RecordChanges |
| 52 |
\PageIndex |
| 53 |
\CodelineNumbered |
| 54 |
|
| 55 |
\begin{document} |
| 56 |
\DocInput{datetime2-en-fulltext.dtx} |
| 57 |
\end{document} |
| 58 |
%</driver> |
| 59 |
%\fi |
| 60 |
% |
| 61 |
%\MakeShortVerb{"} |
| 62 |
% |
| 63 |
%\title{datetime2-en-fulltext.sty: English Full Text Date and Time |
| 64 |
%Styles} |
| 65 |
%\author{Nicola L. C. Talbot} |
| 66 |
%\date{2014-04-01 (v1.0)} |
| 67 |
%\maketitle |
| 68 |
% |
| 69 |
%\begin{abstract} |
| 70 |
%This is a supplementary package that provides English full text date and |
| 71 |
%time styles for the datetime2.sty package. These styles are |
| 72 |
%analogous to the styles provided by the old \sty{datetime}'s |
| 73 |
%\cs{textdate} and \cs{oclock}. \textbf{These styles are not |
| 74 |
%expandable styles.} This means that you can't use them in PDF |
| 75 |
%bookmarks nor can you use them in case-changing commands such as |
| 76 |
%\cs{MakeUppercase}. |
| 77 |
%\end{abstract} |
| 78 |
% |
| 79 |
%\section{Introduction} |
| 80 |
% |
| 81 |
%This package loads the \sty{datetime2} package and the |
| 82 |
%"english-base" language module, if not already loaded, and provides the |
| 83 |
%date styles: |
| 84 |
%\begin{description} |
| 85 |
%\item[en-fulltext] Produces the date in the style: |
| 86 |
%\DTMsetdatestyle{en-fulltext}\today. (Lower case ordinal and number |
| 87 |
%words.) Commands such as \cs{Today} will start with a capital. For |
| 88 |
%example: \Today. |
| 89 |
%\item[en-FullText] Produces the date in the style: |
| 90 |
%\DTMsetdatestyle{en-FullText}\today. (Title Case.) |
| 91 |
%\item[en-FULLTEXT] Produces the date in the style: |
| 92 |
%\DTMsetdatestyle{en-FULLTEXT}\today. (All caps.) |
| 93 |
%\end{description} |
| 94 |
%These styles honour the \opt{showdow} setting. Example: |
| 95 |
%\begin{verbatim} |
| 96 |
%\documentclass{article} |
| 97 |
%\usepackage[showdow]{datetime2-en-fulltext} |
| 98 |
%\begin{document} |
| 99 |
%Date: \today. |
| 100 |
%\end{document} |
| 101 |
%\end{verbatim} |
| 102 |
%The separator between the month and year is given by |
| 103 |
%\cs{DTMenfulltextmonthyearsep} which may be redefined using |
| 104 |
%\cs{renewcommand}. |
| 105 |
% |
| 106 |
%The \sty{datetime2-en-fulltext} package automatically switches on |
| 107 |
%the "en-fulltext" date style. You can switch the style using |
| 108 |
%\cs{DTMsetdatestyle}. For example: |
| 109 |
%\begin{verbatim} |
| 110 |
%\DTMsetdatestyle{en-FullText} |
| 111 |
%\end{verbatim} |
| 112 |
% |
| 113 |
%This package also provides the time styles: |
| 114 |
%\begin{description} |
| 115 |
%\item[en-fulltext] Produces the time in the style: |
| 116 |
%\DTMsettimestyle{en-fulltext}\DTMcurrenttime. (Lower case.) |
| 117 |
% |
| 118 |
%\item[en-Fulltext] Produces the time in the style: |
| 119 |
%\DTMsettimestyle{en-Fulltext}\DTMcurrenttime. (Initial capital.) |
| 120 |
% |
| 121 |
%\item[en-FullText] Produces the time in the style: |
| 122 |
%\DTMsettimestyle{en-FullText}\DTMcurrenttime. (Title Case.) |
| 123 |
% |
| 124 |
%\item[en-FULLTEXT] Produces the time in the style: |
| 125 |
%\DTMsettimestyle{en-FULLTEXT}\DTMcurrenttime. (All caps.) |
| 126 |
% |
| 127 |
%\end{description} |
| 128 |
% |
| 129 |
%The \sty{datetime2-en-fulltext} package automatically switches on |
| 130 |
%the "en-fulltext" time style. You can switch the style using |
| 131 |
%\cs{DTMsettimestyle}. For example: |
| 132 |
%\begin{verbatim} |
| 133 |
%\DTMsettimestyle{en-FullText} |
| 134 |
%\end{verbatim} |
| 135 |
% |
| 136 |
%Note that if you use \sty{polyglossia} or \sty{babel} and you don't |
| 137 |
%have \sty{datetime2}'s \opt{useregional} setting set to "false", |
| 138 |
%then the regional styles will override the styles provided here. |
| 139 |
% |
| 140 |
%\StopEventually{% |
| 141 |
%\clearpage |
| 142 |
%\phantomsection |
| 143 |
%\addcontentsline{toc}{section}{Change History}% |
| 144 |
%\PrintChanges |
| 145 |
%\addcontentsline{toc}{section}{\indexname}% |
| 146 |
%\PrintIndex} |
| 147 |
%\section{The Code} |
| 148 |
% |
| 149 |
%\changes{1.0}{2015-04-01}{Initial release} |
| 150 |
%\iffalse |
| 151 |
% \begin{macrocode} |
| 152 |
%<*datetime2-en-fulltext.sty> |
| 153 |
% \end{macrocode} |
| 154 |
%\fi |
| 155 |
%Identify package |
| 156 |
% \begin{macrocode} |
| 157 |
\NeedsTeXFormat{LaTeX2e} |
| 158 |
\ProvidesPackage{datetime2-en-fulltext}[2015/04/01 v1.0] |
| 159 |
% \end{macrocode} |
| 160 |
% Pass all options to \sty{datetime2}: |
| 161 |
% \begin{macrocode} |
| 162 |
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{datetime2}} |
| 163 |
\ProcessOptions |
| 164 |
% \end{macrocode} |
| 165 |
% Requires \sty{datetime2}: |
| 166 |
% \begin{macrocode} |
| 167 |
\RequirePackage{datetime2} |
| 168 |
% \end{macrocode} |
| 169 |
% Also requries \sty{fmtcount}: |
| 170 |
% \begin{macrocode} |
| 171 |
\RequirePackage{fmtcount} |
| 172 |
% \end{macrocode} |
| 173 |
% If the "english-base" language module hasn't been loaded, load it now. |
| 174 |
% \begin{macrocode} |
| 175 |
\def\CurrentTrackedDialect{english} |
| 176 |
\RequireDateTimeModule{english-base} |
| 177 |
\undef\CurrentTrackedDialect |
| 178 |
% \end{macrocode} |
| 179 |
% Define the "en-fulltext" date style: |
| 180 |
% \begin{macrocode} |
| 181 |
\DTMnewdatestyle{en-fulltext}{% |
| 182 |
\renewcommand*\DTMdisplaydate[4]{% |
| 183 |
\ifDTMshowdow |
| 184 |
\ifnum##4>-1 |
| 185 |
\DTMenglishweekdayname{##4} the\space |
| 186 |
\fi |
| 187 |
\fi |
| 188 |
\protect\ordinalstringnum{##3} of \DTMenglishmonthname{##2}% |
| 189 |
\DTMenfulltextmonthyearsep |
| 190 |
\protect\numberstringnum{##1}% |
| 191 |
}% |
| 192 |
\renewcommand*\DTMDisplaydate[4]{% |
| 193 |
\ifDTMshowdow |
| 194 |
\ifnum##4>-1 |
| 195 |
\DTMenglishweekdayname{##4} the\space |
| 196 |
\else |
| 197 |
\protect\Ordinalstringnum{##3} |
| 198 |
\fi |
| 199 |
\else |
| 200 |
\protect\Ordinalstringnum{##3} |
| 201 |
\fi |
| 202 |
of \DTMenglishmonthname{##2}% |
| 203 |
\DTMenfulltextmonthyearsep |
| 204 |
\protect\numberstringnum{##1}% |
| 205 |
}% |
| 206 |
} |
| 207 |
% \end{macrocode} |
| 208 |
% |
| 209 |
% Define the "en-FullText" date style: |
| 210 |
% \begin{macrocode} |
| 211 |
\DTMnewdatestyle{en-FullText}{% |
| 212 |
\renewcommand*\DTMdisplaydate[4]{% |
| 213 |
\ifDTMshowdow |
| 214 |
\ifnum##4>-1 |
| 215 |
\DTMenglishweekdayname{##4} the\space |
| 216 |
\fi |
| 217 |
\fi |
| 218 |
\protect\Ordinalstringnum{##3} of \DTMenglishmonthname{##2}% |
| 219 |
\DTMenfulltextmonthyearsep |
| 220 |
\protect\Numberstringnum{##1}% |
| 221 |
}% |
| 222 |
\renewcommand*\DTMDisplaydate{\DTMdisplaydate}% |
| 223 |
} |
| 224 |
% \end{macrocode} |
| 225 |
% |
| 226 |
% Define the "en-FULLTEXT" date style: |
| 227 |
% \begin{macrocode} |
| 228 |
\DTMnewdatestyle{en-FULLTEXT}{% |
| 229 |
\renewcommand*\DTMdisplaydate[4]{% |
| 230 |
\ifDTMshowdow |
| 231 |
\ifnum##4>-1 |
| 232 |
\MakeUppercase{\DTMenglishweekdayname{##4}} THE\space |
| 233 |
\fi |
| 234 |
\fi |
| 235 |
\protect\ORDINALstringnum{##3} OF |
| 236 |
\MakeUppercase{\DTMenglishmonthname{##2}% |
| 237 |
\DTMenfulltextmonthyearsep}% |
| 238 |
\protect\NUMBERstringnum{##1}% |
| 239 |
}% |
| 240 |
\renewcommand*\DTMDisplaydate{\DTMdisplaydate}% |
| 241 |
} |
| 242 |
% \end{macrocode} |
| 243 |
% |
| 244 |
%\begin{macro}{\DTMenfulltextmonthyearsep} |
| 245 |
% Separator between month and year. |
| 246 |
% \begin{macrocode} |
| 247 |
\newcommand*\DTMenfulltextmonthyearsep{,\space} |
| 248 |
% \end{macrocode} |
| 249 |
%\end{macro} |
| 250 |
% Set the "en-fulltext" date style: |
| 251 |
% \begin{macrocode} |
| 252 |
\DTMsetdatestyle{en-fulltext} |
| 253 |
% \end{macrocode} |
| 254 |
% |
| 255 |
%Define the "en-fulltext" time style. Seconds are ignored. |
| 256 |
% \begin{macrocode} |
| 257 |
\DTMnewtimestyle{en-fulltext}{% |
| 258 |
\renewcommand*\DTMdisplaytime[3]{% |
| 259 |
\ifboolexpr |
| 260 |
{ test {\ifnumequal{##2}{0}} and |
| 261 |
( |
| 262 |
test {\ifnumequal{##1}{0}} |
| 263 |
or test {\ifnumequal{##1}{12}} |
| 264 |
or test {\ifnumequal{##1}{24}} |
| 265 |
) |
| 266 |
}% |
| 267 |
{% |
| 268 |
% \end{macrocode} |
| 269 |
% Either midnight or midday. |
| 270 |
% \begin{macrocode} |
| 271 |
\ifnum##1=12 |
| 272 |
\DTMenglishnoon |
| 273 |
\else |
| 274 |
\DTMenglishmidnight |
| 275 |
\fi |
| 276 |
}% |
| 277 |
{% |
| 278 |
% \end{macrocode} |
| 279 |
% Neither midnight nor midday. |
| 280 |
% \begin{macrocode} |
| 281 |
\ifnum##2=0 |
| 282 |
% \end{macrocode} |
| 283 |
% On the hour. |
| 284 |
% \begin{macrocode} |
| 285 |
\protect\numberstringnum{##1} \DTMoclockstring |
| 286 |
\else |
| 287 |
% \end{macrocode} |
| 288 |
% Not on the hour. |
| 289 |
% \begin{macrocode} |
| 290 |
\ifnum##2<31 |
| 291 |
% \end{macrocode} |
| 292 |
% Past the hour. |
| 293 |
% \begin{macrocode} |
| 294 |
\ifnum##2=15 |
| 295 |
% \end{macrocode} |
| 296 |
% Quarter past the hour. |
| 297 |
% \begin{macrocode} |
| 298 |
\DTMquarterpaststring\space |
| 299 |
\else |
| 300 |
\ifnum##2=30 |
| 301 |
% \end{macrocode} |
| 302 |
% Half past the hour. |
| 303 |
% \begin{macrocode} |
| 304 |
\DTMhalfpaststring\space |
| 305 |
\else |
| 306 |
\protect\numberstringnum{##2} |
| 307 |
\ifnum##2=1 \DTMminutepaststring\else \DTMminutespaststring\fi |
| 308 |
\space |
| 309 |
\fi |
| 310 |
\fi |
| 311 |
\ifnum##1>12 |
| 312 |
\ifnum##1=24 |
| 313 |
\DTMenglishmidnight |
| 314 |
\else |
| 315 |
\protect\numberstringnum{\numexpr##1-12}% |
| 316 |
\fi |
| 317 |
\else |
| 318 |
\ifnum##1=0 |
| 319 |
\DTMenglishmidnight |
| 320 |
\else |
| 321 |
\protect\numberstringnum{##1}% |
| 322 |
\fi |
| 323 |
\fi |
| 324 |
\else |
| 325 |
% \end{macrocode} |
| 326 |
% To the hour. |
| 327 |
% \begin{macrocode} |
| 328 |
\ifnum##2=45 |
| 329 |
\DTMquartertostring\space |
| 330 |
\else |
| 331 |
\protect\numberstringnum{\numexpr60-##2} |
| 332 |
\ifnum##2=59 \DTMminutetostring\else \DTMminutestostring\fi |
| 333 |
\space |
| 334 |
\fi |
| 335 |
\ifnum##1>12 |
| 336 |
\ifnum##1=24 |
| 337 |
\protect\numberstringnum{1}% |
| 338 |
\else |
| 339 |
\ifnum##1=23 |
| 340 |
\DTMenglishmidnight |
| 341 |
\else |
| 342 |
\protect\numberstringnum{\numexpr##1-11}% |
| 343 |
\fi |
| 344 |
\fi |
| 345 |
\else |
| 346 |
\ifnum##1=12 |
| 347 |
\protect\numberstringnum{1}% |
| 348 |
\else |
| 349 |
\protect\numberstringnum{\numexpr##1+1}% |
| 350 |
\fi |
| 351 |
\fi |
| 352 |
\fi |
| 353 |
\fi |
| 354 |
\ifnum##1>11 |
| 355 |
\ifnum##1=23 |
| 356 |
\ifnum##2<31 |
| 357 |
\space\DTMafternoonstring |
| 358 |
\fi |
| 359 |
\else |
| 360 |
\ifnum##1=24 |
| 361 |
\ifnum##2>30 |
| 362 |
\space\DTMmorningstring |
| 363 |
\fi |
| 364 |
\else |
| 365 |
\space\DTMafternoonstring |
| 366 |
\fi |
| 367 |
\fi |
| 368 |
\else |
| 369 |
\ifnum##1>0 |
| 370 |
\space\DTMmorningstring |
| 371 |
\else |
| 372 |
\ifnum##2>30 |
| 373 |
\space\DTMmorningstring |
| 374 |
\fi |
| 375 |
\fi |
| 376 |
\fi |
| 377 |
}% |
| 378 |
}% |
| 379 |
} |
| 380 |
% \end{macrocode} |
| 381 |
% |
| 382 |
%Define the "en-Fulltext" time style. Seconds are ignored. |
| 383 |
% \begin{macrocode} |
| 384 |
\DTMnewtimestyle{en-Fulltext}{% |
| 385 |
\renewcommand*\DTMdisplaytime[3]{% |
| 386 |
\ifboolexpr |
| 387 |
{ test {\ifnumequal{##2}{0}} and |
| 388 |
( |
| 389 |
test {\ifnumequal{##1}{0}} |
| 390 |
or test {\ifnumequal{##1}{12}} |
| 391 |
or test {\ifnumequal{##1}{24}} |
| 392 |
) |
| 393 |
}% |
| 394 |
{% |
| 395 |
% \end{macrocode} |
| 396 |
% Either midnight or midday. |
| 397 |
% \begin{macrocode} |
| 398 |
\ifnum##1=12 |
| 399 |
\expandafter\MakeUppercase\DTMenglishnoon |
| 400 |
\else |
| 401 |
\expandafter\MakeUppercase\DTMenglishmidnight |
| 402 |
\fi |
| 403 |
}% |
| 404 |
{% |
| 405 |
% \end{macrocode} |
| 406 |
% Neither midnight nor midday. |
| 407 |
% \begin{macrocode} |
| 408 |
\ifnum##2=0 |
| 409 |
% \end{macrocode} |
| 410 |
% On the hour. |
| 411 |
% \begin{macrocode} |
| 412 |
\protect\Numberstringnum{##1} \DTMoclockstring |
| 413 |
\else |
| 414 |
% \end{macrocode} |
| 415 |
% Not on the hour. |
| 416 |
% \begin{macrocode} |
| 417 |
\ifnum##2<31 |
| 418 |
% \end{macrocode} |
| 419 |
% Past the hour. |
| 420 |
% \begin{macrocode} |
| 421 |
\ifnum##2=15 |
| 422 |
% \end{macrocode} |
| 423 |
% Quarter past the hour. |
| 424 |
% \begin{macrocode} |
| 425 |
\expandafter\MakeUppercase\DTMquarterpaststring\space |
| 426 |
\else |
| 427 |
\ifnum##2=30 |
| 428 |
% \end{macrocode} |
| 429 |
% Half past the hour. |
| 430 |
% \begin{macrocode} |
| 431 |
\expandafter\MakeUppercase\DTMhalfpaststring\space |
| 432 |
\else |
| 433 |
\protect\Numberstringnum{##2} |
| 434 |
\ifnum##2=1 \DTMminutepaststring\else \DTMminutespaststring\fi |
| 435 |
\space |
| 436 |
\fi |
| 437 |
\fi |
| 438 |
\ifnum##1>12 |
| 439 |
\ifnum##1=24 |
| 440 |
\DTMenglishmidnight |
| 441 |
\else |
| 442 |
\protect\numberstringnum{\numexpr##1-12}% |
| 443 |
\fi |
| 444 |
\else |
| 445 |
\ifnum##1=0 |
| 446 |
\DTMenglishmidnight |
| 447 |
\else |
| 448 |
\protect\numberstringnum{##1}% |
| 449 |
\fi |
| 450 |
\fi |
| 451 |
\else |
| 452 |
% \end{macrocode} |
| 453 |
% To the hour. |
| 454 |
% \begin{macrocode} |
| 455 |
\ifnum##2=45 |
| 456 |
\expandafter\MakeUppercase\DTMquartertostring\space |
| 457 |
\else |
| 458 |
\protect\Numberstringnum{\numexpr60-##2} |
| 459 |
\ifnum##2=59 \DTMminutetostring\else \DTMminutestostring\fi |
| 460 |
\space |
| 461 |
\fi |
| 462 |
\ifnum##1>12 |
| 463 |
\ifnum##1=24 |
| 464 |
\protect\numberstringnum{1}% |
| 465 |
\else |
| 466 |
\ifnum##1=23 |
| 467 |
\DTMenglishmidnight |
| 468 |
\else |
| 469 |
\protect\numberstringnum{\numexpr##1-11}% |
| 470 |
\fi |
| 471 |
\fi |
| 472 |
\else |
| 473 |
\ifnum##1=12 |
| 474 |
\protect\numberstringnum{1}% |
| 475 |
\else |
| 476 |
\protect\numberstringnum{\numexpr##1+1}% |
| 477 |
\fi |
| 478 |
\fi |
| 479 |
\fi |
| 480 |
\fi |
| 481 |
\ifnum##1>11 |
| 482 |
\ifnum##1=23 |
| 483 |
\ifnum##2<31 |
| 484 |
\space\DTMafternoonstring |
| 485 |
\fi |
| 486 |
\else |
| 487 |
\ifnum##1=24 |
| 488 |
\ifnum##2>30 |
| 489 |
\space\DTMmorningstring |
| 490 |
\fi |
| 491 |
\else |
| 492 |
\space\DTMafternoonstring |
| 493 |
\fi |
| 494 |
\fi |
| 495 |
\else |
| 496 |
\ifnum##1>0 |
| 497 |
\space\DTMmorningstring |
| 498 |
\else |
| 499 |
\ifnum##2>30 |
| 500 |
\space\DTMmorningstring |
| 501 |
\fi |
| 502 |
\fi |
| 503 |
\fi |
| 504 |
}% |
| 505 |
}% |
| 506 |
} |
| 507 |
% \end{macrocode} |
| 508 |
% |
| 509 |
%Define the "en-FULLTEXT" time style. Seconds are ignored. |
| 510 |
% \begin{macrocode} |
| 511 |
\DTMnewtimestyle{en-FULLTEXT}{% |
| 512 |
\renewcommand*\DTMdisplaytime[3]{% |
| 513 |
\ifboolexpr |
| 514 |
{ test {\ifnumequal{##2}{0}} and |
| 515 |
( |
| 516 |
test {\ifnumequal{##1}{0}} |
| 517 |
or test {\ifnumequal{##1}{12}} |
| 518 |
or test {\ifnumequal{##1}{24}} |
| 519 |
) |
| 520 |
}% |
| 521 |
{% |
| 522 |
% \end{macrocode} |
| 523 |
% Either midnight or midday. |
| 524 |
% \begin{macrocode} |
| 525 |
\ifnum##1=12 |
| 526 |
\MakeUppercase\DTMenglishnoon |
| 527 |
\else |
| 528 |
\MakeUppercase\DTMenglishmidnight |
| 529 |
\fi |
| 530 |
}% |
| 531 |
{% |
| 532 |
% \end{macrocode} |
| 533 |
% Neither midnight nor midday. |
| 534 |
% \begin{macrocode} |
| 535 |
\ifnum##2=0 |
| 536 |
% \end{macrocode} |
| 537 |
% On the hour. |
| 538 |
% \begin{macrocode} |
| 539 |
\protect\NUMBERstringnum{##1} \MakeUppercase\DTMoclockstring |
| 540 |
\else |
| 541 |
% \end{macrocode} |
| 542 |
% Not on the hour. |
| 543 |
% \begin{macrocode} |
| 544 |
\ifnum##2<31 |
| 545 |
% \end{macrocode} |
| 546 |
% Past the hour. |
| 547 |
% \begin{macrocode} |
| 548 |
\ifnum##2=15 |
| 549 |
% \end{macrocode} |
| 550 |
% Quarter past the hour. |
| 551 |
% \begin{macrocode} |
| 552 |
\MakeUppercase\DTMquarterpaststring\space |
| 553 |
\else |
| 554 |
\ifnum##2=30 |
| 555 |
% \end{macrocode} |
| 556 |
% Half past the hour. |
| 557 |
% \begin{macrocode} |
| 558 |
\MakeUppercase\DTMhalfpaststring\space |
| 559 |
\else |
| 560 |
\protect\NUMBERstringnum{##2} |
| 561 |
\MakeUppercase |
| 562 |
{% |
| 563 |
\ifnum##2=1 \DTMminutepaststring\else \DTMminutespaststring\fi |
| 564 |
}% |
| 565 |
\space |
| 566 |
\fi |
| 567 |
\fi |
| 568 |
\ifnum##1>12 |
| 569 |
\ifnum##1=24 |
| 570 |
\MakeUppercase\DTMenglishmidnight |
| 571 |
\else |
| 572 |
\protect\NUMBERstringnum{\numexpr##1-12}% |
| 573 |
\fi |
| 574 |
\else |
| 575 |
\ifnum##1=0 |
| 576 |
\MakeUppercase\DTMenglishmidnight |
| 577 |
\else |
| 578 |
\protect\NUMBERstringnum{##1}% |
| 579 |
\fi |
| 580 |
\fi |
| 581 |
\else |
| 582 |
% \end{macrocode} |
| 583 |
% To the hour. |
| 584 |
% \begin{macrocode} |
| 585 |
\ifnum##2=45 |
| 586 |
\MakeUppercase\DTMquartertostring\space |
| 587 |
\else |
| 588 |
\protect\NUMBERstringnum{\numexpr60-##2} |
| 589 |
\MakeUppercase |
| 590 |
{% |
| 591 |
\ifnum##2=59 \DTMminutetostring\else \DTMminutestostring\fi |
| 592 |
}% |
| 593 |
\space |
| 594 |
\fi |
| 595 |
\ifnum##1>12 |
| 596 |
\ifnum##1=24 |
| 597 |
\protect\NUMBERstringnum{1}% |
| 598 |
\else |
| 599 |
\ifnum##1=23 |
| 600 |
\MakeUppercase\DTMenglishmidnight |
| 601 |
\else |
| 602 |
\protect\NUMBERstringnum{\numexpr##1-11}% |
| 603 |
\fi |
| 604 |
\fi |
| 605 |
\else |
| 606 |
\ifnum##1=12 |
| 607 |
\protect\NUMBERstringnum{1}% |
| 608 |
\else |
| 609 |
\protect\NUMBERstringnum{\numexpr##1+1}% |
| 610 |
\fi |
| 611 |
\fi |
| 612 |
\fi |
| 613 |
\fi |
| 614 |
\ifnum##1>11 |
| 615 |
\ifnum##1=23 |
| 616 |
\ifnum##2<31 |
| 617 |
\space\MakeUppercase\DTMafternoonstring |
| 618 |
\fi |
| 619 |
\else |
| 620 |
\ifnum##1=24 |
| 621 |
\ifnum##2>30 |
| 622 |
\space\MakeUppercase\DTMmorningstring |
| 623 |
\fi |
| 624 |
\else |
| 625 |
\space\MakeUppercase\DTMafternoonstring |
| 626 |
\fi |
| 627 |
\fi |
| 628 |
\else |
| 629 |
\ifnum##1>0 |
| 630 |
\space\MakeUppercase\DTMmorningstring |
| 631 |
\else |
| 632 |
\ifnum##2>30 |
| 633 |
\space\MakeUppercase\DTMmorningstring |
| 634 |
\fi |
| 635 |
\fi |
| 636 |
\fi |
| 637 |
}% |
| 638 |
}% |
| 639 |
} |
| 640 |
% \end{macrocode} |
| 641 |
% |
| 642 |
%Define the "en-FullText" time style. Seconds are ignored. |
| 643 |
% \begin{macrocode} |
| 644 |
\DTMnewtimestyle{en-FullText}{% |
| 645 |
\renewcommand*\DTMdisplaytime[3]{% |
| 646 |
\ifboolexpr |
| 647 |
{ test {\ifnumequal{##2}{0}} and |
| 648 |
( |
| 649 |
test {\ifnumequal{##1}{0}} |
| 650 |
or test {\ifnumequal{##1}{12}} |
| 651 |
or test {\ifnumequal{##1}{24}} |
| 652 |
) |
| 653 |
}% |
| 654 |
{% |
| 655 |
% \end{macrocode} |
| 656 |
% Either midnight or midday. |
| 657 |
% \begin{macrocode} |
| 658 |
\ifnum##1=12 |
| 659 |
\expandafter\MakeUppercase\DTMenglishnoon |
| 660 |
\else |
| 661 |
\expandafter\MakeUppercase\DTMenglishmidnight |
| 662 |
\fi |
| 663 |
}% |
| 664 |
{% |
| 665 |
% \end{macrocode} |
| 666 |
% Neither midnight nor midday. |
| 667 |
% \begin{macrocode} |
| 668 |
\ifnum##2=0 |
| 669 |
% \end{macrocode} |
| 670 |
% On the hour. |
| 671 |
% \begin{macrocode} |
| 672 |
\protect\Numberstringnum{##1} \DTMOClockstring |
| 673 |
\else |
| 674 |
% \end{macrocode} |
| 675 |
% Not on the hour. |
| 676 |
% \begin{macrocode} |
| 677 |
\ifnum##2<31 |
| 678 |
% \end{macrocode} |
| 679 |
% Past the hour. |
| 680 |
% \begin{macrocode} |
| 681 |
\ifnum##2=15 |
| 682 |
% \end{macrocode} |
| 683 |
% Quarter past the hour. |
| 684 |
% \begin{macrocode} |
| 685 |
\DTMQuarterPaststring\space |
| 686 |
\else |
| 687 |
\ifnum##2=30 |
| 688 |
% \end{macrocode} |
| 689 |
% Half past the hour. |
| 690 |
% \begin{macrocode} |
| 691 |
\DTMHalfPaststring\space |
| 692 |
\else |
| 693 |
\protect\Numberstringnum{##2} |
| 694 |
\ifnum##2=1 \DTMMinutePaststring\else \DTMMinutesPaststring\fi |
| 695 |
\space |
| 696 |
\fi |
| 697 |
\fi |
| 698 |
\ifnum##1>12 |
| 699 |
\ifnum##1=24 |
| 700 |
\expandafter\MakeUppercase\DTMenglishmidnight |
| 701 |
\else |
| 702 |
\protect\Numberstringnum{\numexpr##1-12}% |
| 703 |
\fi |
| 704 |
\else |
| 705 |
\ifnum##1=0 |
| 706 |
\expandafter\MakeUppercase\DTMenglishmidnight |
| 707 |
\else |
| 708 |
\protect\Numberstringnum{##1}% |
| 709 |
\fi |
| 710 |
\fi |
| 711 |
\else |
| 712 |
% \end{macrocode} |
| 713 |
% To the hour. |
| 714 |
% \begin{macrocode} |
| 715 |
\ifnum##2=45 |
| 716 |
\DTMQuarterTostring\space |
| 717 |
\else |
| 718 |
\protect\Numberstringnum{\numexpr60-##2} |
| 719 |
\ifnum##2=59 \DTMMinuteTostring\else \DTMMinutesTostring\fi |
| 720 |
\space |
| 721 |
\fi |
| 722 |
\ifnum##1>12 |
| 723 |
\ifnum##1=24 |
| 724 |
\protect\Numberstringnum{1}% |
| 725 |
\else |
| 726 |
\ifnum##1=23 |
| 727 |
\expandafter\MakeUppercase\DTMenglishmidnight |
| 728 |
\else |
| 729 |
\protect\Numberstringnum{\numexpr##1-11}% |
| 730 |
\fi |
| 731 |
\fi |
| 732 |
\else |
| 733 |
\ifnum##1=12 |
| 734 |
\protect\Numberstringnum{1}% |
| 735 |
\else |
| 736 |
\protect\Numberstringnum{\numexpr##1+1}% |
| 737 |
\fi |
| 738 |
\fi |
| 739 |
\fi |
| 740 |
\fi |
| 741 |
\ifnum##1>11 |
| 742 |
\ifnum##1=23 |
| 743 |
\ifnum##2<31 |
| 744 |
\space\DTMAfterNoonstring |
| 745 |
\fi |
| 746 |
\else |
| 747 |
\ifnum##1=24 |
| 748 |
\ifnum##2>30 |
| 749 |
\space\DTMMorningstring |
| 750 |
\fi |
| 751 |
\else |
| 752 |
\space\DTMAfterNoonstring |
| 753 |
\fi |
| 754 |
\fi |
| 755 |
\else |
| 756 |
\ifnum##1>0 |
| 757 |
\space\DTMMorningstring |
| 758 |
\else |
| 759 |
\ifnum##2>30 |
| 760 |
\space\DTMMorningstring |
| 761 |
\fi |
| 762 |
\fi |
| 763 |
\fi |
| 764 |
}% |
| 765 |
}% |
| 766 |
} |
| 767 |
% \end{macrocode} |
| 768 |
% |
| 769 |
%\begin{macro}{\DTMoclockstring} |
| 770 |
% \begin{macrocode} |
| 771 |
\newcommand*{\DTMoclockstring}{o'clock} |
| 772 |
% \end{macrocode} |
| 773 |
%\end{macro} |
| 774 |
% |
| 775 |
%\begin{macro}{\DTMOClockstring} |
| 776 |
% \begin{macrocode} |
| 777 |
\newcommand*{\DTMOClockstring}{O'Clock} |
| 778 |
% \end{macrocode} |
| 779 |
%\end{macro} |
| 780 |
% |
| 781 |
%\begin{macro}{\DTMquarterpaststring} |
| 782 |
% \begin{macrocode} |
| 783 |
\newcommand*{\DTMquarterpaststring}{quarter past} |
| 784 |
% \end{macrocode} |
| 785 |
%\end{macro} |
| 786 |
% |
| 787 |
%\begin{macro}{\DTMQuarterPaststring} |
| 788 |
% \begin{macrocode} |
| 789 |
\newcommand*{\DTMQuarterPaststring}{Quarter Past} |
| 790 |
% \end{macrocode} |
| 791 |
%\end{macro} |
| 792 |
% |
| 793 |
%\begin{macro}{\DTMminutepaststring} |
| 794 |
% \begin{macrocode} |
| 795 |
\newcommand*{\DTMminutepaststring}{minute past} |
| 796 |
% \end{macrocode} |
| 797 |
%\end{macro} |
| 798 |
% |
| 799 |
%\begin{macro}{\DTMminutespaststring} |
| 800 |
% \begin{macrocode} |
| 801 |
\newcommand*{\DTMminutespaststring}{minutes past} |
| 802 |
% \end{macrocode} |
| 803 |
%\end{macro} |
| 804 |
% |
| 805 |
%\begin{macro}{\DTMMinutePaststring} |
| 806 |
% \begin{macrocode} |
| 807 |
\newcommand*{\DTMMinutePaststring}{Minute Past} |
| 808 |
% \end{macrocode} |
| 809 |
%\end{macro} |
| 810 |
% |
| 811 |
%\begin{macro}{\DTMMinutesPaststring} |
| 812 |
% \begin{macrocode} |
| 813 |
\newcommand*{\DTMMinutesPaststring}{Minutes Past} |
| 814 |
% \end{macrocode} |
| 815 |
%\end{macro} |
| 816 |
% |
| 817 |
%\begin{macro}{\DTMhalfpaststring} |
| 818 |
% \begin{macrocode} |
| 819 |
\newcommand*{\DTMhalfpaststring}{half past} |
| 820 |
% \end{macrocode} |
| 821 |
%\end{macro} |
| 822 |
% |
| 823 |
%\begin{macro}{\DTMHalfPaststring} |
| 824 |
% \begin{macrocode} |
| 825 |
\newcommand*{\DTMHalfPaststring}{Half Past} |
| 826 |
% \end{macrocode} |
| 827 |
%\end{macro} |
| 828 |
% |
| 829 |
%\begin{macro}{\DTMquartertostring} |
| 830 |
% \begin{macrocode} |
| 831 |
\newcommand*{\DTMquartertostring}{quarter to} |
| 832 |
% \end{macrocode} |
| 833 |
%\end{macro} |
| 834 |
% |
| 835 |
%\begin{macro}{\DTMQuarterTostring} |
| 836 |
% \begin{macrocode} |
| 837 |
\newcommand*{\DTMQuarterTostring}{Quarter to} |
| 838 |
% \end{macrocode} |
| 839 |
%\end{macro} |
| 840 |
% |
| 841 |
%\begin{macro}{\DTMminutetostring} |
| 842 |
% \begin{macrocode} |
| 843 |
\newcommand*{\DTMminutetostring}{minute to} |
| 844 |
% \end{macrocode} |
| 845 |
%\end{macro} |
| 846 |
% |
| 847 |
%\begin{macro}{\DTMMinuteTostring} |
| 848 |
% \begin{macrocode} |
| 849 |
\newcommand*{\DTMMinuteTostring}{Minute to} |
| 850 |
% \end{macrocode} |
| 851 |
%\end{macro} |
| 852 |
% |
| 853 |
%\begin{macro}{\DTMminutestostring} |
| 854 |
% \begin{macrocode} |
| 855 |
\newcommand*{\DTMminutestostring}{minutes to} |
| 856 |
% \end{macrocode} |
| 857 |
%\end{macro} |
| 858 |
% |
| 859 |
%\begin{macro}{\DTMMinutesTostring} |
| 860 |
% \begin{macrocode} |
| 861 |
\newcommand*{\DTMMinutesTostring}{Minutes to} |
| 862 |
% \end{macrocode} |
| 863 |
%\end{macro} |
| 864 |
% |
| 865 |
%\begin{macro}{\DTMmorningstring} |
| 866 |
% \begin{macrocode} |
| 867 |
\newcommand*{\DTMmorningstring}{in the morning} |
| 868 |
% \end{macrocode} |
| 869 |
%\end{macro} |
| 870 |
% |
| 871 |
%\begin{macro}{\DTMMorningstring} |
| 872 |
% \begin{macrocode} |
| 873 |
\newcommand*{\DTMMorningstring}{in the Morning} |
| 874 |
% \end{macrocode} |
| 875 |
%\end{macro} |
| 876 |
% |
| 877 |
%\begin{macro}{\DTMafternoonstring} |
| 878 |
% \begin{macrocode} |
| 879 |
\newcommand*{\DTMafternoonstring}{in the afternoon} |
| 880 |
% \end{macrocode} |
| 881 |
%\end{macro} |
| 882 |
% |
| 883 |
%\begin{macro}{\DTMAfterNoonstring} |
| 884 |
% \begin{macrocode} |
| 885 |
\newcommand*{\DTMAfterNoonstring}{in the Afternoon} |
| 886 |
% \end{macrocode} |
| 887 |
%\end{macro} |
| 888 |
% |
| 889 |
% |
| 890 |
%Set the "en-fulltext" time style: |
| 891 |
% \begin{macrocode} |
| 892 |
\DTMsettimestyle{en-fulltext} |
| 893 |
% \end{macrocode} |
| 894 |
% |
| 895 |
%\iffalse |
| 896 |
% \begin{macrocode} |
| 897 |
%</datetime2-en-fulltext.sty> |
| 898 |
% \end{macrocode} |
| 899 |
%\fi |
| 900 |
%\Finale |
| 901 |
\endinput |