Debian Codegraph @

texmf-dist/source/latex/datetime2-english/datetime2-english.dtx

raw
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-2019 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[colorlinks,
33 bookmarks,
34 hyperindex=false,
35 pdfauthor={Nicola L.C. Talbot},
36 pdftitle={datetime2.sty English Module}]{hyperref}
37
38
39 \CheckSum{2727}
40
41 \renewcommand*{\usage}[1]{\hyperpage{#1}}
42 \renewcommand*{\main}[1]{\hyperpage{#1}}
43 \IndexPrologue{\section*{\indexname}\markboth{\indexname}{\indexname}}
44 \setcounter{IndexColumns}{2}
45
46 \newcommand*{\sty}[1]{\textsf{#1}}
47 \newcommand*{\opt}[1]{\texttt{#1}\index{#1=\texttt{#1}|main}}
48 \newcommand*{\utc}[2]{\textsc{utc}\ifnum#1<0 $-$\number-#1\else $+$\number#1\fi
49 \ifnum#2>0 :\number#2 \fi\relax}
50
51 \RecordChanges
52 \PageIndex
53 \CodelineNumbered
54
55 \begin{document}
56 \DocInput{datetime2-english.dtx}
57 \end{document}
58 %</driver>
59 %\fi
60 %
61 %\MakeShortVerb{"}
62 %
63 %\title{English Module for datetime2 Package}
64 %\author{Nicola L. C. Talbot}
65 %\date{2019-10-21 (v1.05)}
66 %\maketitle
67 %
68 %\begin{abstract}
69 %This is the English language module for the \sty{datetime2}
70 %package. If you want to use the settings in this module you must
71 %install it in addition to installing \sty{datetime2}. If you use
72 %\sty{babel} or \sty{polyglossia}, you will need this module to
73 %prevent them from redefining \cs{today}. The \sty{datetime2}
74 % \opt{useregional} setting must be on (\texttt{text} or
75 % \texttt{numeric}) for the language styles to be set.
76 % Alternatively, you can set them in the document using
77 % \cs{DTMsetstyle}, but without the \opt{useregional} setting on the
78 % style will be changed by \cs{date}\meta{language}.
79 %\end{abstract}
80 %
81 %\tableofcontents
82 %\clearpage
83 %
84 %\section{Introduction}
85 %\label{sec:intro}
86 % This bundle provides the English modules for \sty{datetime2}.
87 % The basic "english" module is used when "english" has been
88 % detected as one of the document's language settings but no
89 % regional variant has been detected. Note that the \sty{tracklang}
90 % package can't detect the variant passed to \sty{polyglossia} unless it's been
91 % passed as a document class option or passed to \sty{tracklang}.
92 % See the \sty{tracklang} documentation for further details.
93 %
94 % Here are some examples for British English with
95 % \sty{polyglossia}:
96 %
97 %\begin{enumerate}
98 %\item Pass "british" in the document class option list:
99 %\begin{verbatim}
100 %\documentclass[british]{article}
101 %
102 %\usepackage{fontspec}
103 %\usepackage{polyglossia}
104 %\setmainlanguage[variant=uk]{english}
105 %\usepackage{datetime2}
106 %\end{verbatim}
107 %(You need to set the \opt{useregional} option to either
108 %\texttt{text} or \texttt{numeric} to enable the "en-GB" or
109 %"en-GB-numeric" styles.)
110 %
111 %\item Pass "en-GB" in the document class option list:
112 %\begin{verbatim}
113 %\documentclass[en-GB]{article}
114 %
115 %\usepackage{fontspec}
116 %\usepackage{polyglossia}
117 %\setdefaultlanguage[variant=uk]{english}
118 %
119 %\usepackage{datetime2}
120 %\end{verbatim}
121 %(You need to set the \opt{useregional} option to either
122 %\texttt{text} or \texttt{numeric} to enable the "en-GB" or
123 %"en-GB-numeric" styles.)
124 %
125 %\item Pass "en-GB" to \sty{datetime2}:
126 %\begin{verbatim}
127 %\documentclass{article}
128 %
129 %\usepackage{fontspec}
130 %\usepackage{polyglossia}
131 %\setdefaultlanguage[variant=uk]{english}
132 %
133 %\usepackage[en-GB]{datetime2}
134 %\end{verbatim}
135 % In this last example, the style is automatically switched to
136 % "en-GB".
137 %\end{enumerate}
138 %
139 %Note that if you pass the language setting through the
140 %\sty{datetime2} package option list (as in the above example)
141 %this will also set the \opt{useregional} option to \texttt{text}.
142 %
143 %If you're not using \sty{babel} or \sty{polyglossia} but still
144 % want to use the English modules, you can similarly use the language or
145 % regional setting in the document class or \sty{datetime2} package
146 % options. Note that since \sty{datetime2} loads \sty{tracklang},
147 % this setting will be remembered by any subsequently loaded
148 % packages that use \sty{tracklang} to determine the document
149 % language settings.
150 %
151 % For example, to use the "en-GB" date style without loading
152 % \sty{babel} or \sty{polyglossia}:
153 %\begin{verbatim}
154 %\documentclass{article}
155 %\usepackage[en-GB]{datetime2}
156 %\begin{document}
157 %\today
158 %\end{document}
159 %\end{verbatim}
160 %
161 % If you want to change the settings for a particular module, you
162 % must use the module's name (such as "en-GB") rather than a
163 % \sty{babel} or \sty{polyglossia} synonym (such as "british" or "uk").
164 % For example:
165 %\begin{verbatim}
166 %\DTMlangsetup[en-GB]{ord=raise}
167 %\end{verbatim}
168 %
169 %\section{Base module}
170 %\label{sec:base}
171 %The "english-base" module is loaded by all the English modules. It
172 %provides the commands that produce text, such as the month names.
173 %It also provides a 12 hour time style called \texttt{englishampm}.
174 %
175 %\section{English (no region)}
176 %\label{sec:english}
177 % The default "english" module is used when English has been set as
178 % one of the document languages, but no regional variant has been
179 % detected or there is no support for the given region.
180 %
181 % This basic module provides the date-time style "english" which
182 % uses the same style as \LaTeX's default \cs{today}. (That is, the
183 % middle-endian date style.) This style ignores most of the settings, including
184 % \opt{showdow} and the date separators. The time style uses the
185 % "englishampm" style defined in the base module which uses the
186 % package-wide \opt{hourminsep} setting. The zone style is the
187 % same as that provided by the "default" style. (That is, numerical
188 % ISO or just ``Z''.) The full date, time and zone style (used by \cs{DTMdisplay})
189 % have spaces between each block. The \opt{showdate}, \opt{showzone}, \opt{showseconds},
190 % \opt{showzoneminutes} and \opt{showisoZ} \sty{datetime2} settings are honoured.
191 %
192 %This module checks for the existence of \cs{dateenglish} or
193 %\cs{date}\meta{dialect} (in the case of an unknown English
194 %variant that doesn't match any of the supplied English dialect modules).
195 %If it exists, the command will be redefined so that it
196 %sets the date, time and zone styles to "english" if the
197 %\opt{useregional} setting is set to \texttt{text}. If the setting
198 %is \texttt{numeric} the "default" numeric style will be used as the
199 %lack of region makes it ambiguous.
200 %
201 %\section{English (GB)}
202 %\label{sec:en-GB}
203 %
204 %The "en-GB" module is loaded if British English has been specified.
205 %This may be specified through options such as "british", "en-GB" or
206 %"UKenglish". (See the note on \sty{polyglossia} in \S\ref{sec:intro}.)
207 %
208 % This module defines the text style "en-GB" and the
209 % numeric style "en-GB-numeric" style. The "en-GB" style will
210 % automatically be set if the \opt{useregional} option is
211 % set to \texttt{text}. The "en-GB-numeric" style will automatically
212 % be set if the \opt{useregional} option is set to \texttt{numeric}.
213 %
214 % The "en-GB" time style uses the base "englishampm" style.
215 %
216 % There are a number of settings provided that can be used in
217 % \cs{DTMlangsetup} to modify the date-time style. These are:
218 %
219 %\begin{description}
220 %\item[\opt{dowdaysep}] The separator between the day of week name and the
221 %day of month number. This defaults to \cs{space}. Ignored if the
222 %\opt{showdow} option is \opt{false}.
223 %
224 %\item[\opt{daymonthsep}] The separator between the day and the month
225 %name in the \texttt{en-GB} style. This defaults to \cs{space}.
226 %
227 %\item[\opt{monthyearsep}] The separator between the month name and year
228 % in the \texttt{en-GB} style. This defaults to \cs{space}.
229 %
230 %\item[\opt{datesep}] The separator between the date numbers in the
231 %"en-GB-numeric" style. This defaults to "/" (slash).
232 %
233 %\item[\opt{timesep}] The separator between the hours and minutes in the
234 %"en-GB-numeric" style. This defaults to ":" (colon).
235 %
236 %\item[\opt{datetimesep}] The separator between the date and time for the
237 %full date-time format (as used by \cs{DTMdisplay}) for both the
238 %"en-GB" and "en-GB-numeric" styles. This defaults
239 %to \cs{space}.
240 %
241 %\item[\opt{timezonesep}] The separator between the time and zone for the
242 %full date-time format (as used by \cs{DTMdisplay}) for both the
243 %"en-GB" and "en-GB-numeric" styles. This defaults
244 %to \cs{space}.
245 %
246 %\item[\opt{abbr}] This is a~boolean key. If "true", the month (and week
247 %day name if shown) is abbreviated for the "en-GB" style. The default is "false".
248 %
249 %\item[\opt{mapzone}] This is a~boolean key. If "true" the time zone
250 %mappings are applied. (The default is \texttt{true}.) The "en-GB"
251 % and "en-GB-numeric" styles set the mappings GMT
252 %(\utc{00}{00}) and BST (\utc{01}{00}).
253 %Other time zone mappings that have previously been set
254 %(for example, by another regional style) will remain unchanged
255 %unless you redefine \cs{DTMresetzones} to reset or unset them.
256 %
257 %\item[\opt{ord}] This may take one of the following values: "level"
258 %(ordinal suffix level with the number), "raise" (ordinal suffix as
259 %a superscript\footnote{Just in case you plan to send me an irate
260 %email on this issue, the superscript is a regional handwriting
261 %style not an invention of word processors although they have
262 %adopted the style. I was using this style in school in the 1970s
263 %before I'd ever heard of a word processor so please don't tell me
264 %I've picked up the habit from Word. I'm not a time-traveller, nor
265 %were my primary school teachers\,---\,that I know of! If, conversely,
266 %you want to know why the default is \texttt{level} rather than
267 %\texttt{raise}, it's because the main purpose of the
268 %\sty{datetime2} package is to provide an \emph{expandable} text
269 %format and \cs{textsuperscript} isn't expandable.}),
270 % "omit" (omit the ordinal suffix) and "sc" (small
271 %caps ordinal suffix). If you want a different style you can
272 %redefine \cs{DTMenGBfmtordsuffix} which takes one argument (the
273 %suffix). Take care if \cs{DTMenGBfmtordsuffix} contains fragile
274 %commands, as they will need to be protected against expansion.
275 %
276 %\item[\opt{showdayofmonth}] A boolean key that determines whether
277 %or not to show the day of the month. The default value is "true".
278 %If "false" the day-month separator is also omitted.
279 %
280 %\item[\opt{showyear}] A boolean key that determines whether
281 %or not to show the year. The default value is "true". If "false"
282 %the month-year separator is also omitted.
283 %\end{description}
284 %
285 %The above settings are specific to this module. In addition, the
286 %\opt{showdow} boolean option provided by the \sty{datetime2} package is
287 %also checked to determine whether or not to show the day of the
288 %week in the "en-GB" style.
289 %
290 %The time zone checks the \opt{mapzone}
291 %setting (described above). If it's set, then
292 %\cs{DTMusezonemapordefault} is used otherwise a numeric
293 %\meta{TZH}\meta{sep}\meta{TZM} is displayed. (The minute part will be
294 %omitted if the \sty{datetime2} package option \opt{showzoneminutes} is
295 %set to "false". The zone style ignores the \opt{showisoZ} option.
296 %
297 %
298 %\section{English (US)}
299 %\label{sec:en-US}
300 %
301 %The "en-US" module is loaded if US English has been specified. This
302 %may be done through options such as "american", "en-US" or
303 %"USenglish". (See the note on \sty{polyglossia} in \S\ref{sec:intro}.)
304 %
305 %This module defines the styles "en-US" and
306 %"en-US-numeric". There a number of settings that can be used in
307 % \cs{DTMlangsetup} to modify these styles. They are:
308 %\begin{description}
309 %\item[\opt{monthdaysep}] The separator between the month name and
310 %the day in the "en-US" style. The default is \cs{space}
311 %
312 %\item[\opt{dayyearsep}] The separator between the day and the year
313 %in the "en-US" style. The default is ",\space"
314 %
315 %\item[\opt{dowmonthsep}] The separator between the day-of-week
316 %name and the month name in the "en-US" style. The default is
317 %\cs{space}. This is new to version 1.02, which now supports the
318 %\opt{showdow} package option.
319 %
320 %\item[\opt{datesep}] The separator between the date numbers in the
321 %"en-US-numeric" format.
322 %
323 %\item[\opt{timesep}] The separator between the hour and minutes in the
324 %"en-US-numeric" format.
325 %
326 %\item[\opt{datetimesep}] The separator between the date and the
327 %time for the full style used by \cs{DTMdisplay} for the "en-US"
328 %and "en-US-numeric". The default is \cs{space}
329 %
330 %\item[\opt{timezonesep}] The separator between the times and
331 %zone for the full style used by \cs{DTMdisplay}. The default is
332 %\cs{space}
333 %
334 %\item[\opt{abbr}] This is a~boolean key. If "true", the month
335 %is abbreviated. The default is "false".
336 %
337 %\item[\opt{ord}] The same as the "en-GB" style except that the default
338 %value is "omit".
339 %
340 %\item[\opt{showdayofmonth}] A boolean key that determines whether
341 %or not to show the day of the month. The default value is "true".
342 %If "false" the day-year separator is also omitted.
343 %
344 %\item[\opt{showyear}] A boolean key that determines whether
345 %or not to show the year. The default value is "true". If "false"
346 %the day-year separator is also omitted if the day of the month is
347 %shown otherwise both the day-year and month-day separators are omitted.
348 %
349 %\item[\opt{mapzone}] This is a~boolean key. If "true" the time zone
350 %mappings are applied. (The default is \texttt{false}.) The "en-US" style sets the mappings ADT
351 %(\utc{-03}{00}), AST (\utc{-04}{00}), EST (\utc{-05}{00}), CST
352 %(\utc{-06}{00}),
353 %MST (\utc{-07}{00}) and PST (\utc{-08}{00}). If your want to use different
354 %mappings, you can redefine \cs{DTMenUSzonemaps}.
355 %Other time zone mappings that have previously been set
356 %(for example, by another regional style) will remain unchanged
357 %unless you redefine \cs{DTMresetzones} to reset or unset them.
358 %
359 %\item[\opt{zone}] (new to v1.03) As mentioned above, if the \opt{mapzone}
360 % option is set, the time zone mappings are set using \cs{DTMenUSzonemaps}.
361 % This option can be used to both append to \cs{DTMenUSzonemaps} and
362 % set the new mappings. The \opt{zone} option may take one of the
363 % following values:
364 % \begin{itemize}
365 % \item \opt{std} or \opt{standard}: set the standard time zone
366 % mappings AST (\utc{-4}{00}), EST (\utc{-5}{00}), CST (\utc{-6}{00}), MST
367 % (\utc{-7}{00}), PST (\utc{-8}{00}), AKST (\utc{-9}{00}), HAST (\utc{-10}{00}), SST
368 % (\utc{-10}{00}), ChST (\utc{10}{00}).
369 % \item \opt{dst} or \opt{daylight}: set the daylight savings time
370 % zone mappings ADT (\utc{-3}{00}), EDT (\utc{-4}{00}), CDT (\utc{-6}{00}), MDT
371 % (\utc{-6}{00}), PDT (\utc{-7}{00}), AKDT (\utc{-8}{00}), HADT (\utc{-9}{00}).
372 % \item \opt{atlantic}: set the Atlantic standard and daylight
373 % saving mappings AST (\utc{-4}{00}) and ADT (\utc{-3}{00}).
374 % \item \opt{eastern}: set the Eastern standard and daylight
375 % saving mappings EST (\utc{-5}{00}) and EDT (\utc{-4}{00}).
376 % \item \opt{central}: set the Central standard and daylight
377 % saving mappings CST (\utc{-6}{00}) and CDT (\utc{-5}{00}).
378 % \item \opt{mountain}: set the Mountain standard and daylight
379 % saving mappings MST (\utc{-7}{00}) and MDT (\utc{-6}{00}).
380 % \item \opt{pacific}: set the Pacific standard and daylight
381 % saving mappings PST (\utc{-8}{00}) and PDT (\utc{-7}{00}).
382 % \item \opt{alaska}: set the Alaska standard and daylight
383 % saving mappings AKST (\utc{-9}{00}) and AKDT (\utc{-8}{00}).
384 % \item \opt{hawaii-aleutian} or \opt{hawaii} or \opt{aleutian}:
385 % set the Hawaii-Aleutian standard and daylight
386 % saving mappings HAST (\utc{-10}{00}) and HADT (\utc{-9}{00}).
387 % \item \opt{samoa}: set the Samoa Standard Time mapping SST (\utc{-11}{00}).
388 % \item \opt{chamorro}: set the Chamorro Standard Time mapping ChST (\utc{-10}{00}).
389 % \item \opt{clear}: redefines \cs{DTMenUSzonemaps} to empty and
390 % clears the mappings (using \cs{DTMclearmap}) for \utc{-3}{00}, \utc{-4}{00},
391 % \utc{-5}{00}, \utc{-6}{00}, \utc{-7}{00}, \utc{-8}{00}, \utc{-9}{00}, \utc{-10}{00},
392 % \utc{-11}{00} and \utc{10}{00}.
393 % \end{itemize}
394 % Other existing mappings are unchanged. For example,
395 %\begin{verbatim}
396 %\DTMlangsetup[en-US]{zone=atlantic,zone=pacific}
397 %\end{verbatim}
398 % will set the mappings AST (\utc{-4}{00}), ADT (\utc{-3}{00}), PST (\utc{-8}{00})
399 % and PDT (\utc{-7}{00}). Any other time zone offset mappings that were
400 % previously set will remain the same. However:
401 %\begin{verbatim}
402 %\DTMlangsetup[en-US]{zone=atlantic,zone=eastern}
403 %\end{verbatim}
404 % will result in the mappings ADT (\utc{-3}{00}), EST (\utc{-5}{00}) and EDT
405 % (\utc{-4}{00}), since the EDT mapping will overwrite the AST mapping.
406 % Again, any other time zone offset mappings that were previously
407 % set remain the same.
408 %
409 % Another example:
410 %\begin{verbatim}
411 %\DTMlangsetup[en-US]{zone=dst,zone=atlantic,zone=pacific}
412 %\end{verbatim}
413 % This will first set the daylight saving mappings and then set the
414 % Atlantic mappings, which means that \utc{-4}{00} will now be mapped to
415 % AST instead of EDT, and then it will set the Pacific mappings,
416 % which means that \utc{-8}{00} will now be mapped to PST instead of
417 % AKDT.
418 %\end{description}
419 %
420 %The "en-US" time style uses the "englishampm" style. The "en-US-numeric"
421 %uses a 24 hour style. The time zone checks the \opt{mapzone}
422 %setting (described above). If it's set, then
423 %\cs{DTMusezonemapordefault} is used otherwise a numeric
424 %\meta{TZH}:\meta{TZM} is displayed. (The minute part will be
425 %omitted if the \sty{datetime2} package option \opt{showzoneminutes} is
426 %set to "false". The zone style ignores the \opt{showisoZ} option.
427 %
428 %\section{English (CA)}
429 %\label{sec:en-CA}
430 %
431 %The "en-CA" module is loaded if Canadian English has been specified. This
432 %may be done through options such as "en-CA" or
433 %"canadian". (See the note on \sty{polyglossia} in \S\ref{sec:intro}.)
434 %
435 % This module provides the "en-CA" and "en-CA-numeric" styles
436 % that are virtually identical to the "en-US" and "en-US-numeric" style.
437 % These have the same options as for the US styles but the zone maps
438 % are provided by \cs{DTMenCAzonemaps}, which can be redefined as required.
439 % As from v1.03, there's also a \opt{zone} setting that works in a
440 % similar manner to the \opt{zone} setting for the "en-US" module
441 % described above. For "en-CA", the
442 % available values are:
443 % \begin{itemize}
444 % \item \opt{std} or \opt{standard}: set the standard time zone
445 % mappings NST (\utc{-3}{30}), AST (\utc{-4}{00}), EST (\utc{-5}{00}), CST (\utc{-6}{00}), MST
446 % (\utc{-7}{00}), PST (\utc{-8}{00}).
447 % \item \opt{dst} or \opt{daylight}: set the daylight savings time
448 % zone mappings NDT (\utc{-2}{30}), ADT (\utc{-3}{00}), EDT (\utc{-4}{00}), CDT (\utc{-6}{00}),
449 % MDT (\utc{-6}{00}), PDT (\utc{-7}{00}).
450 % \item \opt{newfoundland}: set the Newfoundland standard and daylight
451 % saving mappings NST (\utc{-3}{30}) and NDT (\utc{-2}{30}).
452 % \item \opt{atlantic}: set the Atlantic standard and daylight
453 % saving mappings AST (\utc{-4}{00}) and ADT (\utc{-3}{00}).
454 % \item \opt{eastern}: set the Eastern standard and daylight
455 % saving mappings EST (\utc{-5}{00}) and EDT (\utc{-4}{00}).
456 % \item \opt{central}: set the Central standard and daylight
457 % saving mappings CST (\utc{-6}{00}) and CDT (\utc{-5}{00}).
458 % \item \opt{mountain}: set the Mountain standard and daylight
459 % saving mappings MST (\utc{-7}{00}) and MDT (\utc{-6}{00}).
460 % \item \opt{pacific}: set the Pacific standard and daylight
461 % saving mappings PST (\utc{-8}{00}) and PDT (\utc{-7}{00}).
462 % \item \opt{clear}: redefines \cs{DTMenCAzonemaps} to empty and
463 % clears the mappings (using \cs{DTMclearmap}) for \utc{-2}{30},
464 % \utc{-3}{30}, \utc{-3}{00}, \utc{-4}{00}, \utc{-5}{00}, \utc{-6}{00}, \utc{-7}{00} and \utc{-8}{00}.
465 % \end{itemize}
466 % For example, if you live in a region that doesn't implement
467 % daylight saving:
468 %\begin{verbatim}
469 %\DTMlangsetup[en-CA]{zone=std}
470 %\end{verbatim}
471 %
472 %\section{English (AU)}
473 %\label{sec:en-AU}
474 %
475 %The "en-AU" module is loaded if Australian English has been specified. This
476 %may be done through options such as "en-AU" or
477 %"australian". (See the note on \sty{polyglossia} in \S\ref{sec:intro}.)
478 %
479 % This module provides the "en-AU" and "en-AU-numeric" styles that
480 % are virtually identical to the "en-GB" and "en-GB-numeric" styles.
481 % These have the same options as the GB styles (except that the default value of
482 % \opt{ord} is "omit" rather than "level" and the default value of
483 % "mapzone" is false) but the zone maps are provided by
484 %\cs{DTMenAUzonemaps}, which can be redefined as required. This
485 %doesn't take all zones into account, but as from v1.03, there is
486 %now the \opt{zone} option, which modifies \cs{DTMenAUzonemaps}.
487 %This works in much the same way as for the "en-US" and "en-CA"
488 %options of the same name, described above. Available values for the "en-AU" module:
489 % \begin{itemize}
490 % \item \opt{std} or \opt{standard}: set the standard time zone
491 % mappings CCT (\utc{6}{30}), CXT (\utc{7}{00}), AWST (\utc{8}{00}), ACWST (\utc{8}{45}),
492 % ACST (\utc{9}{30}), AEST (\utc{10}{00}), LHST (\utc{10}{30}),
493 % NFT (\utc{11}{00}).
494 % \item \opt{dst} or \opt{daylight}: set the daylight savings time
495 % zone mappings AWDT (\utc{9}{00}), ACDT (\utc{10}{30}), AEDT (\utc{11}{00}).
496 % Note that conflicting zones are missing, such as LHDT (\utc{11}{00})
497 % which coincides with AEDT.
498 % \item \opt{central}: set the Australian Central standard and daylight
499 % saving mappings ACST (\utc{9}{30}) and ACDT (\utc{10}{30}).
500 % \item \opt{central-western}: set the Australian Central Western
501 % Standard Time mapping ACWST (\utc{8}{45}).
502 % \item \opt{western}: set the Australian Western standard and daylight
503 % saving mappings AWST (\utc{8}{0}) and AWDT (\utc{9}{0}).
504 % \item \opt{eastern}: set the Australian Eastern standard and daylight
505 % saving mappings AEST (\utc{10}{0}) and AEDT (\utc{11}{0}).
506 % \item \opt{christmas}: set the Christmas Island Time mapping CXT
507 % (\utc{7}{0}).
508 % \item \opt{lord-howe}: set the Lord Howe Island standard and daylight
509 % saving mappings LHST (\utc{10}{30}) and LHDT (\utc{11}{0}).
510 % \item \opt{norfolk}: set the Norfolk Island
511 % time mapping NFT (\utc{11}{0}).
512 % \item \opt{cocos} or \opt{keeling}: set the Cocos (Keeling) island
513 % time mapping CCT (\utc{6}{30}).
514 % \item \opt{clear}: redefines \cs{DTMenAUzonemaps} to empty and
515 % clears the mappings (using \cs{DTMclearmap}) for \utc{6}{30},
516 % \utc{7}{00}, \utc{8}{00}, \utc{8}{45}, \utc{9}{00}, \utc{9}{30}, \utc{10}{00},
517 % \utc{10}{30}, \utc{11}{00}.
518 % \end{itemize}
519 %Example:
520 %\begin{verbatim}
521 %\DTMlangsetup[en-AU]{zone=cocos,zone=christmas}
522 %\end{verbatim}
523 %
524 %\section{English (NZ)}
525 %\label{sec:en-NZ}
526 %
527 %The "en-NZ" module is loaded if New Zealand English has been specified. This
528 %may be done through options such as "en-NZ" or
529 %"newzealand". (See the note on \sty{polyglossia} in \S\ref{sec:intro}.)
530 %
531 % This module provides the "en-NZ" and "en-NZ-numeric" styles that
532 % are virtually identical to the "AU" styles but the zone maps are provided by
533 %\cs{DTMenNZzonemaps}, which can be redefined as required.
534 % The default NZ mappings are NZST (\utc{12}{00}), CHAST (\utc{12}{45}),
535 % NZDT (\utc{13}{00}), CHADT (\utc{13}{45}).
536 %
537 %\section{English (GG)}
538 %\label{sec:en-GG}
539 %
540 % The Guernsey English "en-GG" and "en-GG-numeric" styles are like the
541 % British English "en-GB" and "en-GB-numeric" styles, but replace \texttt{enGB}
542 % with \texttt{enGG} in the command names. This style can be loaded
543 % by using \texttt{en-GG} as a document class option or as a
544 % package option for either \sty{tracklang} or \sty{datetime2}.
545 %
546 %\section{English (JE)}
547 %\label{sec:en-JE}
548 % The Jersey English "en-JE" and "en-JE-numeric" styles are like the
549 % British English "en-GB" and "en-GB-numeric" styles, but replace \texttt{enGB}
550 % with \texttt{enJE} in the command names. This style can be loaded
551 % by using \texttt{en-JE} as a document class option or as a
552 % package option for either \sty{tracklang} or \sty{datetime2}.
553 %
554 %\section{English (IM)}
555 %\label{sec:en-IM}
556 % The Isle of Man "en-IM" and "en-IM-numeric" styles are like the
557 % British English "en-GB" and "en-GB-numeric" styles, but replace \texttt{enGB}
558 % with \texttt{enIM} in the command names. This style can be loaded
559 % by using \texttt{en-IM} as a document class option or as a
560 % package option for either \sty{tracklang} or \sty{datetime2}.
561 %
562 %\section{English (MT)}
563 %\label{sec:en-MT}
564 % The Malta English "en-MT" and "en-MT-numeric" styles are like the
565 % British English "en-GB" and "en-GB-numeric" styles, but replace \texttt{enGB}
566 % with \texttt{enMT} in the command names. This style can be loaded
567 % by using \texttt{en-MT} as a document class option or as a
568 % package option for either \sty{tracklang} or \sty{datetime2}.
569 %
570 % There are two main differences in the
571 % \texttt{en-GB}\slash\texttt{en-GB-numeric} and
572 % \texttt{en-MT}\slash\texttt{en-MT-numeric} styles: the \opt{ord} option
573 % (for the text styles) defaults to
574 % \texttt{omit} and the CET (\utc{1}{0}) and CEST (\utc{2}{0}) time zone
575 % mappings are added (for both the text and numeric styles).
576 %
577 %\section{English (IE)}
578 %\label{sec:en-IE}
579 % The Republic of Ireland English "en-IE" and "en-IE-numeric" styles are like the
580 % British English "en-GB" and "en-GB-numeric" styles, but replace \texttt{enGB}
581 % with \texttt{enIE} in the command names. This style can be loaded
582 % by using \texttt{en-IE} as a document class option or as a
583 % package option for either \sty{tracklang} or \sty{datetime2}.
584 % You will need at least version 1.2 of the \sty{tracklang} package
585 % installed.
586 %
587 % The only difference in the
588 % \texttt{en-GB}\slash\texttt{en-GB-numeric} and
589 % \texttt{en-IE}\slash\texttt{en-IE-numeric} styles is that
590 % the \utc{1}{0} time zone is mapped to IST instead of
591 % BST. If you prefer WET/WEST time zones, you can do:
592 %\begin{verbatim}
593 %\renewcommand*{\DTMenIEzonemaps}{%
594 % \DTMdefzonemap{00}{00}{WET}%
595 % \DTMdefzonemap{01}{00}{WEST}%
596 %}
597 %\end{verbatim}
598 %
599 %For Irish Gaelic you need the "irish" module instead.
600 %
601 %\StopEventually{%
602 %\clearpage
603 %\phantomsection
604 %\addcontentsline{toc}{section}{Change History}%
605 %\PrintChanges
606 %\addcontentsline{toc}{section}{\indexname}%
607 %\PrintIndex}
608 %\section{The Code}
609 %\iffalse
610 % \begin{macrocode}
611 %<*datetime2-english-base.ldf>
612 % \end{macrocode}
613 %\fi
614 %\subsection{Base Code (\texttt{datetime2-english-base.ldf})}
615 %This file contains the code common to all the English regional
616 %variations.
617 %\changes{1.0}{2015-03-24}{Initial release}
618 % Identify module
619 % \begin{macrocode}
620 \ProvidesDateTimeModule{english-base}[2019/10/21 v1.05 (NLCT)]
621 % \end{macrocode}
622 % Since the main emphasize of the \sty{datetime2} package is to
623 % provide expandable dates where possible, the commands here need to
624 % be expandable. (Anything that wasn't expandable would need to be
625 % protected.) Therefore the default ordinal format is a simple
626 % expandable format (which is why \sty{fmtcount} isn't being used).
627 %\begin{macro}{\DTMenglishordinal}
628 % \begin{macrocode}
629 \newcommand*{\DTMenglishordinal}[1]{%
630 \number#1 % space intended
631 \DTMenglishfmtordsuffix{%
632 \ifcase#1
633 \or \DTMenglishst
634 \or \DTMenglishnd
635 \or \DTMenglishrd
636 \or \DTMenglishth
637 \or \DTMenglishth
638 \or \DTMenglishth
639 \or \DTMenglishth
640 \or \DTMenglishth
641 \or \DTMenglishth
642 \or \DTMenglishth
643 \or \DTMenglishth
644 \or \DTMenglishth
645 \or \DTMenglishth
646 \or \DTMenglishth
647 \or \DTMenglishth
648 \or \DTMenglishth
649 \or \DTMenglishth
650 \or \DTMenglishth
651 \or \DTMenglishth
652 \or \DTMenglishth
653 \or \DTMenglishst
654 \or \DTMenglishnd
655 \or \DTMenglishrd
656 \or \DTMenglishth
657 \or \DTMenglishth
658 \or \DTMenglishth
659 \or \DTMenglishth
660 \or \DTMenglishth
661 \or \DTMenglishth
662 \or \DTMenglishth
663 \or \DTMenglishst
664 \fi
665 }%
666 }
667 % \end{macrocode}
668 %\end{macro}
669 %
670 %Just in case a~user has some need to change the ordinal suffixes,
671 %these are provided as commands.
672 %\begin{macro}{\DTMenglishst}
673 % \begin{macrocode}
674 \newcommand*{\DTMenglishst}{st}
675 % \end{macrocode}
676 %\end{macro}
677 %\begin{macro}{\DTMenglishnd}
678 % \begin{macrocode}
679 \newcommand*{\DTMenglishnd}{nd}
680 % \end{macrocode}
681 %\end{macro}
682 %\begin{macro}{\DTMenglishrd}
683 % \begin{macrocode}
684 \newcommand*{\DTMenglishrd}{rd}
685 % \end{macrocode}
686 %\end{macro}
687 %\begin{macro}{\DTMenglishth}
688 % \begin{macrocode}
689 \newcommand*{\DTMenglishth}{th}
690 % \end{macrocode}
691 %\end{macro}
692 %
693 %\begin{macro}{\DTMenglishfmtordsuffix}
694 %The suffix can have a format applied to it (for example, made a
695 %superscript or converted to small caps). The default ignores
696 %the argument, which makes it consistent with \TeX's default date
697 %format. This can be changed by regional modules.
698 % \begin{macrocode}
699 \newcommand*{\DTMenglishfmtordsuffix}[1]{}
700 % \end{macrocode}
701 %\end{macro}
702 %
703 %\begin{macro}{\DTMenglishmonthname}
704 % English month names.
705 % \begin{macrocode}
706 \newcommand*{\DTMenglishmonthname}[1]{%
707 \ifcase#1
708 \or
709 January%
710 \or
711 February%
712 \or
713 March%
714 \or
715 April%
716 \or
717 May%
718 \or
719 June%
720 \or
721 July%
722 \or
723 August%
724 \or
725 September%
726 \or
727 October%
728 \or
729 November%
730 \or
731 December%
732 \fi
733 }
734 % \end{macrocode}
735 %\end{macro}
736 %
737 %\begin{macro}{\DTMenglishshortmonthname}
738 % Abbreviated English month names.
739 % \begin{macrocode}
740 \newcommand*{\DTMenglishshortmonthname}[1]{%
741 \ifcase#1
742 \or
743 Jan%
744 \or
745 Feb%
746 \or
747 Mar%
748 \or
749 Apr%
750 \or
751 May%
752 \or
753 Jun%
754 \or
755 Jul%
756 \or
757 Aug%
758 \or
759 Sep%
760 \or
761 Oct%
762 \or
763 Nov%
764 \or
765 Dec%
766 \fi
767 }
768 % \end{macrocode}
769 %\end{macro}
770 %
771 %\begin{macro}{\DTMenglishweekdayname}
772 % English day of week names.
773 % \begin{macrocode}
774 \newcommand*{\DTMenglishweekdayname}[1]{%
775 \ifcase#1
776 Monday%
777 \or
778 Tuesday%
779 \or
780 Wednesday%
781 \or
782 Thursday%
783 \or
784 Friday%
785 \or
786 Saturday%
787 \or
788 Sunday%
789 \fi
790 }
791 % \end{macrocode}
792 %\end{macro}
793 %
794 %\begin{macro}{\DTMenglishweekdayname}
795 % English abbreviated day of week names.
796 % \begin{macrocode}
797 \newcommand*{\DTMenglishshortweekdayname}[1]{%
798 \ifcase#1
799 Mon%
800 \or
801 Tue%
802 \or
803 Wed%
804 \or
805 Thu%
806 \or
807 Fri%
808 \or
809 Sat%
810 \or
811 Sun%
812 \fi
813 }
814 % \end{macrocode}
815 %\end{macro}
816 %
817 % 12 hour time tags.
818 %\begin{macro}{\DTMenglisham}
819 % \begin{macrocode}
820 \newcommand*\DTMenglisham{am}%
821 % \end{macrocode}
822 %\end{macro}
823 %
824 %\begin{macro}{\DTMenglishpm}
825 % \begin{macrocode}
826 \newcommand*\DTMenglishpm{pm}%
827 % \end{macrocode}
828 %\end{macro}
829 %
830 %\begin{macro}{\DTMenglishmidnight}
831 % \begin{macrocode}
832 \newcommand*\DTMenglishmidnight{midnight}%
833 % \end{macrocode}
834 %\end{macro}
835 %
836 %\begin{macro}{\DTMenglishnoon}
837 % \begin{macrocode}
838 \newcommand*\DTMenglishnoon{noon}%
839 % \end{macrocode}
840 %\end{macro}
841 %
842 % am/pm time style.
843 %\begin{macro}{\DTMenglishampmfmt}
844 % \begin{macrocode}
845 \newcommand*{\DTMenglishampmfmt}[1]{#1}
846 % \end{macrocode}
847 %\end{macro}
848 %
849 %\begin{macro}{\DTMenglishtimesep}
850 % \begin{macrocode}
851 \newcommand*{\DTMenglishtimesep}{\DTMsep{hourmin}}
852 % \end{macrocode}
853 %\end{macro}
854 %
855 % This style ignores seconds.
856 % \begin{macrocode}
857 \DTMnewtimestyle
858 {englishampm}% label
859 {%
860 \renewcommand*\DTMdisplaytime[3]{%
861 \ifnum##2=0
862 \ifnum##1=12
863 \DTMtexorpdfstring
864 {\DTMenglishampmfmt{\DTMenglishnoon}}%
865 {\DTMenglishnoon}%
866 \else
867 \ifnum##1=0
868 \DTMtexorpdfstring
869 {\DTMenglishampmfmt{\DTMenglishmidnight}}%
870 {\DTMenglishmidnight}%
871 \else
872 \ifnum##1=24
873 \DTMtexorpdfstring
874 {\DTMenglishampmfmt{\DTMenglishmidnight}}%
875 {\DTMenglishmidnight}%
876 \else
877 \ifnum##1<12
878 \number##1
879 \DTMtexorpdfstring
880 {\DTMenglishampmfmt{\DTMenglisham}}%
881 {\DTMenglisham}%
882 \else
883 \number\numexpr##1-12\relax
884 \DTMtexorpdfstring
885 {\DTMenglishampmfmt{\DTMenglishpm}}%
886 {\DTMenglishpm}%
887 \fi
888 \fi
889 \fi
890 \fi
891 \else
892 \ifnum##1<13
893 \ifnum##1=0
894 12%
895 \else
896 \number##1
897 \fi
898 \DTMenglishtimesep\DTMtwodigits{##2}%
899 \ifnum##1=12
900 % \end{macrocode}
901 % v1.03 bug fixed replaced \cs{DTMenglisham} with \cs{DTMenglishpm}
902 %\changes{1.03}{2016-01-23}{fixed bug that displayed am instead of pm}
903 % \begin{macrocode}
904 \DTMtexorpdfstring
905 {\DTMenglishampmfmt{\DTMenglishpm}}%
906 {\DTMenglishpm}%
907 \else
908 \DTMtexorpdfstring
909 {\DTMenglishampmfmt{\DTMenglisham}}%
910 {\DTMenglisham}%
911 \fi
912 \else
913 \number\numexpr##1-12\relax
914 \DTMenglishtimesep\DTMtwodigits{##2}%
915 \ifnum##1=24
916 % \end{macrocode}
917 % v1.03 bug fixed replaced \cs{DTMenglishpm} with \cs{DTMenglisham}
918 %\changes{1.03}{2016-01-23}{fixed bug that displayed am instead of pm}
919 % \begin{macrocode}
920 \DTMtexorpdfstring
921 {\DTMenglishampmfmt{\DTMenglisham}}%
922 {\DTMenglisham}%
923 \else
924 \DTMtexorpdfstring
925 {\DTMenglishampmfmt{\DTMenglishpm}}%
926 {\DTMenglishpm}%
927 \fi
928 \fi
929 \fi
930 }%
931 }%
932 % \end{macrocode}
933 %
934 %
935 %\iffalse
936 % \begin{macrocode}
937 %</datetime2-english-base.ldf>
938 % \end{macrocode}
939 %\fi
940 %\subsection{Default English Code (\texttt{datetime2-english.ldf})}
941 % This file contains the style used if English is requested without
942 % a~known region. It uses \TeX's default date style.
943 % This style ignores the \opt{showdow} (show day of week) setting.
944 %\changes{1.0}{2015-03-24}{Initial release}
945 %
946 %\iffalse
947 % \begin{macrocode}
948 %<*datetime2-english.ldf>
949 % \end{macrocode}
950 %\fi
951 %
952 % Identify Module
953 % \begin{macrocode}
954 \ProvidesDateTimeModule{english}[2019/10/21 v1.05 (NLCT)]
955 % \end{macrocode}
956 % Load the base English module.
957 % \begin{macrocode}
958 \RequireDateTimeModule{english-base}
959 % \end{macrocode}
960 %
961 % Define default English text style (TeX's default) labelled "english".
962 % The time zone is just the "default" style (no mappings applied)
963 % but "showisoZ" setting checked. The full style places a space
964 % between each block (date, time and zone). The numeric setting is
965 % ambiguous without a region so it will use the "default" style.
966 % \begin{macrocode}
967 \DTMnewstyle
968 {english}% label
969 {% date style
970 \renewcommand*{\DTMenglishfmtordsuffix}[1]{}%
971 \renewcommand*\DTMdisplaydate[4]{%
972 \DTMenglishmonthname{##2}\space\number##3, \number##1
973 }%
974 \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
975 }%
976 {% time style
977 \renewcommand*{\DTMenglishtimesep}{\DTMsep{hourmin}}%
978 \DTMsettimestyle{englishampm}%
979 }%
980 {% zone style
981 \DTMsetzonestyle{default}%
982 }%
983 {% full style
984 \renewcommand*{\DTMdisplay}[9]{%
985 \ifDTMshowdate
986 \DTMdisplaydate{##1}{##2}{##3}{##4}%
987 \space
988 \fi
989 \DTMdisplaytime{##5}{##6}{##7}%
990 \ifDTMshowzone
991 \space
992 \DTMdisplayzone{##8}{##9}%
993 \fi
994 }%
995 \renewcommand*{\DTMDisplay}{\DTMdisplay}%
996 }%
997 % \end{macrocode}
998 % Switch the style according to the \opt{useregional} setting.
999 % \begin{macrocode}
1000 \DTMifcaseregional
1001 {}% do nothing
1002 {\DTMsetstyle{english}}%
1003 {\DTMsetstyle{default}}%
1004 % \end{macrocode}
1005 %
1006 % Redefine \cs{dateenglish} (or \cs{date}\meta{dialect}) to prevent
1007 % \sty{babel} from resetting \cs{today}. (For this to work,
1008 % \sty{babel} must already have been loaded if it's required.)
1009 % \begin{macrocode}
1010 \ifcsundef{date\CurrentTrackedDialect}
1011 {%
1012 \ifundef\dateenglish
1013 {% do nothing
1014 }%
1015 {%
1016 \def\dateenglish{%
1017 \DTMifcaseregional
1018 {}% do nothing
1019 {\DTMsetstyle{english}}%
1020 {\DTMsetstyle{default}}%
1021 }%
1022 }%
1023 }%
1024 {%
1025 \csdef{date\CurrentTrackedDialect}{%
1026 \DTMifcaseregional
1027 {}% do nothing
1028 {\DTMsetstyle{english}}%
1029 {\DTMsetstyle{default}}%
1030 }%
1031 }%
1032 % \end{macrocode}
1033 %\iffalse
1034 % \begin{macrocode}
1035 %</datetime2-english.ldf>
1036 % \end{macrocode}
1037 %\fi
1038 %
1039 %\subsection{English (GB) Code (\texttt{datetime2-en-GB.ldf})}
1040 %This file contains the British English style.
1041 %\changes{1.0}{2015-03-24}{Initial release}
1042 %\iffalse
1043 % \begin{macrocode}
1044 %<*datetime2-en-GB.ldf>
1045 % \end{macrocode}
1046 %\fi
1047 % Identify this module.
1048 % \begin{macrocode}
1049 \ProvidesDateTimeModule{en-GB}[2019/10/21 v1.05 (NLCT)]
1050 % \end{macrocode}
1051 % Load base English module.
1052 % \begin{macrocode}
1053 \RequireDateTimeModule{english-base}
1054 % \end{macrocode}
1055 %
1056 % Allow the user a way of configuring the "en-GB" and
1057 % "en-GB-numeric" styles. This doesn't use the package wide separators such as
1058 % \cs{dtm@datetimesep} in case other date formats are also required.
1059 %
1060 %\begin{macro}{\DTMenGBdowdaysep}
1061 %\changes{1.04}{2016-03-09}{new}
1062 % The separator between the day of week name and the day of month
1063 % number for the text format.
1064 % \begin{macrocode}
1065 \newcommand*{\DTMenGBdowdaysep}{\space}
1066 % \end{macrocode}
1067 %\end{macro}
1068 %
1069 %\begin{macro}{\DTMenGBdaymonthsep}
1070 % The separator between the day and month for the text format.
1071 % \begin{macrocode}
1072 \newcommand*{\DTMenGBdaymonthsep}{\space}
1073 % \end{macrocode}
1074 %\end{macro}
1075 %
1076 %\begin{macro}{\DTMenGBmonthyearsep}
1077 % The separator between the month and year for the text format.
1078 % \begin{macrocode}
1079 \newcommand*{\DTMenGBmonthyearsep}{\space}
1080 % \end{macrocode}
1081 %\end{macro}
1082 %
1083 %\begin{macro}{\DTMenGBdatetimesep}
1084 % The separator between the date and time blocks in the full format
1085 % (either text or numeric).
1086 % \begin{macrocode}
1087 \newcommand*{\DTMenGBdatetimesep}{\space}
1088 % \end{macrocode}
1089 %\end{macro}
1090 %
1091 %\begin{macro}{\DTMenGBtimezonesep}
1092 % The separator between the time and zone blocks in the full format
1093 % (either text or numeric).
1094 % \begin{macrocode}
1095 \newcommand*{\DTMenGBtimezonesep}{\space}
1096 % \end{macrocode}
1097 %\end{macro}
1098 %
1099 %\begin{macro}{\DTMenGBdatesep}
1100 % The separator for the numeric date format.
1101 % \begin{macrocode}
1102 \newcommand*{\DTMenGBdatesep}{/}
1103 % \end{macrocode}
1104 %\end{macro}
1105 %
1106 %\begin{macro}{\DTMenGBtimesep}
1107 % The separator for the numeric time format.
1108 % \begin{macrocode}
1109 \newcommand*{\DTMenGBtimesep}{:}
1110 % \end{macrocode}
1111 %\end{macro}
1112 %
1113 %Provide keys that can be used in \cs{DTMlangsetup} to set these
1114 %separators.
1115 % \begin{macrocode}
1116 \DTMdefkey{en-GB}{dowdaysep}{\renewcommand*{\DTMenGBdowdaysep}{#1}}
1117 \DTMdefkey{en-GB}{daymonthsep}{\renewcommand*{\DTMenGBdaymonthsep}{#1}}
1118 \DTMdefkey{en-GB}{monthyearsep}{\renewcommand*{\DTMenGBmonthyearsep}{#1}}
1119 \DTMdefkey{en-GB}{datetimesep}{\renewcommand*{\DTMenGBdatetimesep}{#1}}
1120 \DTMdefkey{en-GB}{timezonesep}{\renewcommand*{\DTMenGBtimezonesep}{#1}}
1121 \DTMdefkey{en-GB}{datesep}{\renewcommand*{\DTMenGBdatesep}{#1}}
1122 \DTMdefkey{en-GB}{timesep}{\renewcommand*{\DTMenGBtimesep}{#1}}
1123 % \end{macrocode}
1124 %
1125 % Define a boolean key that can switch between full and abbreviated
1126 % formats for the month and day of week names in the text format.
1127 % \begin{macrocode}
1128 \DTMdefboolkey{en-GB}{abbr}[true]{}
1129 % \end{macrocode}
1130 % The default is the full name.
1131 % \begin{macrocode}
1132 \DTMsetbool{en-GB}{abbr}{false}
1133 % \end{macrocode}
1134 %
1135 % Define a boolean key that determines if the time zone mappings
1136 % should be used.
1137 % \begin{macrocode}
1138 \DTMdefboolkey{en-GB}{mapzone}[true]{}
1139 % \end{macrocode}
1140 % The default is to use mappings.
1141 % \begin{macrocode}
1142 \DTMsetbool{en-GB}{mapzone}{true}
1143 % \end{macrocode}
1144 %
1145 % Define a boolean key that determines whether to show or hide the
1146 % day of the month. (Called "showdayofmonth" instead of "showday" to
1147 % avoid confusion with the day of the week.)
1148 % \begin{macrocode}
1149 \DTMdefboolkey{en-GB}{showdayofmonth}[true]{}
1150 % \end{macrocode}
1151 % The default is to show the day of the month.
1152 % \begin{macrocode}
1153 \DTMsetbool{en-GB}{showdayofmonth}{true}
1154 % \end{macrocode}
1155 %
1156 % Define a boolean key that determines whether to show or hide the
1157 % year.
1158 % \begin{macrocode}
1159 \DTMdefboolkey{en-GB}{showyear}[true]{}
1160 % \end{macrocode}
1161 % The default is to show the year.
1162 % \begin{macrocode}
1163 \DTMsetbool{en-GB}{showyear}{true}
1164 % \end{macrocode}
1165 %
1166 %\begin{macro}{\DTMenGBfmtordsuffix}
1167 % Define the ordinal suffix to be used by this style.
1168 % \begin{macrocode}
1169 \newcommand*{\DTMenGBfmtordsuffix}[1]{#1}
1170 % \end{macrocode}
1171 %\end{macro}
1172 %
1173 % Define a setting to change the ordinal suffix style.
1174 %\changes{1.05}{2019-10-21}{renamed scratch variables}
1175 % \begin{macrocode}
1176 \DTMdefchoicekey{en-GB}{ord}[\@dtm@val\@dtm@nr]{level,raise,omit,sc}{%
1177 \ifcase\@dtm@nr\relax
1178 \renewcommand*{\DTMenGBfmtordsuffix}[1]{##1}%
1179 \or
1180 \renewcommand*{\DTMenGBfmtordsuffix}[1]{%
1181 \DTMtexorpdfstring{\protect\textsuperscript{##1}}{##1}}%
1182 \or
1183 \renewcommand*{\DTMenGBfmtordsuffix}[1]{}%
1184 \or
1185 \renewcommand*{\DTMenGBfmtordsuffix}[1]{%
1186 \DTMtexorpdfstring{\protect\textsc{##1}}{##1}}%
1187 \fi
1188 }
1189 % \end{macrocode}
1190 %
1191 % Define the "en-GB" style.
1192 % \begin{macrocode}
1193 \DTMnewstyle
1194 {en-GB}% label
1195 {% date style
1196 \renewcommand*{\DTMenglishfmtordsuffix}{\DTMenGBfmtordsuffix}%
1197 \renewcommand*\DTMdisplaydate[4]{%
1198 \ifDTMshowdow
1199 \ifnum##4>-1
1200 \DTMifbool{en-GB}{abbr}%
1201 {\DTMenglishshortweekdayname{##4}}%
1202 {\DTMenglishweekdayname{##4}}%
1203 \DTMenGBdowdaysep
1204 \fi
1205 \fi
1206 \DTMifbool{en-GB}{showdayofmonth}%
1207 {%
1208 \DTMenglishordinal{##3}%
1209 \DTMenGBdaymonthsep
1210 }%
1211 {}%
1212 \DTMifbool{en-GB}{abbr}%
1213 {\DTMenglishshortmonthname{##2}}%
1214 {\DTMenglishmonthname{##2}}%
1215 \DTMifbool{en-GB}{showyear}%
1216 {%
1217 \DTMenGBmonthyearsep\number##1 % space intended
1218 }%
1219 {}%
1220 }%
1221 \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
1222 }%
1223 {% time style
1224 \renewcommand*\DTMenglishtimesep{\DTMenGBtimesep}%
1225 \DTMsettimestyle{englishampm}%
1226 }%
1227 {% zone style
1228 \DTMresetzones
1229 \DTMenGBzonemaps
1230 \renewcommand*{\DTMdisplayzone}[2]{%
1231 \DTMifbool{en-GB}{mapzone}%
1232 {\DTMusezonemapordefault{##1}{##2}}%
1233 {%
1234 \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
1235 \ifDTMshowzoneminutes\DTMenGBtimesep\DTMtwodigits{##2}\fi
1236 }%
1237 }%
1238 }%
1239 {% full style
1240 \renewcommand*{\DTMdisplay}[9]{%
1241 \ifDTMshowdate
1242 \DTMdisplaydate{##1}{##2}{##3}{##4}%
1243 \DTMenGBdatetimesep
1244 \fi
1245 \DTMdisplaytime{##5}{##6}{##7}%
1246 \ifDTMshowzone
1247 \DTMenGBtimezonesep
1248 \DTMdisplayzone{##8}{##9}%
1249 \fi
1250 }%
1251 \renewcommand*{\DTMDisplay}{\DTMdisplay}%
1252 }%
1253 % \end{macrocode}
1254 %
1255 % Define numeric style.
1256 %\changes{1.01}{2015-04-09}{fixed mispelt style name}
1257 % \begin{macrocode}
1258 \DTMnewstyle
1259 {en-GB-numeric}% label
1260 {% date style
1261 \renewcommand*\DTMdisplaydate[4]{%
1262 \DTMifbool{en-GB}{showdayofmonth}%
1263 {%
1264 \number##3 % space intended
1265 \DTMenGBdatesep
1266 }%
1267 {}%
1268 \number##2 % space intended
1269 \DTMifbool{en-GB}{showyear}%
1270 {%
1271 \DTMenGBdatesep
1272 \number##1 % space intended
1273 }%
1274 {}%
1275 }%
1276 \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
1277 }%
1278 {% time style
1279 \renewcommand*\DTMdisplaytime[3]{%
1280 \number##1
1281 \DTMenGBtimesep\DTMtwodigits{##2}%
1282 \ifDTMshowseconds\DTMenGBtimesep\DTMtwodigits{##3}\fi
1283 }%
1284 }%
1285 {% zone style
1286 \DTMresetzones
1287 \DTMenGBzonemaps
1288 \renewcommand*{\DTMdisplayzone}[2]{%
1289 \DTMifbool{en-GB}{mapzone}%
1290 {\DTMusezonemapordefault{##1}{##2}}%
1291 {%
1292 \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
1293 \ifDTMshowzoneminutes\DTMenGBtimesep\DTMtwodigits{##2}\fi
1294 }%
1295 }%
1296 }%
1297 {% full style
1298 \renewcommand*{\DTMdisplay}[9]{%
1299 \ifDTMshowdate
1300 \DTMdisplaydate{##1}{##2}{##3}{##4}%
1301 \DTMenGBdatetimesep
1302 \fi
1303 \DTMdisplaytime{##5}{##6}{##7}%
1304 \ifDTMshowzone
1305 \DTMenGBtimezonesep
1306 \DTMdisplayzone{##8}{##9}%
1307 \fi
1308 }%
1309 \renewcommand*{\DTMDisplay}{\DTMdisplay}%
1310 }
1311 % \end{macrocode}
1312 %
1313 %\begin{macro}{\DTMenGBzonemaps}
1314 % The time zone mappings are set through this command, which can be
1315 % redefined if extra mappings are required or mappings need to be
1316 % removed.
1317 % \begin{macrocode}
1318 \newcommand*{\DTMenGBzonemaps}{%
1319 \DTMdefzonemap{00}{00}{GMT}%
1320 \DTMdefzonemap{01}{00}{BST}%
1321 }
1322 % \end{macrocode}
1323 %\end{macro}
1324 %
1325 % Switch style according to the \opt{useregional} setting.
1326 % \begin{macrocode}
1327 \DTMifcaseregional
1328 {}% do nothing
1329 {\DTMsetstyle{en-GB}}%
1330 {\DTMsetstyle{en-GB-numeric}}%
1331 % \end{macrocode}
1332 %
1333 % Redefine \cs{dateenglish} (or \cs{date}\meta{dialect}) to prevent
1334 % \sty{babel} from resetting \cs{today}. (For this to work,
1335 % \sty{babel} must already have been loaded if it's required.)
1336 % \begin{macrocode}
1337 \ifcsundef{date\CurrentTrackedDialect}
1338 {% do nothing
1339 \ifundef\dateenglish
1340 {%
1341 }%
1342 {%
1343 \def\dateenglish{%
1344 \DTMifcaseregional
1345 {}% do nothing
1346 {\DTMsetstyle{en-GB}}%
1347 {\DTMsetstyle{en-GB-numeric}}%
1348 }%
1349 }%
1350 }%
1351 {%
1352 \csdef{date\CurrentTrackedDialect}{%
1353 \DTMifcaseregional
1354 {}% do nothing
1355 {\DTMsetstyle{en-GB}}%
1356 {\DTMsetstyle{en-GB-numeric}}%
1357 }%
1358 }%
1359 % \end{macrocode}
1360 %
1361 %\iffalse
1362 % \begin{macrocode}
1363 %</datetime2-en-GB.ldf>
1364 % \end{macrocode}
1365 %\fi
1366 %\subsection{English (US) Code (\texttt{datetime2-en-US.ldf})}
1367 %This file contains the US English style.
1368 %\changes{1.0}{2015-03-24}{Initial release}
1369 %\iffalse
1370 % \begin{macrocode}
1371 %<*datetime2-en-US.ldf>
1372 % \end{macrocode}
1373 %\fi
1374 %
1375 % Identify this module.
1376 % \begin{macrocode}
1377 \ProvidesDateTimeModule{en-US}[2019/10/21 v1.05 (NLCT)]
1378 % \end{macrocode}
1379 % Load base English module.
1380 % \begin{macrocode}
1381 \RequireDateTimeModule{english-base}
1382 % \end{macrocode}
1383 %
1384 % Allow the user a way of configuring the "en-US" date format.
1385 % This doesn't use the package wide separators such as
1386 % \cs{dtm@datetimesep} in case other date formats are also required.
1387 %\begin{macro}{\DTMenUSmonthdaysep}
1388 % The separator between the month and day for the text format.
1389 % \begin{macrocode}
1390 \newcommand*{\DTMenUSmonthdaysep}{\space}
1391 % \end{macrocode}
1392 %\end{macro}
1393 %
1394 %\begin{macro}{\DTMenUSdowmonthsep}
1395 % The separator between the day of week name and the month for the text format.
1396 % (New to version 1.02.)
1397 %\changes{1.02}{2016-01-18}{new}
1398 % \begin{macrocode}
1399 \newcommand*{\DTMenUSdowmonthsep}{\space}
1400 % \end{macrocode}
1401 %\end{macro}
1402 %
1403 %\begin{macro}{\DTMenUSdayyearsep}
1404 % The separator between the day and year for the text format.
1405 % \begin{macrocode}
1406 \newcommand*{\DTMenUSdayyearsep}{,\space}
1407 % \end{macrocode}
1408 %\end{macro}
1409 %
1410 %\begin{macro}{\DTMenUSdatetimesep}
1411 % The separator between the date and time blocks in the full format
1412 % (either text or numeric).
1413 % \begin{macrocode}
1414 \newcommand*{\DTMenUSdatetimesep}{\space}
1415 % \end{macrocode}
1416 %\end{macro}
1417 %
1418 %\begin{macro}{\DTMenUStimezonesep}
1419 % The separator between the time and zone blocks in the full format
1420 % (either text or numeric).
1421 % \begin{macrocode}
1422 \newcommand*{\DTMenUStimezonesep}{\space}
1423 % \end{macrocode}
1424 %\end{macro}
1425 %
1426 %\begin{macro}{\DTMenUSdatesep}
1427 % The separator for the numeric date format.
1428 % \begin{macrocode}
1429 \newcommand*{\DTMenUSdatesep}{/}
1430 % \end{macrocode}
1431 %\end{macro}
1432 %
1433 %\begin{macro}{\DTMenUStimesep}
1434 % The separator for the numeric time format.
1435 % \begin{macrocode}
1436 \newcommand*{\DTMenUStimesep}{:}
1437 % \end{macrocode}
1438 %\end{macro}
1439 %
1440 %Provide keys that can be used in \cs{DTMlangsetup} to set these
1441 %separators.
1442 % \begin{macrocode}
1443 \DTMdefkey{en-US}{monthdaysep}{\renewcommand*{\DTMenUSmonthdaysep}{#1}}
1444 \DTMdefkey{en-US}{dowmonthsep}{\renewcommand*{\DTMenUSdowmonthsep}{#1}}
1445 \DTMdefkey{en-US}{dayyearsep}{\renewcommand*{\DTMenUSdayyearsep}{#1}}
1446 \DTMdefkey{en-US}{datetimesep}{\renewcommand*{\DTMenUSdatetimesep}{#1}}
1447 \DTMdefkey{en-US}{timezonesep}{\renewcommand*{\DTMenUStimezonesep}{#1}}
1448 \DTMdefkey{en-US}{datesep}{\renewcommand*{\DTMenUSdatesep}{#1}}
1449 \DTMdefkey{en-US}{timesep}{\renewcommand*{\DTMenUStimesep}{#1}}
1450 % \end{macrocode}
1451 %
1452 % Define a boolean key that can switch between full and abbreviated
1453 % formats for the month and day of week names in the text format.
1454 % \begin{macrocode}
1455 \DTMdefboolkey{en-US}{abbr}[true]{}
1456 % \end{macrocode}
1457 % The default is the full name.
1458 % \begin{macrocode}
1459 \DTMsetbool{en-US}{abbr}{false}
1460 % \end{macrocode}
1461 %
1462 % Define a boolean key that determines if the time zone mappings
1463 % should be used.
1464 % \begin{macrocode}
1465 \DTMdefboolkey{en-US}{mapzone}[true]{}
1466 % \end{macrocode}
1467 % The default is no mappings.
1468 % \begin{macrocode}
1469 \DTMsetbool{en-US}{mapzone}{false}
1470 % \end{macrocode}
1471 %
1472 % Define a boolean key that determines whether to show or hide the
1473 % day of the month. (Called "showdayofmonth" instead of "showday" to
1474 % avoid confusion with the day of the week.)
1475 % \begin{macrocode}
1476 \DTMdefboolkey{en-US}{showdayofmonth}[true]{}
1477 % \end{macrocode}
1478 % The default is to show the day of the month.
1479 % \begin{macrocode}
1480 \DTMsetbool{en-US}{showdayofmonth}{true}
1481 % \end{macrocode}
1482 %
1483 % Define a boolean key that determines whether to show or hide the
1484 % year.
1485 % \begin{macrocode}
1486 \DTMdefboolkey{en-US}{showyear}[true]{}
1487 % \end{macrocode}
1488 % The default is to show the year.
1489 % \begin{macrocode}
1490 \DTMsetbool{en-US}{showyear}{true}
1491 % \end{macrocode}
1492 %
1493 %\begin{macro}{\DTMenUSfmtordsuffix}
1494 % Define the ordinal suffix to be used by this style.
1495 % \begin{macrocode}
1496 \newcommand*{\DTMenUSfmtordsuffix}[1]{}
1497 % \end{macrocode}
1498 %\end{macro}
1499 %
1500 % Define a setting to change the ordinal suffix style.
1501 %\changes{1.05}{2019-10-21}{renamed scratch variables}
1502 % \begin{macrocode}
1503 \DTMdefchoicekey{en-US}{ord}[\@dtm@val\@dtm@nr]{level,raise,omit,sc}{%
1504 \ifcase\@dtm@nr\relax
1505 \renewcommand*{\DTMenUSfmtordsuffix}[1]{##1}%
1506 \or
1507 \renewcommand*{\DTMenUSfmtordsuffix}[1]{%
1508 \DTMtexorpdfstring{\protect\textsuperscript{##1}}{##1}}%
1509 \or
1510 \renewcommand*{\DTMenUSfmtordsuffix}[1]{}%
1511 \or
1512 \renewcommand*{\DTMenUSfmtordsuffix}[1]{%
1513 \DTMtexorpdfstring{\protect\textsc{##1}}{##1}}%
1514 \fi
1515 }
1516 % \end{macrocode}
1517 %
1518 % Define a setting to change zone mappings.
1519 %\changes{1.03}{2016-01-23}{added zone option to en-US}
1520 %\changes{1.05}{2019-10-21}{renamed scratch variables}
1521 % \begin{macrocode}
1522 \DTMdefchoicekey{en-US}{zone}[\@dtm@val\@dtm@nr]%
1523 {std,standard,dst,daylight,atlantic,eastern,central,mountain,%
1524 pacific,alaska,hawaii-aleutian,hawaii,aleutian,samoa,charmorro,clear}%
1525 {%
1526 \ifcase\@dtm@nr\relax
1527 % std
1528 \appto\DTMenUSzonemaps{\DTMenUSstdzonemaps}%
1529 \DTMenUSstdzonemaps
1530 \or
1531 % standard
1532 \appto\DTMenUSzonemaps{\DTMenUSstdzonemaps}%
1533 \DTMenUSstdzonemaps
1534 \or
1535 % dst
1536 \appto\DTMenUSzonemaps{\DTMenUSdstzonemaps}%
1537 \DTMenUSdstzonemaps
1538 \or
1539 % daylight
1540 \appto\DTMenUSzonemaps{\DTMenUSdstzonemaps}%
1541 \DTMenUSdstzonemaps
1542 \or
1543 % atlantic
1544 \appto\DTMenUSzonemaps{\DTMenUSatlanticzonemaps}%
1545 \DTMenUSatlanticzonemaps
1546 \or
1547 % eastern
1548 \appto\DTMenUSzonemaps{\DTMenUSeasternzonemaps}%
1549 \DTMenUSeasternzonemaps
1550 \or
1551 % central
1552 \appto\DTMenUSzonemaps{\DTMenUScentralzonemaps}%
1553 \DTMenUScentralzonemaps
1554 \or
1555 % mountain
1556 \appto\DTMenUSzonemaps{\DTMenUSmountainzonemaps}%
1557 \DTMenUSmountainzonemaps
1558 \or
1559 % pacific
1560 \appto\DTMenUSzonemaps{\DTMenUSpacificzonemaps}%
1561 \DTMenUSpacificzonemaps
1562 \or
1563 % alaska
1564 \appto\DTMenUSzonemaps{\DTMenUSalaskazonemaps}%
1565 \DTMenUSalaskazonemaps
1566 \or
1567 % hawaii-aleutian
1568 \appto\DTMenUSzonemaps{\DTMenUShawaiialeutianzonemaps}%
1569 \DTMenUShawaiialeutianzonemaps
1570 \or
1571 % hawaii
1572 \appto\DTMenUSzonemaps{\DTMenUShawaiialeutianzonemaps}%
1573 \DTMenUShawaiialeutianzonemaps
1574 \or
1575 % aleutian
1576 \appto\DTMenUSzonemaps{\DTMenUShawaiialeutianzonemaps}%
1577 \DTMenUShawaiialeutianzonemaps
1578 \or
1579 % samoa
1580 \appto\DTMenUSzonemaps{\DTMenUSsamoazonemaps}%
1581 \DTMenUSsamoazonemaps
1582 \or
1583 % chamorro
1584 \appto\DTMenUSzonemaps{\DTMenUSchamorrozonemaps}%
1585 \DTMenUSchamorrozonemaps
1586 \or
1587 % clear
1588 \renewcommand*{\DTMenUSzonemaps}{}%
1589 \DTMclearmap{-3}{0}%
1590 \DTMclearmap{-4}{0}%
1591 \DTMclearmap{-5}{0}%
1592 \DTMclearmap{-6}{0}%
1593 \DTMclearmap{-7}{0}%
1594 \DTMclearmap{-8}{0}%
1595 \DTMclearmap{-9}{0}%
1596 \DTMclearmap{-10}{0}%
1597 \DTMclearmap{-11}{0}%
1598 \DTMclearmap{10}{0}%
1599 \fi
1600 }
1601 % \end{macrocode}
1602 %
1603 %
1604 % Define the "en-US" style. Hiding the day of month is a bit awkward
1605 % as the default day-year separator has a comma that should
1606 % disappear if the day number is missing so the month-day separator
1607 % is used as the month-year separator if the day is missing.
1608 %\changes{1.02}{2016-01-18}{added support for showdow option}
1609 % \begin{macrocode}
1610 \DTMnewstyle
1611 {en-US}% label
1612 {% date style
1613 \renewcommand*{\DTMenglishfmtordsuffix}{\DTMenUSfmtordsuffix}%
1614 \renewcommand*\DTMdisplaydate[4]{%
1615 % \end{macrocode}
1616 % Support for \opt{showdow} added in v1.02 (thanks to Alan Munn).
1617 % \begin{macrocode}
1618 \ifDTMshowdow
1619 \ifnum##4>-1 % space intended
1620 \DTMifbool{en-US}{abbr}%
1621 {\DTMenglishshortweekdayname{##4}}%
1622 {\DTMenglishweekdayname{##4}}%
1623 \DTMenUSdowmonthsep
1624 \fi
1625 \fi
1626 \DTMifbool{en-US}{abbr}%
1627 {\DTMenglishshortmonthname{##2}}%
1628 {\DTMenglishmonthname{##2}}%
1629 \DTMifbool{en-US}{showdayofmonth}%
1630 {%
1631 \DTMenUSmonthdaysep
1632 \DTMenglishordinal{##3}%
1633 \DTMifbool{en-US}{showyear}%
1634 {%
1635 \DTMenUSdayyearsep
1636 \number##1 % space intended
1637 }%
1638 {}%
1639 }%
1640 {%
1641 \DTMifbool{en-US}{showyear}%
1642 {%
1643 \DTMenUSmonthdaysep
1644 \number##1 % space intended
1645 }%
1646 {}%
1647 }%
1648 }%
1649 \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
1650 }%
1651 {% time style
1652 \renewcommand*\DTMenglishtimesep{\DTMenUStimesep}%
1653 \DTMsettimestyle{englishampm}%
1654 }%
1655 {% zone style
1656 \DTMresetzones
1657 \DTMenUSzonemaps
1658 \renewcommand*{\DTMdisplayzone}[2]{%
1659 \DTMifbool{en-US}{mapzone}%
1660 {\DTMusezonemapordefault{##1}{##2}}%
1661 {%
1662 \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
1663 \ifDTMshowzoneminutes\DTMenUStimesep\DTMtwodigits{##2}\fi
1664 }%
1665 }%
1666 }%
1667 {% full style
1668 \renewcommand*{\DTMdisplay}[9]{%
1669 \ifDTMshowdate
1670 \DTMdisplaydate{##1}{##2}{##3}{##4}%
1671 \DTMenUSdatetimesep
1672 \fi
1673 \DTMdisplaytime{##5}{##6}{##7}%
1674 \ifDTMshowzone
1675 \DTMenUStimezonesep
1676 \DTMdisplayzone{##8}{##9}%
1677 \fi
1678 }%
1679 \renewcommand*{\DTMDisplay}{\DTMdisplay}%
1680 }%
1681 % \end{macrocode}
1682 %
1683 % Define numeric style.
1684 % \begin{macrocode}
1685 \DTMnewstyle
1686 {en-US-numeric}% label
1687 {% date style
1688 \renewcommand*\DTMdisplaydate[4]{%
1689 \number##2 % space intended
1690 \DTMifbool{en-US}{showdayofmonth}%
1691 {%
1692 \DTMenUSdatesep
1693 \number##3 % space intended
1694 }%
1695 {}%
1696 \DTMifbool{en-US}{showyear}%
1697 {%
1698 \DTMenUSdatesep
1699 \number##1 % space intended
1700 }%
1701 {}%
1702 }%
1703 \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
1704 }%
1705 {% time style
1706 \renewcommand*\DTMdisplaytime[3]{%
1707 \number##1
1708 \DTMenUStimesep\DTMtwodigits{##2}%
1709 \ifDTMshowseconds\DTMenUStimesep\DTMtwodigits{##3}\fi
1710 }%
1711 }%
1712 {% zone style
1713 \DTMresetzones
1714 \DTMenUSzonemaps
1715 \renewcommand*{\DTMdisplayzone}[2]{%
1716 \DTMifbool{en-US}{mapzone}%
1717 {\DTMusezonemapordefault{##1}{##2}}%
1718 {%
1719 \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
1720 \ifDTMshowzoneminutes\DTMenUStimesep\DTMtwodigits{##2}\fi
1721 }%
1722 }%
1723 }%
1724 {% full style
1725 \renewcommand*{\DTMdisplay}[9]{%
1726 \ifDTMshowdate
1727 \DTMdisplaydate{##1}{##2}{##3}{##4}%
1728 \DTMenUSdatetimesep
1729 \fi
1730 \DTMdisplaytime{##5}{##6}{##7}%
1731 \ifDTMshowzone
1732 \DTMenUStimezonesep
1733 \DTMdisplayzone{##8}{##9}%
1734 \fi
1735 }%
1736 \renewcommand*{\DTMDisplay}{\DTMdisplay}%
1737 }
1738 % \end{macrocode}
1739 %
1740 %\begin{macro}{\DTMenUSzonemaps}
1741 % The time zone mappings are set through this command, which can be
1742 % redefined if extra mappings are required or mappings need to be
1743 % removed. (These don't take daylight saving into account.)
1744 % \begin{macrocode}
1745 \newcommand*{\DTMenUSzonemaps}{%
1746 \DTMdefzonemap{-3}{00}{ADT}%
1747 \DTMdefzonemap{-4}{00}{AST}%
1748 \DTMdefzonemap{-5}{00}{EST}%
1749 \DTMdefzonemap{-6}{00}{CST}%
1750 \DTMdefzonemap{-7}{00}{MST}%
1751 \DTMdefzonemap{-8}{00}{PST}%
1752 }
1753 % \end{macrocode}
1754 %\end{macro}
1755 %
1756 %\begin{macro}{\DTMenUSstdzonemaps}
1757 % Just the standard time zone mappings.
1758 %\changes{1.03}{2016-01-23}{new}
1759 % \begin{macrocode}
1760 \newcommand*{\DTMenUSstdzonemaps}{%
1761 \DTMdefzonemap{-4}{00}{AST}%
1762 \DTMdefzonemap{-5}{00}{EST}%
1763 \DTMdefzonemap{-6}{00}{CST}%
1764 \DTMdefzonemap{-7}{00}{MST}%
1765 \DTMdefzonemap{-8}{00}{PST}%
1766 \DTMdefzonemap{-9}{00}{AKST}%
1767 \DTMdefzonemap{-10}{00}{HAST}%
1768 \DTMdefzonemap{-11}{00}{SST}%
1769 \DTMdefzonemap{10}{00}{ChST}%
1770 }
1771 % \end{macrocode}
1772 %\end{macro}
1773 %
1774 %\begin{macro}{\DTMenUSdstzonemaps}
1775 % Just daylight saving mappings.
1776 %\changes{1.03}{2016-01-23}{new}
1777 % \begin{macrocode}
1778 \newcommand*{\DTMenUSdstzonemaps}{%
1779 \DTMdefzonemap{-3}{00}{ADT}%
1780 \DTMdefzonemap{-4}{00}{EDT}%
1781 \DTMdefzonemap{-5}{00}{CDT}%
1782 \DTMdefzonemap{-6}{00}{MDT}%
1783 \DTMdefzonemap{-7}{00}{PDT}%
1784 \DTMdefzonemap{-8}{00}{AKDT}%
1785 \DTMdefzonemap{-9}{00}{HADT}%
1786 }
1787 % \end{macrocode}
1788 %\end{macro}
1789 %
1790 %\begin{macro}{\DTMenUSatlanticzonemaps}
1791 % Just the Atlantic zone mappings (AST and ADT).
1792 %\changes{1.03}{2016-01-23}{new}
1793 % \begin{macrocode}
1794 \newcommand*{\DTMenUSatlanticzonemaps}{%
1795 \DTMdefzonemap{-4}{00}{AST}%
1796 \DTMdefzonemap{-3}{00}{ADT}%
1797 }
1798 % \end{macrocode}
1799 %\end{macro}
1800 %
1801 %\begin{macro}{\DTMenUSeasternzonemaps}
1802 % Just the Eastern zone mappings (EST and EDT).
1803 %\changes{1.03}{2016-01-23}{new}
1804 % \begin{macrocode}
1805 \newcommand*{\DTMenUSeasternzonemaps}{%
1806 \DTMdefzonemap{-5}{00}{EST}%
1807 \DTMdefzonemap{-4}{00}{EDT}%
1808 }
1809 % \end{macrocode}
1810 %\end{macro}
1811 %
1812 %\begin{macro}{\DTMenUScentralzonemaps}
1813 % Just the Central zone mappings (CST and CDT).
1814 %\changes{1.03}{2016-01-23}{new}
1815 % \begin{macrocode}
1816 \newcommand*{\DTMenUScentralzonemaps}{%
1817 \DTMdefzonemap{-6}{00}{CST}%
1818 \DTMdefzonemap{-5}{00}{CDT}%
1819 }
1820 % \end{macrocode}
1821 %\end{macro}
1822 %
1823 %\begin{macro}{\DTMenUSmountainzonemaps}
1824 % Just the Mountain zone mappings (MST and MDT).
1825 %\changes{1.03}{2016-01-23}{new}
1826 % \begin{macrocode}
1827 \newcommand*{\DTMenUSmountainzonemaps}{%
1828 \DTMdefzonemap{-7}{00}{MST}%
1829 \DTMdefzonemap{-6}{00}{MDT}%
1830 }
1831 % \end{macrocode}
1832 %\end{macro}
1833 %
1834 %\begin{macro}{\DTMenUSpacificzonemaps}
1835 % Just the Pacific zone mappings (PST and PDT).
1836 %\changes{1.03}{2016-01-23}{new}
1837 % \begin{macrocode}
1838 \newcommand*{\DTMenUSpacificzonemaps}{%
1839 \DTMdefzonemap{-8}{00}{PST}%
1840 \DTMdefzonemap{-7}{00}{PDT}%
1841 }
1842 % \end{macrocode}
1843 %\end{macro}
1844 %
1845 %\begin{macro}{\DTMenUSalaskazonemaps}
1846 % Just the Alaska zone mappings (AKST and AKDT).
1847 %\changes{1.03}{2016-01-23}{new}
1848 % \begin{macrocode}
1849 \newcommand*{\DTMenUSalaskazonemaps}{%
1850 \DTMdefzonemap{-9}{00}{AKST}%
1851 \DTMdefzonemap{-8}{00}{AKDT}%
1852 }
1853 % \end{macrocode}
1854 %\end{macro}
1855 %
1856 %\begin{macro}{\DTMenUShawaiialeutianzonemaps}
1857 % Just the Hawaii-Aleutian zone mappings (HAST and HADT).
1858 %\changes{1.03}{2016-01-23}{new}
1859 % \begin{macrocode}
1860 \newcommand*{\DTMenUShawaiialeutianzonemaps}{%
1861 \DTMdefzonemap{-10}{00}{HAST}%
1862 \DTMdefzonemap{-9}{00}{HADT}%
1863 }
1864 % \end{macrocode}
1865 %\end{macro}
1866 %
1867 %\begin{macro}{\DTMenUSsamoazonemaps}
1868 % Just the Samoa standard time (SST).
1869 %\changes{1.03}{2016-01-23}{new}
1870 % \begin{macrocode}
1871 \newcommand*{\DTMenUSsamoazonemaps}{%
1872 \DTMdefzonemap{-11}{00}{SST}%
1873 }
1874 % \end{macrocode}
1875 %\end{macro}
1876 %
1877 %\begin{macro}{\DTMenUSchamorrozonemaps}
1878 % Just the Chamorro standard time (ChST).
1879 %\changes{1.03}{2016-01-23}{new}
1880 % \begin{macrocode}
1881 \newcommand*{\DTMenUSchamorrozonemaps}{%
1882 \DTMdefzonemap{10}{00}{ChST}%
1883 }
1884 % \end{macrocode}
1885 %\end{macro}
1886 %
1887 %
1888 % Switch style according to the \opt{useregional} setting.
1889 % \begin{macrocode}
1890 \DTMifcaseregional
1891 {}% do nothing
1892 {\DTMsetstyle{en-US}}%
1893 {\DTMsetstyle{en-US-numeric}}%
1894 % \end{macrocode}
1895 %
1896 % Redefine \cs{dateenglish} (or \cs{date}\meta{dialect}) to prevent
1897 % \sty{babel} from resetting \cs{today}. (For this to work,
1898 % \sty{babel} must already have been loaded if it's required.)
1899 % \begin{macrocode}
1900 \ifcsundef{date\CurrentTrackedDialect}
1901 {% do nothing
1902 \ifundef\dateenglish
1903 {%
1904 }%
1905 {%
1906 \def\dateenglish{%
1907 \DTMifcaseregional
1908 {}% do nothing
1909 {\DTMsetstyle{en-US}}%
1910 {\DTMsetstyle{en-US-numeric}}%
1911 }%
1912 }%
1913 }%
1914 {%
1915 \csdef{date\CurrentTrackedDialect}{%
1916 \DTMifcaseregional
1917 {}% do nothing
1918 {\DTMsetstyle{en-US}}%
1919 {\DTMsetstyle{en-US-numeric}}%
1920 }%
1921 }%
1922 % \end{macrocode}
1923 %
1924 %\iffalse
1925 % \begin{macrocode}
1926 %</datetime2-en-US.ldf>
1927 % \end{macrocode}
1928 %\fi
1929 %\subsection{English (Canada) Code (\texttt{datetime2-en-CA.ldf})}
1930 %This file contains the Canadian English style. This is very similar
1931 %to the US style.
1932 %\changes{1.0}{2015-03-24}{Initial release}
1933 %\iffalse
1934 % \begin{macrocode}
1935 %<*datetime2-en-CA.ldf>
1936 % \end{macrocode}
1937 %\fi
1938 %
1939 % Identify this module.
1940 % \begin{macrocode}
1941 \ProvidesDateTimeModule{en-CA}[2019/10/21 v1.05 (NLCT)]
1942 % \end{macrocode}
1943 % Load base English module.
1944 % \begin{macrocode}
1945 \RequireDateTimeModule{english-base}
1946 % \end{macrocode}
1947 %
1948 % Allow the user a way of configuring the "en-CA" and
1949 % "en-CA-numeric" formats. This doesn't use the package wide separators such as
1950 % \cs{dtm@datetimesep} in case other date formats are also required.
1951 %\begin{macro}{\DTMenCAmonthdaysep}
1952 % The separator between the month and day for the text format.
1953 % \begin{macrocode}
1954 \newcommand*{\DTMenCAmonthdaysep}{\space}
1955 % \end{macrocode}
1956 %\end{macro}
1957 %
1958 %\begin{macro}{\DTMenCAdowmonthsep}
1959 % The separator between the day of week name and the month for the text format.
1960 % (New to version 1.02.)
1961 %\changes{1.02}{2016-01-18}{new}
1962 % \begin{macrocode}
1963 \newcommand*{\DTMenCAdowmonthsep}{\space}
1964 % \end{macrocode}
1965 %\end{macro}
1966 %
1967 %\begin{macro}{\DTMenCAdayyearsep}
1968 % The separator between the day and year for the text format.
1969 % \begin{macrocode}
1970 \newcommand*{\DTMenCAdayyearsep}{,\space}
1971 % \end{macrocode}
1972 %\end{macro}
1973 %
1974 %\begin{macro}{\DTMenCAdatetimesep}
1975 % The separator between the date and time blocks in the full format
1976 % (either text or numeric).
1977 % \begin{macrocode}
1978 \newcommand*{\DTMenCAdatetimesep}{\space}
1979 % \end{macrocode}
1980 %\end{macro}
1981 %
1982 %\begin{macro}{\DTMenCAtimezonesep}
1983 % The separator between the time and zone blocks in the full format
1984 % (either text or numeric).
1985 % \begin{macrocode}
1986 \newcommand*{\DTMenCAtimezonesep}{\space}
1987 % \end{macrocode}
1988 %\end{macro}
1989 %
1990 %\begin{macro}{\DTMenCAdatesep}
1991 % The separator for the numeric date format.
1992 % \begin{macrocode}
1993 \newcommand*{\DTMenCAdatesep}{/}
1994 % \end{macrocode}
1995 %\end{macro}
1996 %
1997 %\begin{macro}{\DTMenCAtimesep}
1998 % The separator for the numeric time format.
1999 % \begin{macrocode}
2000 \newcommand*{\DTMenCAtimesep}{:}
2001 % \end{macrocode}
2002 %\end{macro}
2003 %
2004 %Provide keys that can be used in \cs{DTMlangsetup} to set these
2005 %separators.
2006 % \begin{macrocode}
2007 \DTMdefkey{en-CA}{monthdaysep}{\renewcommand*{\DTMenCAmonthdaysep}{#1}}
2008 \DTMdefkey{en-CA}{dowmonthsep}{\renewcommand*{\DTMenCAdowmonthsep}{#1}}
2009 \DTMdefkey{en-CA}{dayyearsep}{\renewcommand*{\DTMenCAdayyearsep}{#1}}
2010 \DTMdefkey{en-CA}{datetimesep}{\renewcommand*{\DTMenCAdatetimesep}{#1}}
2011 \DTMdefkey{en-CA}{timezonesep}{\renewcommand*{\DTMenCAtimezonesep}{#1}}
2012 \DTMdefkey{en-CA}{datesep}{\renewcommand*{\DTMenCAdatesep}{#1}}
2013 \DTMdefkey{en-CA}{timesep}{\renewcommand*{\DTMenCAtimesep}{#1}}
2014 % \end{macrocode}
2015 %
2016 % Define a boolean key that can switch between full and abbreviated
2017 % formats for the month and day of week names in the text format.
2018 % \begin{macrocode}
2019 \DTMdefboolkey{en-CA}{abbr}[true]{}
2020 % \end{macrocode}
2021 % The default is the full name.
2022 % \begin{macrocode}
2023 \DTMsetbool{en-CA}{abbr}{false}
2024 % \end{macrocode}
2025 %
2026 % Define a boolean key that determines if the time zone mappings
2027 % should be used.
2028 % \begin{macrocode}
2029 \DTMdefboolkey{en-CA}{mapzone}[true]{}
2030 % \end{macrocode}
2031 % The default is no mappings.
2032 % \begin{macrocode}
2033 \DTMsetbool{en-CA}{mapzone}{false}
2034 % \end{macrocode}
2035 %
2036 % Define a boolean key that determines whether to show or hide the
2037 % day of the month. (Called "showdayofmonth" instead of "showday" to
2038 % avoid confusion with the day of the week.)
2039 % \begin{macrocode}
2040 \DTMdefboolkey{en-CA}{showdayofmonth}[true]{}
2041 % \end{macrocode}
2042 % The default is to show the day of the month.
2043 % \begin{macrocode}
2044 \DTMsetbool{en-CA}{showdayofmonth}{true}
2045 % \end{macrocode}
2046 %
2047 % Define a boolean key that determines whether to show or hide the
2048 % year.
2049 % \begin{macrocode}
2050 \DTMdefboolkey{en-CA}{showyear}[true]{}
2051 % \end{macrocode}
2052 % The default is to show the year.
2053 % \begin{macrocode}
2054 \DTMsetbool{en-CA}{showyear}{true}
2055 % \end{macrocode}
2056 %
2057 %\begin{macro}{\DTMenCAfmtordsuffix}
2058 % Define the ordinal suffix to be used by this style.
2059 % \begin{macrocode}
2060 \newcommand*{\DTMenCAfmtordsuffix}[1]{}
2061 % \end{macrocode}
2062 %\end{macro}
2063 %
2064 % Define a setting to change the ordinal suffix style.
2065 %\changes{1.05}{2019-10-21}{renamed scratch variables}
2066 % \begin{macrocode}
2067 \DTMdefchoicekey{en-CA}{ord}[\@dtm@val\@dtm@nr]{level,raise,omit,sc}{%
2068 \ifcase\@dtm@nr\relax
2069 \renewcommand*{\DTMenCAfmtordsuffix}[1]{##1}%
2070 \or
2071 \renewcommand*{\DTMenCAfmtordsuffix}[1]{%
2072 \DTMtexorpdfstring{\protect\textsuperscript{##1}}{##1}}%
2073 \or
2074 \renewcommand*{\DTMenCAfmtordsuffix}[1]{}%
2075 \or
2076 \renewcommand*{\DTMenCAfmtordsuffix}[1]{%
2077 \DTMtexorpdfstring{\protect\textsc{##1}}{##1}}%
2078 \fi
2079 }
2080 % \end{macrocode}
2081 %
2082 % Define a setting to change zone mappings.
2083 %\changes{1.03}{2016-01-23}{added zone option to en-CA}
2084 %\changes{1.05}{2019-10-21}{renamed scratch variables}
2085 % \begin{macrocode}
2086 \DTMdefchoicekey{en-CA}{zone}[\@dtm@val\@dtm@nr]%
2087 {std,standard,dst,daylight,newfoundland,atlantic,eastern,central,mountain,%
2088 pacific,clear}%
2089 {%
2090 \ifcase\@dtm@nr\relax
2091 % std
2092 \appto\DTMenCAzonemaps{\DTMenCAstdzonemaps}%
2093 \DTMenCAstdzonemaps
2094 \or
2095 % standard
2096 \appto\DTMenCAzonemaps{\DTMenCAstdzonemaps}%
2097 \DTMenCAstdzonemaps
2098 \or
2099 % dst
2100 \appto\DTMenCAzonemaps{\DTMenCAdstzonemaps}%
2101 \DTMenCAdstzonemaps
2102 \or
2103 % daylight
2104 \appto\DTMenCAzonemaps{\DTMenCAdstzonemaps}%
2105 \DTMenCAdstzonemaps
2106 \or
2107 % newfoundland
2108 \appto\DTMenCAzonemaps{\DTMenCAnewfoundlandzonemaps}%
2109 \DTMenCAnewfoundlandzonemaps
2110 \or
2111 % atlantic
2112 \appto\DTMenCAzonemaps{\DTMenCAatlanticzonemaps}%
2113 \DTMenCAatlanticzonemaps
2114 \or
2115 % eastern
2116 \appto\DTMenCAzonemaps{\DTMenCAeasternzonemaps}%
2117 \DTMenCAeasternzonemaps
2118 \or
2119 % central
2120 \appto\DTMenCAzonemaps{\DTMenCAcentralzonemaps}%
2121 \DTMenCAcentralzonemaps
2122 \or
2123 % mountain
2124 \appto\DTMenCAzonemaps{\DTMenCAmountainzonemaps}%
2125 \DTMenCAmountainzonemaps
2126 \or
2127 % pacific
2128 \appto\DTMenCAzonemaps{\DTMenCApacificzonemaps}%
2129 \DTMenCApacificzonemaps
2130 \or
2131 % clear
2132 \renewcommand*{\DTMenCAzonemaps}{}%
2133 \DTMclearmap{-2}{30}%
2134 \DTMclearmap{-3}{30}%
2135 \DTMclearmap{-3}{0}%
2136 \DTMclearmap{-4}{0}%
2137 \DTMclearmap{-5}{0}%
2138 \DTMclearmap{-6}{0}%
2139 \DTMclearmap{-7}{0}%
2140 \DTMclearmap{-8}{0}%
2141 \fi
2142 }
2143 % \end{macrocode}
2144 %
2145 % Define the "en-CA" style (similar to "en-US").
2146 % \begin{macrocode}
2147 \DTMnewstyle
2148 {en-CA}% label
2149 {% date style
2150 \renewcommand*{\DTMenglishfmtordsuffix}{\DTMenCAfmtordsuffix}%
2151 \renewcommand*\DTMdisplaydate[4]{%
2152 % \end{macrocode}
2153 % Support for \opt{showdow} added in v1.02 (thanks to Alan Munn).
2154 % \begin{macrocode}
2155 \ifDTMshowdow
2156 \ifnum##4>-1 % space intended
2157 \DTMifbool{en-CA}{abbr}%
2158 {\DTMenglishshortweekdayname{##4}}%
2159 {\DTMenglishweekdayname{##4}}%
2160 \DTMenCAdowmonthsep
2161 \fi
2162 \fi
2163 \DTMifbool{en-CA}{abbr}%
2164 {\DTMenglishshortmonthname{##2}}%
2165 {\DTMenglishmonthname{##2}}%
2166 \DTMifbool{en-CA}{showdayofmonth}%
2167 {%
2168 \DTMenCAmonthdaysep
2169 \DTMenglishordinal{##3}%
2170 \DTMifbool{en-CA}{showyear}%
2171 {%
2172 \DTMenCAdayyearsep
2173 \number##1 % intended
2174 }%
2175 {}%
2176 }%
2177 {%
2178 \DTMifbool{en-CA}{showyear}%
2179 {%
2180 \DTMenCAmonthdaysep
2181 \number##1 % intended
2182 }%
2183 {}%
2184 }%
2185 }%
2186 \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
2187 }%
2188 {% time style
2189 \renewcommand*\DTMenglishtimesep{\DTMenCAtimesep}%
2190 \DTMsettimestyle{englishampm}%
2191 }%
2192 {% zone style
2193 \DTMresetzones
2194 \DTMenCAzonemaps
2195 \renewcommand*{\DTMdisplayzone}[2]{%
2196 \DTMifbool{en-CA}{mapzone}%
2197 {\DTMusezonemapordefault{##1}{##2}}%
2198 {%
2199 \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
2200 \ifDTMshowzoneminutes\DTMenCAtimesep\DTMtwodigits{##2}\fi
2201 }%
2202 }%
2203 }%
2204 {% full style
2205 \renewcommand*{\DTMdisplay}[9]{%
2206 \ifDTMshowdate
2207 \DTMdisplaydate{##1}{##2}{##3}{##4}%
2208 \DTMenCAdatetimesep
2209 \fi
2210 \DTMdisplaytime{##5}{##6}{##7}%
2211 \ifDTMshowzone
2212 \DTMenCAtimezonesep
2213 \DTMdisplayzone{##8}{##9}%
2214 \fi
2215 }%
2216 \renewcommand*{\DTMDisplay}{\DTMdisplay}%
2217 }%
2218 % \end{macrocode}
2219 %
2220 % Define numeric style.
2221 % \begin{macrocode}
2222 \DTMnewstyle
2223 {en-CA-numeric}% label
2224 {% date style
2225 \renewcommand*\DTMdisplaydate[4]{%
2226 \number##2 % space intended
2227 \DTMifbool{en-CA}{showdayofmonth}%
2228 {%
2229 \DTMenCAdatesep
2230 \number##3 % space intended
2231 }%
2232 {}%
2233 \DTMifbool{en-CA}{showyear}%
2234 {%
2235 \DTMenCAdatesep
2236 \number##1 % space intended
2237 }%
2238 {}%
2239 }%
2240 \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
2241 }%
2242 {% time style
2243 \renewcommand*\DTMdisplaytime[3]{%
2244 \number##1
2245 \DTMenCAtimesep\DTMtwodigits{##2}%
2246 \ifDTMshowseconds\DTMenCAtimesep\DTMtwodigits{##3}\fi
2247 }%
2248 }%
2249 {% zone style
2250 \DTMresetzones
2251 \DTMenCAzonemaps
2252 \renewcommand*{\DTMdisplayzone}[2]{%
2253 \DTMifbool{en-CA}{mapzone}%
2254 {\DTMusezonemapordefault{##1}{##2}}%
2255 {%
2256 \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
2257 \ifDTMshowzoneminutes\DTMenCAtimesep\DTMtwodigits{##2}\fi
2258 }%
2259 }%
2260 }%
2261 {% full style
2262 \renewcommand*{\DTMdisplay}[9]{%
2263 \ifDTMshowdate
2264 \DTMdisplaydate{##1}{##2}{##3}{##4}%
2265 \DTMenCAdatetimesep
2266 \fi
2267 \DTMdisplaytime{##5}{##6}{##7}%
2268 \ifDTMshowzone
2269 \DTMenCAtimezonesep
2270 \DTMdisplayzone{##8}{##9}%
2271 \fi
2272 }%
2273 \renewcommand*{\DTMDisplay}{\DTMdisplay}%
2274 }
2275 % \end{macrocode}
2276 %
2277 %\begin{macro}{\DTMenCAzonemaps}
2278 % The time zone mappings are set through this command, which can be
2279 % redefined if extra mappings are required or mappings need to be
2280 % removed. (These don't take daylight saving into account, except
2281 % for NDT.)
2282 % \begin{macrocode}
2283 \newcommand*{\DTMenCAzonemaps}{%
2284 \DTMdefzonemap{-2}{30}{NDT}%
2285 \DTMdefzonemap{-3}{30}{NST}%
2286 \DTMdefzonemap{-4}{00}{AST}%
2287 \DTMdefzonemap{-5}{00}{EST}%
2288 \DTMdefzonemap{-6}{00}{CST}%
2289 \DTMdefzonemap{-7}{00}{MST}%
2290 \DTMdefzonemap{-8}{00}{PST}%
2291 }
2292 % \end{macrocode}
2293 %\end{macro}
2294 %
2295 %\begin{macro}{\DTMenCAstdzonemaps}
2296 % Just the standard time zone mappings.
2297 %\changes{1.03}{2016-01-23}{new}
2298 % \begin{macrocode}
2299 \newcommand*{\DTMenCAstdzonemaps}{%
2300 \DTMdefzonemap{-3}{30}{NST}%
2301 \DTMdefzonemap{-4}{00}{AST}%
2302 \DTMdefzonemap{-5}{00}{EST}%
2303 \DTMdefzonemap{-6}{00}{CST}%
2304 \DTMdefzonemap{-7}{00}{MST}%
2305 \DTMdefzonemap{-8}{00}{PST}%
2306 }
2307 % \end{macrocode}
2308 %\end{macro}
2309 %
2310 %\begin{macro}{\DTMenCAdstzonemaps}
2311 % Just daylight saving mappings.
2312 %\changes{1.03}{2016-01-23}{new}
2313 % \begin{macrocode}
2314 \newcommand*{\DTMenCAdstzonemaps}{%
2315 \DTMdefzonemap{-2}{30}{NDT}%
2316 \DTMdefzonemap{-3}{00}{ADT}%
2317 \DTMdefzonemap{-4}{00}{EDT}%
2318 \DTMdefzonemap{-5}{00}{CDT}%
2319 \DTMdefzonemap{-6}{00}{MDT}%
2320 \DTMdefzonemap{-7}{00}{PDT}%
2321 }
2322 % \end{macrocode}
2323 %\end{macro}
2324 %
2325 %\begin{macro}{\DTMenCAnewfoundlandzonemaps}
2326 % Just the Newfoundland zone mappings (NST and NDT).
2327 %\changes{1.03}{2016-01-23}{new}
2328 % \begin{macrocode}
2329 \newcommand*{\DTMenCAnewfoundlandzonemaps}{%
2330 \DTMdefzonemap{-3}{30}{NST}%
2331 \DTMdefzonemap{-2}{30}{NDT}%
2332 }
2333 % \end{macrocode}
2334 %\end{macro}
2335 %
2336 %\begin{macro}{\DTMenCAatlanticzonemaps}
2337 % Just the Atlantic zone mappings (AST and ADT).
2338 %\changes{1.03}{2016-01-23}{new}
2339 % \begin{macrocode}
2340 \newcommand*{\DTMenCAatlanticzonemaps}{%
2341 \DTMdefzonemap{-4}{00}{AST}%
2342 \DTMdefzonemap{-3}{00}{ADT}%
2343 }
2344 % \end{macrocode}
2345 %\end{macro}
2346 %
2347 %\begin{macro}{\DTMenCAeasternzonemaps}
2348 % Just the Eastern zone mappings (EST and EDT).
2349 %\changes{1.03}{2016-01-23}{new}
2350 % \begin{macrocode}
2351 \newcommand*{\DTMenCAeasternzonemaps}{%
2352 \DTMdefzonemap{-5}{00}{EST}%
2353 \DTMdefzonemap{-4}{00}{EDT}%
2354 }
2355 % \end{macrocode}
2356 %\end{macro}
2357 %
2358 %\begin{macro}{\DTMenCAcentralzonemaps}
2359 % Just the Central zone mappings (CST and CDT).
2360 %\changes{1.03}{2016-01-23}{new}
2361 % \begin{macrocode}
2362 \newcommand*{\DTMenCAcentralzonemaps}{%
2363 \DTMdefzonemap{-6}{00}{CST}%
2364 \DTMdefzonemap{-5}{00}{CDT}%
2365 }
2366 % \end{macrocode}
2367 %\end{macro}
2368 %
2369 %\begin{macro}{\DTMenCAmountainzonemaps}
2370 % Just the Mountain zone mappings (MST and MDT).
2371 %\changes{1.03}{2016-01-23}{new}
2372 % \begin{macrocode}
2373 \newcommand*{\DTMenCAmountainzonemaps}{%
2374 \DTMdefzonemap{-7}{00}{MST}%
2375 \DTMdefzonemap{-6}{00}{MDT}%
2376 }
2377 % \end{macrocode}
2378 %\end{macro}
2379 %
2380 %\begin{macro}{\DTMenCApacificzonemaps}
2381 % Just the Pacific zone mappings (PST and PDT).
2382 %\changes{1.03}{2016-01-23}{new}
2383 % \begin{macrocode}
2384 \newcommand*{\DTMenCApacificzonemaps}{%
2385 \DTMdefzonemap{-8}{00}{PST}%
2386 \DTMdefzonemap{-7}{00}{PDT}%
2387 }
2388 % \end{macrocode}
2389 %\end{macro}
2390 %
2391 %
2392 % Switch style according to the \opt{useregional} setting.
2393 % \begin{macrocode}
2394 \DTMifcaseregional
2395 {}% do nothing
2396 {\DTMsetstyle{en-CA}}%
2397 {\DTMsetstyle{en-CA-numeric}}%
2398 % \end{macrocode}
2399 %
2400 % Redefine \cs{dateenglish} (or \cs{date}\meta{dialect}) to prevent
2401 % \sty{babel} from resetting \cs{today}. (For this to work,
2402 % \sty{babel} must already have been loaded if it's required.)
2403 % \begin{macrocode}
2404 \ifcsundef{date\CurrentTrackedDialect}
2405 {% do nothing
2406 \ifundef\dateenglish
2407 {%
2408 }%
2409 {%
2410 \def\dateenglish{%
2411 \DTMifcaseregional
2412 {}% do nothing
2413 {\DTMsetstyle{en-CA}}%
2414 {\DTMsetstyle{en-CA-numeric}}%
2415 }%
2416 }%
2417 }%
2418 {%
2419 \csdef{date\CurrentTrackedDialect}{%
2420 \DTMifcaseregional
2421 {}% do nothing
2422 {\DTMsetstyle{en-CA}}%
2423 {\DTMsetstyle{en-CA-numeric}}%
2424 }%
2425 }%
2426 % \end{macrocode}
2427 %
2428 %\iffalse
2429 % \begin{macrocode}
2430 %</datetime2-en-CA.ldf>
2431 % \end{macrocode}
2432 %\fi
2433 %\subsection{English (Australia) Code (\texttt{datetime2-en-AU.ldf})}
2434 %This file contains the Australian English style.
2435 %\changes{1.0}{2015-03-24}{Initial release}
2436 %\iffalse
2437 % \begin{macrocode}
2438 %<*datetime2-en-AU.ldf>
2439 % \end{macrocode}
2440 %\fi
2441 %
2442 % Identify this module.
2443 % \begin{macrocode}
2444 \ProvidesDateTimeModule{en-AU}[2019/10/21 v1.05 (NLCT)]
2445 % \end{macrocode}
2446 % Load base English module.
2447 % \begin{macrocode}
2448 \RequireDateTimeModule{english-base}
2449 % \end{macrocode}
2450 %
2451 % Allow the user a way of configuring the "en-AU" and
2452 % "en-AU-numeric" styles. This doesn't use the package wide separators such as
2453 % \cs{dtm@datetimesep} in case other date formats are also required.
2454 %
2455 %\begin{macro}{\DTMenAUdowdaysep}
2456 %\changes{1.04}{2016-03-09}{new}
2457 % The separator between the day of week name and the day of month number for the
2458 % text format.
2459 % \begin{macrocode}
2460 \newcommand*{\DTMenAUdowdaysep}{\space}
2461 % \end{macrocode}
2462 %\end{macro}
2463 %
2464 %\begin{macro}{\DTMenAUdaymonthsep}
2465 % The separator between the day and month for the text format.
2466 % \begin{macrocode}
2467 \newcommand*{\DTMenAUdaymonthsep}{\space}
2468 % \end{macrocode}
2469 %\end{macro}
2470 %
2471 %\begin{macro}{\DTMenAUmonthyearsep}
2472 % The separator between the month and year for the text format.
2473 % \begin{macrocode}
2474 \newcommand*{\DTMenAUmonthyearsep}{\space}
2475 % \end{macrocode}
2476 %\end{macro}
2477 %
2478 %\begin{macro}{\DTMenAUdatetimesep}
2479 % The separator between the date and time blocks in the full format
2480 % (either text or numeric).
2481 % \begin{macrocode}
2482 \newcommand*{\DTMenAUdatetimesep}{\space}
2483 % \end{macrocode}
2484 %\end{macro}
2485 %
2486 %\begin{macro}{\DTMenAUtimezonesep}
2487 % The separator between the time and zone blocks in the full format
2488 % (either text or numeric).
2489 % \begin{macrocode}
2490 \newcommand*{\DTMenAUtimezonesep}{\space}
2491 % \end{macrocode}
2492 %\end{macro}
2493 %
2494 %\begin{macro}{\DTMenAUdatesep}
2495 % The separator for the numeric date format.
2496 % \begin{macrocode}
2497 \newcommand*{\DTMenAUdatesep}{/}
2498 % \end{macrocode}
2499 %\end{macro}
2500 %
2501 %\begin{macro}{\DTMenAUtimesep}
2502 % The separator for the numeric time format.
2503 % \begin{macrocode}
2504 \newcommand*{\DTMenAUtimesep}{:}
2505 % \end{macrocode}
2506 %\end{macro}
2507 %
2508 %Provide keys that can be used in \cs{DTMlangsetup} to set these
2509 %separators.
2510 % \begin{macrocode}
2511 \DTMdefkey{en-AU}{dowdaysep}{\renewcommand*{\DTMenAUdowdaysep}{#1}}
2512 \DTMdefkey{en-AU}{daymonthsep}{\renewcommand*{\DTMenAUdaymonthsep}{#1}}
2513 \DTMdefkey{en-AU}{monthyearsep}{\renewcommand*{\DTMenAUmonthyearsep}{#1}}
2514 \DTMdefkey{en-AU}{datetimesep}{\renewcommand*{\DTMenAUdatetimesep}{#1}}
2515 \DTMdefkey{en-AU}{timezonesep}{\renewcommand*{\DTMenAUtimezonesep}{#1}}
2516 \DTMdefkey{en-AU}{datesep}{\renewcommand*{\DTMenAUdatesep}{#1}}
2517 \DTMdefkey{en-AU}{timesep}{\renewcommand*{\DTMenAUtimesep}{#1}}
2518 % \end{macrocode}
2519 %
2520 % Define a boolean key that can switch between full and abbreviated
2521 % formats for the month and day of week names in the text format.
2522 % \begin{macrocode}
2523 \DTMdefboolkey{en-AU}{abbr}[true]{}
2524 % \end{macrocode}
2525 % The default is the full name.
2526 % \begin{macrocode}
2527 \DTMsetbool{en-AU}{abbr}{false}
2528 % \end{macrocode}
2529 %
2530 % Define a boolean key that determines if the time zone mappings
2531 % should be used.
2532 % \begin{macrocode}
2533 \DTMdefboolkey{en-AU}{mapzone}[true]{}
2534 % \end{macrocode}
2535 % The default is no mappings.
2536 % \begin{macrocode}
2537 \DTMsetbool{en-AU}{mapzone}{false}
2538 % \end{macrocode}
2539 %
2540 % Define a boolean key that determines whether to show or hide the
2541 % day of the month. (Called "showdayofmonth" instead of "showday" to
2542 % avoid confusion with the day of the week.)
2543 % \begin{macrocode}
2544 \DTMdefboolkey{en-AU}{showdayofmonth}[true]{}
2545 % \end{macrocode}
2546 % The default is to show the day of the month.
2547 % \begin{macrocode}
2548 \DTMsetbool{en-AU}{showdayofmonth}{true}
2549 % \end{macrocode}
2550 %
2551 % Define a boolean key that determines whether to show or hide the
2552 % year.
2553 % \begin{macrocode}
2554 \DTMdefboolkey{en-AU}{showyear}[true]{}
2555 % \end{macrocode}
2556 % The default is to show the year.
2557 % \begin{macrocode}
2558 \DTMsetbool{en-AU}{showyear}{true}
2559 % \end{macrocode}
2560 %
2561 %\begin{macro}{\DTMenAUfmtordsuffix}
2562 % Define the ordinal suffix to be used by this style.
2563 % \begin{macrocode}
2564 \newcommand*{\DTMenAUfmtordsuffix}[1]{}
2565 % \end{macrocode}
2566 %\end{macro}
2567 %
2568 % Define a setting to change the ordinal suffix style.
2569 %\changes{1.05}{2019-10-21}{renamed scratch variables}
2570 % \begin{macrocode}
2571 \DTMdefchoicekey{en-AU}{ord}[\@dtm@val\@dtm@nr]{level,raise,omit,sc}{%
2572 \ifcase\@dtm@nr\relax
2573 \renewcommand*{\DTMenAUfmtordsuffix}[1]{##1}%
2574 \or
2575 \renewcommand*{\DTMenAUfmtordsuffix}[1]{%
2576 \DTMtexorpdfstring{\protect\textsuperscript{##1}}{##1}}%
2577 \or
2578 \renewcommand*{\DTMenAUfmtordsuffix}[1]{}%
2579 \or
2580 \renewcommand*{\DTMenAUfmtordsuffix}[1]{%
2581 \DTMtexorpdfstring{\protect\textsc{##1}}{##1}}%
2582 \fi
2583 }
2584 % \end{macrocode}
2585 %
2586 % Define a setting to change zone mappings.
2587 %\changes{1.03}{2016-01-23}{added zone option to en-AU}
2588 %\changes{1.05}{2019-10-21}{renamed scratch variables}
2589 % \begin{macrocode}
2590 \DTMdefchoicekey{en-AU}{zone}[\@dtm@val\@dtm@nr]%
2591 {std,standard,dst,daylight,central,central-western,western%
2592 eastern,christmas,lord-howe,cocos,keeling,clear}%
2593 {%
2594 \ifcase\@dtm@nr\relax
2595 % std
2596 \appto\DTMenAUzonemaps{\DTMenAUstdzonemaps}%
2597 \DTMenAUstdzonemaps
2598 \or
2599 % standard
2600 \appto\DTMenAUzonemaps{\DTMenAUstdzonemaps}%
2601 \DTMenAUstdzonemaps
2602 \or
2603 % dst
2604 \appto\DTMenAUzonemaps{\DTMenAUdstzonemaps}%
2605 \DTMenAUdstzonemaps
2606 \or
2607 % daylight
2608 \appto\DTMenAUzonemaps{\DTMenAUdstzonemaps}%
2609 \DTMenAUdstzonemaps
2610 \or
2611 % central
2612 \appto\DTMenAUzonemaps{\DTMenAUcentralzonemaps}%
2613 \DTMenAUcentralzonemaps
2614 \or
2615 % central-western
2616 \appto\DTMenAUzonemaps{\DTMenAUcentralwesternzonemaps}%
2617 \DTMenAUcentralwesternzonemaps
2618 \or
2619 % western
2620 \appto\DTMenAUzonemaps{\DTMenAUwesternzonemaps}%
2621 \DTMenAUwesternzonemaps
2622 \or
2623 % eastern
2624 \appto\DTMenAUzonemaps{\DTMenAUeasternzonemaps}%
2625 \DTMenAUeasternzonemaps
2626 \or
2627 % christmas
2628 \appto\DTMenAUzonemaps{\DTMenAUchristmaszonemaps}%
2629 \DTMenAUchristmaszonemaps
2630 \or
2631 % lord-howe
2632 \appto\DTMenAUzonemaps{\DTMenAUlordhowezonemaps}%
2633 \DTMenAUlordhowezonemaps
2634 \or
2635 % norfolk
2636 \appto\DTMenAUzonemaps{\DTMenAUnorfolkzonemaps}%
2637 \DTMenAUnorfolkzonemaps
2638 \or
2639 % cocos
2640 \appto\DTMenAUzonemaps{\DTMenAUcocoszonemaps}%
2641 \DTMenAUcocoszonemaps
2642 \or
2643 % keeling
2644 \appto\DTMenAUzonemaps{\DTMenAUcocoszonemaps}%
2645 \DTMenAUcocoszonemaps
2646 \or
2647 % clear
2648 \renewcommand*{\DTMenAUzonemaps}{}%
2649 \DTMclearmap{6}{30}%
2650 \DTMclearmap{7}{00}%
2651 \DTMclearmap{8}{00}%
2652 \DTMclearmap{8}{45}%
2653 \DTMclearmap{9}{00}%
2654 \DTMclearmap{9}{30}%
2655 \DTMclearmap{10}{00}%
2656 \DTMclearmap{10}{30}%
2657 \DTMclearmap{11}{00}%
2658 \fi
2659 }
2660 % \end{macrocode}
2661 % Define the "en-AU" style.
2662 % \begin{macrocode}
2663 \DTMnewstyle
2664 {en-AU}% label
2665 {% date style
2666 \renewcommand*{\DTMenglishfmtordsuffix}{\DTMenAUfmtordsuffix}%
2667 \renewcommand*\DTMdisplaydate[4]{%
2668 \ifDTMshowdow
2669 \ifnum##4>-1 % space intended
2670 \DTMifbool{en-AU}{abbr}%
2671 {\DTMenglishshortweekdayname{##4}}%
2672 {\DTMenglishweekdayname{##4}}%
2673 \DTMenAUdowdaysep
2674 \fi
2675 \fi
2676 \DTMifbool{en-AU}{showdayofmonth}%
2677 {%
2678 \DTMenglishordinal{##3}%
2679 \DTMenAUdaymonthsep
2680 }%
2681 {}%
2682 \DTMifbool{en-AU}{abbr}%
2683 {\DTMenglishshortmonthname{##2}}%
2684 {\DTMenglishmonthname{##2}}%
2685 \DTMifbool{en-AU}{showyear}%
2686 {%
2687 \DTMenAUmonthyearsep\number##1 % space intended
2688 }%
2689 {}%
2690 }%
2691 \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
2692 }%
2693 {% time style
2694 \renewcommand*\DTMenglishtimesep{\DTMenAUtimesep}%
2695 \DTMsettimestyle{englishampm}%
2696 }%
2697 {% zone style
2698 \DTMresetzones
2699 \DTMenAUzonemaps
2700 \renewcommand*{\DTMdisplayzone}[2]{%
2701 \DTMifbool{en-AU}{mapzone}%
2702 {\DTMusezonemapordefault{##1}{##2}}%
2703 {%
2704 \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
2705 \ifDTMshowzoneminutes\DTMenAUtimesep\DTMtwodigits{##2}\fi
2706 }%
2707 }%
2708 }%
2709 {% full style
2710 \renewcommand*{\DTMdisplay}[9]{%
2711 \ifDTMshowdate
2712 \DTMdisplaydate{##1}{##2}{##3}{##4}%
2713 \DTMenAUdatetimesep
2714 \fi
2715 \DTMdisplaytime{##5}{##6}{##7}%
2716 \ifDTMshowzone
2717 \DTMenAUtimezonesep
2718 \DTMdisplayzone{##8}{##9}%
2719 \fi
2720 }%
2721 \renewcommand*{\DTMDisplay}{\DTMdisplay}%
2722 }%
2723 % \end{macrocode}
2724 %
2725 % Define numeric style.
2726 % \begin{macrocode}
2727 \DTMnewstyle
2728 {en-AU-numeric}% label
2729 {% date style
2730 \renewcommand*\DTMdisplaydate[4]{%
2731 \DTMifbool{en-AU}{showdayofmonth}%
2732 {%
2733 \number##3 % space intended
2734 \DTMenAUdatesep
2735 }%
2736 {}%
2737 \number##2 % space intended
2738 \DTMifbool{en-AU}{showyear}%
2739 {%
2740 \DTMenAUdatesep
2741 \number##1 % space intended
2742 }%
2743 {}%
2744 }%
2745 \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
2746 }%
2747 {% time style
2748 \renewcommand*\DTMdisplaytime[3]{%
2749 \number##1
2750 \DTMenAUtimesep\DTMtwodigits{##2}%
2751 \ifDTMshowseconds\DTMenAUtimesep\DTMtwodigits{##3}\fi
2752 }%
2753 }%
2754 {% zone style
2755 \DTMresetzones
2756 \DTMenAUzonemaps
2757 \renewcommand*{\DTMdisplayzone}[2]{%
2758 \DTMifbool{en-AU}{mapzone}%
2759 {\DTMusezonemapordefault{##1}{##2}}%
2760 {%
2761 \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
2762 \ifDTMshowzoneminutes\DTMenAUtimesep\DTMtwodigits{##2}\fi
2763 }%
2764 }%
2765 }%
2766 {% full style
2767 \renewcommand*{\DTMdisplay}[9]{%
2768 \ifDTMshowdate
2769 \DTMdisplaydate{##1}{##2}{##3}{##4}%
2770 \DTMenAUdatetimesep
2771 \fi
2772 \DTMdisplaytime{##5}{##6}{##7}%
2773 \ifDTMshowzone
2774 \DTMenAUtimezonesep
2775 \DTMdisplayzone{##8}{##9}%
2776 \fi
2777 }%
2778 \renewcommand*{\DTMDisplay}{\DTMdisplay}%
2779 }
2780 % \end{macrocode}
2781 %
2782 %\begin{macro}{\DTMenAUzonemaps}
2783 % The time zone mappings are set through this command, which can be
2784 % redefined if extra mappings are required or mappings need to be
2785 % removed.
2786 % \begin{macrocode}
2787 \newcommand*{\DTMenAUzonemaps}{%
2788 \DTMdefzonemap{10}{30}{ACDT}% Australian Central Daylight Time
2789 \DTMdefzonemap{11}{00}{AEDT}% Australian Eastern Daylight Time
2790 \DTMdefzonemap{9}{30}{ACST}% Australian Central Standard Time
2791 \DTMdefzonemap{8}{45}{ACWST}% Australian Central Western Standard Time
2792 \DTMdefzonemap{9}{00}{ACWDT}% Australian Central Western Daylight Time
2793 \DTMdefzonemap{10}{00}{AEDT}% Australian Eastern Standard Time
2794 \DTMdefzonemap{8}{00}{AWDT}% Australian Western Standard Time
2795 \DTMdefzonemap{7}{00}{CXT}% Christmas Island Time
2796 \DTMdefzonemap{11}{30}{NFT}% Norfolk Island Time
2797 }
2798 % \end{macrocode}
2799 %\end{macro}
2800 %
2801 %\begin{macro}{\DTMenAUstdzonemaps}
2802 % Just the standard time zone mappings.
2803 %\changes{1.03}{2016-01-23}{new}
2804 % \begin{macrocode}
2805 \newcommand*{\DTMenAUstdzonemaps}{%
2806 \DTMdefzonemap{6}{30}{CCT}%
2807 \DTMdefzonemap{7}{00}{CXT}%
2808 \DTMdefzonemap{9}{30}{ACST}%
2809 \DTMdefzonemap{8}{00}{AWST}%
2810 \DTMdefzonemap{8}{45}{ACWST}%
2811 \DTMdefzonemap{10}{00}{AEST}%
2812 \DTMdefzonemap{10}{30}{LHST}%
2813 \DTMdefzonemap{11}{00}{NFT}%
2814 }
2815 % \end{macrocode}
2816 %\end{macro}
2817 %
2818 %\begin{macro}{\DTMenAUdstzonemaps}
2819 % Just daylight saving mappings. (Conflicts omitted.)
2820 %\changes{1.03}{2016-01-23}{new}
2821 % \begin{macrocode}
2822 \newcommand*{\DTMenAUdstzonemaps}{%
2823 \DTMdefzonemap{9}{00}{AWDT}%
2824 \DTMdefzonemap{10}{30}{ACDT}%
2825 \DTMdefzonemap{11}{00}{AEDT}%
2826 }
2827 % \end{macrocode}
2828 %\end{macro}
2829 %
2830 %\begin{macro}{\DTMenAUcentralzonemaps}
2831 % Just the Australian Central zone mappings (ACST and ACDT).
2832 %\changes{1.03}{2016-01-23}{new}
2833 % \begin{macrocode}
2834 \newcommand*{\DTMenAUcentralzonemaps}{%
2835 \DTMdefzonemap{9}{30}{ACST}%
2836 \DTMdefzonemap{10}{30}{ACDT}%
2837 }
2838 % \end{macrocode}
2839 %\end{macro}
2840 %
2841 %\begin{macro}{\DTMenAUcentralwesternzonemaps}
2842 % Just the Australian Central Western zone mapping (ACWST).
2843 %\changes{1.03}{2016-01-23}{new}
2844 % \begin{macrocode}
2845 \newcommand*{\DTMenAUcentralwesternzonemaps}{%
2846 \DTMdefzonemap{8}{45}{ACWST}%
2847 }
2848 % \end{macrocode}
2849 %\end{macro}
2850 %
2851 %\begin{macro}{\DTMenAUwesternzonemaps}
2852 % Just the Australian Western zone mappings (AWST and AWDT).
2853 %\changes{1.03}{2016-01-23}{new}
2854 % \begin{macrocode}
2855 \newcommand*{\DTMenAUwesternzonemaps}{%
2856 \DTMdefzonemap{8}{00}{AWST}%
2857 \DTMdefzonemap{9}{00}{AWDT}%
2858 }
2859 % \end{macrocode}
2860 %\end{macro}
2861 %
2862 %\begin{macro}{\DTMenAUeasternzonemaps}
2863 % Just the Australian Eastern zone mappings (AEST and AEDT).
2864 %\changes{1.03}{2016-01-23}{new}
2865 % \begin{macrocode}
2866 \newcommand*{\DTMenAUeasternzonemaps}{%
2867 \DTMdefzonemap{10}{00}{AEST}%
2868 \DTMdefzonemap{11}{00}{AEDT}%
2869 }
2870 % \end{macrocode}
2871 %\end{macro}
2872 %
2873 %\begin{macro}{\DTMenAUchrismaszonemaps}
2874 % Just the Christmas Island zone mapping (CXT).
2875 %\changes{1.03}{2016-01-23}{new}
2876 % \begin{macrocode}
2877 \newcommand*{\DTMenAUchristmaszonemaps}{%
2878 \DTMdefzonemap{7}{00}{CXT}%
2879 }
2880 % \end{macrocode}
2881 %\end{macro}
2882 %
2883 %\begin{macro}{\DTMenAUlordhowezonemaps}
2884 % Just the Lord Howe Island zone mappings (LHST and LHDT).
2885 %\changes{1.03}{2016-01-23}{new}
2886 % \begin{macrocode}
2887 \newcommand*{\DTMenAUlordhowezonemaps}{%
2888 \DTMdefzonemap{10}{30}{LHST}%
2889 \DTMdefzonemap{11}{00}{LHDT}%
2890 }
2891 % \end{macrocode}
2892 %\end{macro}
2893 %
2894 %\begin{macro}{\DTMenAUnorfolkzonemaps}
2895 % Just the Norfolk Island zone mapping (NFT).
2896 %\changes{1.03}{2016-01-23}{new}
2897 % \begin{macrocode}
2898 \newcommand*{\DTMenAUnorfolkzonemaps}{%
2899 \DTMdefzonemap{11}{00}{NFT}%
2900 }
2901 % \end{macrocode}
2902 %\end{macro}
2903 %
2904 %\begin{macro}{\DTMenAUcocoszonemaps}
2905 % Just the Cocos (Keeling) Island zone mapping (CCT).
2906 %\changes{1.03}{2016-01-23}{new}
2907 % \begin{macrocode}
2908 \newcommand*{\DTMenAUcocoszonemaps}{%
2909 \DTMdefzonemap{6}{30}{CCT}%
2910 }
2911 % \end{macrocode}
2912 %\end{macro}
2913 %
2914 %
2915 % Switch style according to the \opt{useregional} setting.
2916 % \begin{macrocode}
2917 \DTMifcaseregional
2918 {}% do nothing
2919 {\DTMsetstyle{en-AU}}%
2920 {\DTMsetstyle{en-AU-numeric}}%
2921 % \end{macrocode}
2922 %
2923 % Redefine \cs{dateenglish} (or \cs{date}\meta{dialect}) to prevent
2924 % \sty{babel} from resetting \cs{today}. (For this to work,
2925 % \sty{babel} must already have been loaded if it's required.)
2926 % \begin{macrocode}
2927 \ifcsundef{date\CurrentTrackedDialect}
2928 {% do nothing
2929 \ifundef\dateenglish
2930 {%
2931 }%
2932 {%
2933 \def\dateenglish{%
2934 \DTMifcaseregional
2935 {}% do nothing
2936 {\DTMsetstyle{en-AU}}%
2937 {\DTMsetstyle{en-AU-numeric}}%
2938 }%
2939 }%
2940 }%
2941 {%
2942 \csdef{date\CurrentTrackedDialect}{%
2943 \DTMifcaseregional
2944 {}% do nothing
2945 {\DTMsetstyle{en-AU}}%
2946 {\DTMsetstyle{en-AU-numeric}}%
2947 }%
2948 }%
2949 % \end{macrocode}
2950 %
2951 %\iffalse
2952 % \begin{macrocode}
2953 %</datetime2-en-AU.ldf>
2954 % \end{macrocode}
2955 %\fi
2956 %\subsection{English (New Zealand) Code (\texttt{datetime2-en-NZ.ldf})}
2957 %This file contains the New Zealand English style.
2958 %\changes{1.0}{2015-03-24}{Initial release}
2959 %\iffalse
2960 % \begin{macrocode}
2961 %<*datetime2-en-NZ.ldf>
2962 % \end{macrocode}
2963 %\fi
2964 %
2965 % Identify this module.
2966 % \begin{macrocode}
2967 \ProvidesDateTimeModule{en-NZ}[2019/10/21 v1.05 (NLCT)]
2968 % \end{macrocode}
2969 % Load base English module.
2970 % \begin{macrocode}
2971 \RequireDateTimeModule{english-base}
2972 % \end{macrocode}
2973 %
2974 % Allow the user a way of configuring the "en-NZ" and
2975 % "en-NZ-numeric" styles.
2976 % This doesn't use the package wide separators such as
2977 % \cs{dtm@datetimesep} in case other date formats are also required.
2978 %
2979 %\begin{macro}{\DTMenNZdowdaysep}
2980 %\changes{1.04}{2016-03-09}{new}
2981 % The separator between the day of week name and the day of month
2982 % number for the text format.
2983 % \begin{macrocode}
2984 \newcommand*{\DTMenNZdowdaysep}{\space}
2985 % \end{macrocode}
2986 %\end{macro}
2987 %
2988 %\begin{macro}{\DTMenNZdaymonthsep}
2989 % The separator between the day and month for the text format.
2990 % \begin{macrocode}
2991 \newcommand*{\DTMenNZdaymonthsep}{\space}
2992 % \end{macrocode}
2993 %\end{macro}
2994 %
2995 %\begin{macro}{\DTMenNZmonthyearsep}
2996 % The separator between the month and year for the text format.
2997 % \begin{macrocode}
2998 \newcommand*{\DTMenNZmonthyearsep}{\space}
2999 % \end{macrocode}
3000 %\end{macro}
3001 %
3002 %\begin{macro}{\DTMenNZdatetimesep}
3003 % The separator between the date and time blocks in the full format
3004 % (either text or numeric).
3005 % \begin{macrocode}
3006 \newcommand*{\DTMenNZdatetimesep}{\space}
3007 % \end{macrocode}
3008 %\end{macro}
3009 %
3010 %\begin{macro}{\DTMenNZtimezonesep}
3011 % The separator between the time and zone blocks in the full format
3012 % (either text or numeric).
3013 % \begin{macrocode}
3014 \newcommand*{\DTMenNZtimezonesep}{\space}
3015 % \end{macrocode}
3016 %\end{macro}
3017 %
3018 %\begin{macro}{\DTMenNZdatesep}
3019 % The separator for the numeric date format.
3020 % \begin{macrocode}
3021 \newcommand*{\DTMenNZdatesep}{/}
3022 % \end{macrocode}
3023 %\end{macro}
3024 %
3025 %\begin{macro}{\DTMenNZtimesep}
3026 % The separator for the numeric time format.
3027 % \begin{macrocode}
3028 \newcommand*{\DTMenNZtimesep}{:}
3029 % \end{macrocode}
3030 %\end{macro}
3031 %
3032 %Provide keys that can be used in \cs{DTMlangsetup} to set these
3033 %separators.
3034 % \begin{macrocode}
3035 \DTMdefkey{en-NZ}{dowdaysep}{\renewcommand*{\DTMenNZdowdaysep}{#1}}
3036 \DTMdefkey{en-NZ}{daymonthsep}{\renewcommand*{\DTMenNZdaymonthsep}{#1}}
3037 \DTMdefkey{en-NZ}{monthyearsep}{\renewcommand*{\DTMenNZmonthyearsep}{#1}}
3038 \DTMdefkey{en-NZ}{datetimesep}{\renewcommand*{\DTMenNZdatetimesep}{#1}}
3039 \DTMdefkey{en-NZ}{timezonesep}{\renewcommand*{\DTMenNZtimezonesep}{#1}}
3040 \DTMdefkey{en-NZ}{datesep}{\renewcommand*{\DTMenNZdatesep}{#1}}
3041 \DTMdefkey{en-NZ}{timesep}{\renewcommand*{\DTMenNZtimesep}{#1}}
3042 % \end{macrocode}
3043 %
3044 % Define a boolean key that can switch between full and abbreviated
3045 % formats for the month and day of week names in the text format.
3046 % \begin{macrocode}
3047 \DTMdefboolkey{en-NZ}{abbr}[true]{}
3048 % \end{macrocode}
3049 % The default is the full name.
3050 % \begin{macrocode}
3051 \DTMsetbool{en-NZ}{abbr}{false}
3052 % \end{macrocode}
3053 %
3054 % Define a boolean key that determines if the time zone mappings
3055 % should be used.
3056 % \begin{macrocode}
3057 \DTMdefboolkey{en-NZ}{mapzone}[true]{}
3058 % \end{macrocode}
3059 % The default is no mappings.
3060 % \begin{macrocode}
3061 \DTMsetbool{en-NZ}{mapzone}{false}
3062 % \end{macrocode}
3063 %
3064 % Define a boolean key that determines whether to show or hide the
3065 % day of the month. (Called "showdayofmonth" instead of "showday" to
3066 % avoid confusion with the day of the week.)
3067 % \begin{macrocode}
3068 \DTMdefboolkey{en-NZ}{showdayofmonth}[true]{}
3069 % \end{macrocode}
3070 % The default is to show the day of the month.
3071 % \begin{macrocode}
3072 \DTMsetbool{en-NZ}{showdayofmonth}{true}
3073 % \end{macrocode}
3074 %
3075 % Define a boolean key that determines whether to show or hide the
3076 % year.
3077 % \begin{macrocode}
3078 \DTMdefboolkey{en-NZ}{showyear}[true]{}
3079 % \end{macrocode}
3080 % The default is to show the year.
3081 % \begin{macrocode}
3082 \DTMsetbool{en-NZ}{showyear}{true}
3083 % \end{macrocode}
3084 %
3085 %\begin{macro}{\DTMenNZfmtordsuffix}
3086 % Define the ordinal suffix to be used by this style.
3087 % \begin{macrocode}
3088 \newcommand*{\DTMenNZfmtordsuffix}[1]{}
3089 % \end{macrocode}
3090 %\end{macro}
3091 %
3092 % Define a setting to change the ordinal suffix style.
3093 %\changes{1.05}{2019-10-21}{renamed scratch variables}
3094 % \begin{macrocode}
3095 \DTMdefchoicekey{en-NZ}{ord}[\@dtm@val\@dtm@nr]{level,raise,omit,sc}{%
3096 \ifcase\@dtm@nr\relax
3097 \renewcommand*{\DTMenNZfmtordsuffix}[1]{##1}%
3098 \or
3099 \renewcommand*{\DTMenNZfmtordsuffix}[1]{%
3100 \DTMtexorpdfstring{\protect\textsuperscript{##1}}{##1}}%
3101 \or
3102 \renewcommand*{\DTMenNZfmtordsuffix}[1]{}%
3103 \or
3104 \renewcommand*{\DTMenNZfmtordsuffix}[1]{%
3105 \DTMtexorpdfstring{\protect\textsc{##1}}{##1}}%
3106 \fi
3107 }
3108 % \end{macrocode}
3109 %
3110 % Define the "en-NZ" style.
3111 % \begin{macrocode}
3112 \DTMnewstyle
3113 {en-NZ}% label
3114 {% date style
3115 \renewcommand*{\DTMenglishfmtordsuffix}{\DTMenNZfmtordsuffix}%
3116 \renewcommand*\DTMdisplaydate[4]{%
3117 \ifDTMshowdow
3118 \ifnum##4>-1 % space intended
3119 \DTMifbool{en-NZ}{abbr}%
3120 {\DTMenglishshortweekdayname{##4}}%
3121 {\DTMenglishweekdayname{##4}}%
3122 \DTMenNZdowdaysep
3123 \fi
3124 \fi
3125 \DTMifbool{en-NZ}{showdayofmonth}%
3126 {%
3127 \DTMenglishordinal{##3}%
3128 \DTMenNZdaymonthsep
3129 }%
3130 {}%
3131 \DTMifbool{en-NZ}{abbr}%
3132 {\DTMenglishshortmonthname{##2}}%
3133 {\DTMenglishmonthname{##2}}%
3134 \DTMifbool{en-NZ}{showyear}%
3135 {%
3136 \DTMenNZmonthyearsep\number##1 % space intended
3137 }%
3138 {}%
3139 }%
3140 \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
3141 }%
3142 {% time style
3143 \renewcommand*\DTMenglishtimesep{\DTMenNZtimesep}%
3144 \DTMsettimestyle{englishampm}%
3145 }%
3146 {% zone style
3147 \DTMresetzones
3148 \DTMenNZzonemaps
3149 \renewcommand*{\DTMdisplayzone}[2]{%
3150 \DTMifbool{en-NZ}{mapzone}%
3151 {\DTMusezonemapordefault{##1}{##2}}%
3152 {%
3153 \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
3154 \ifDTMshowzoneminutes\DTMenNZtimesep\DTMtwodigits{##2}\fi
3155 }%
3156 }%
3157 }%
3158 {% full style
3159 \renewcommand*{\DTMdisplay}[9]{%
3160 \ifDTMshowdate
3161 \DTMdisplaydate{##1}{##2}{##3}{##4}%
3162 \DTMenNZdatetimesep
3163 \fi
3164 \DTMdisplaytime{##5}{##6}{##7}%
3165 \ifDTMshowzone
3166 \DTMenNZtimezonesep
3167 \DTMdisplayzone{##8}{##9}%
3168 \fi
3169 }%
3170 \renewcommand*{\DTMDisplay}{\DTMdisplay}%
3171 }%
3172 % \end{macrocode}
3173 %
3174 % Define numeric style.
3175 % \begin{macrocode}
3176 \DTMnewstyle
3177 {en-NZ-numeric}% label
3178 {% date style
3179 \renewcommand*\DTMdisplaydate[4]{%
3180 \DTMifbool{en-NZ}{showdayofmonth}%
3181 {%
3182 \number##3 % space intended
3183 \DTMenNZdatesep
3184 }%
3185 {}%
3186 \number##2 % space intended
3187 \DTMifbool{en-NZ}{showyear}%
3188 {%
3189 \DTMenNZdatesep
3190 \number##1 % space intended
3191 }%
3192 {}%
3193 }%
3194 \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
3195 }%
3196 {% time style
3197 \renewcommand*\DTMdisplaytime[3]{%
3198 \number##1
3199 \DTMenNZtimesep\DTMtwodigits{##2}%
3200 \ifDTMshowseconds\DTMenNZtimesep\DTMtwodigits{##3}\fi
3201 }%
3202 }%
3203 {% zone style
3204 \DTMresetzones
3205 \DTMenNZzonemaps
3206 \renewcommand*{\DTMdisplayzone}[2]{%
3207 \DTMifbool{en-NZ}{mapzone}%
3208 {\DTMusezonemapordefault{##1}{##2}}%
3209 {%
3210 \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
3211 \ifDTMshowzoneminutes\DTMenNZtimesep\DTMtwodigits{##2}\fi
3212 }%
3213 }%
3214 }%
3215 {% full style
3216 \renewcommand*{\DTMdisplay}[9]{%
3217 \ifDTMshowdate
3218 \DTMdisplaydate{##1}{##2}{##3}{##4}%
3219 \DTMenNZdatetimesep
3220 \fi
3221 \DTMdisplaytime{##5}{##6}{##7}%
3222 \ifDTMshowzone
3223 \DTMenNZtimezonesep
3224 \DTMdisplayzone{##8}{##9}%
3225 \fi
3226 }%
3227 \renewcommand*{\DTMDisplay}{\DTMdisplay}%
3228 }
3229 % \end{macrocode}
3230 %
3231 %\begin{macro}{\DTMenNZzonemaps}
3232 % The time zone mappings are set through this command, which can be
3233 % redefined if extra mappings are required or mappings need to be
3234 % removed.
3235 % \begin{macrocode}
3236 \newcommand*{\DTMenNZzonemaps}{%
3237 \DTMdefzonemap{12}{00}{NZST}%
3238 \DTMdefzonemap{12}{45}{CHAST}%
3239 \DTMdefzonemap{13}{00}{NZDT}%
3240 \DTMdefzonemap{13}{45}{CHADT}%
3241 }
3242 % \end{macrocode}
3243 %\end{macro}
3244 %
3245 % Switch style according to the \opt{useregional} setting.
3246 % \begin{macrocode}
3247 \DTMifcaseregional
3248 {}% do nothing
3249 {\DTMsetstyle{en-NZ}}%
3250 {\DTMsetstyle{en-NZ-numeric}}%
3251 % \end{macrocode}
3252 %
3253 % Redefine \cs{dateenglish} (or \cs{date}\meta{dialect}) to prevent
3254 % \sty{babel} from resetting \cs{today}. (For this to work,
3255 % \sty{babel} must already have been loaded if it's required.)
3256 % \begin{macrocode}
3257 \ifcsundef{date\CurrentTrackedDialect}
3258 {% do nothing
3259 \ifundef\dateenglish
3260 {%
3261 }%
3262 {%
3263 \def\dateenglish{%
3264 \DTMifcaseregional
3265 {}% do nothing
3266 {\DTMsetstyle{en-NZ}}%
3267 {\DTMsetstyle{en-NZ-numeric}}%
3268 }%
3269 }%
3270 }%
3271 {%
3272 \csdef{date\CurrentTrackedDialect}{%
3273 \DTMifcaseregional
3274 {}% do nothing
3275 {\DTMsetstyle{en-NZ}}%
3276 {\DTMsetstyle{en-NZ-numeric}}%
3277 }%
3278 }%
3279 % \end{macrocode}
3280 %
3281 %\iffalse
3282 % \begin{macrocode}
3283 %</datetime2-en-NZ.ldf>
3284 % \end{macrocode}
3285 %\fi
3286 %\subsection{English (GG) Code (\texttt{datetime2-en-GG.ldf})}
3287 %This file contains the \texttt{en-GG} style.
3288 %\changes{1.0}{2015-03-24}{Initial release}
3289 %\iffalse
3290 % \begin{macrocode}
3291 %<*datetime2-en-GG.ldf>
3292 % \end{macrocode}
3293 %\fi
3294 %
3295 % Identify this module.
3296 % \begin{macrocode}
3297 \ProvidesDateTimeModule{en-GG}[2019/10/21 v1.05 (NLCT)]
3298 % \end{macrocode}
3299 % Load base English module.
3300 % \begin{macrocode}
3301 \RequireDateTimeModule{english-base}
3302 % \end{macrocode}
3303 %
3304 % Allow the user a way of configuring the "en-GG" and
3305 % "en-GG-numeric" styles. This doesn't use the package wide separators such as
3306 % \cs{dtm@datetimesep} in case other date formats are also required.
3307 %
3308 %\begin{macro}{\DTMenGGdowdaysep}
3309 %\changes{1.04}{2016-03-09}{new}
3310 % The separator between the day of week name and the day of month
3311 % number for the text format.
3312 % \begin{macrocode}
3313 \newcommand*{\DTMenGGdowdaysep}{\space}
3314 % \end{macrocode}
3315 %\end{macro}
3316 %
3317 %\begin{macro}{\DTMenGGdaymonthsep}
3318 % The separator between the day and month for the text format.
3319 % \begin{macrocode}
3320 \newcommand*{\DTMenGGdaymonthsep}{\space}
3321 % \end{macrocode}
3322 %\end{macro}
3323 %
3324 %\begin{macro}{\DTMenGGmonthyearsep}
3325 % The separator between the month and year for the text format.
3326 % \begin{macrocode}
3327 \newcommand*{\DTMenGGmonthyearsep}{\space}
3328 % \end{macrocode}
3329 %\end{macro}
3330 %
3331 %\begin{macro}{\DTMenGGdatetimesep}
3332 % The separator between the date and time blocks in the full format
3333 % (either text or numeric).
3334 % \begin{macrocode}
3335 \newcommand*{\DTMenGGdatetimesep}{\space}
3336 % \end{macrocode}
3337 %\end{macro}
3338 %
3339 %\begin{macro}{\DTMenGGtimezonesep}
3340 % The separator between the time and zone blocks in the full format
3341 % (either text or numeric).
3342 % \begin{macrocode}
3343 \newcommand*{\DTMenGGtimezonesep}{\space}
3344 % \end{macrocode}
3345 %\end{macro}
3346 %
3347 %\begin{macro}{\DTMenGGdatesep}
3348 % The separator for the numeric date format.
3349 % \begin{macrocode}
3350 \newcommand*{\DTMenGGdatesep}{/}
3351 % \end{macrocode}
3352 %\end{macro}
3353 %
3354 %\begin{macro}{\DTMenGGtimesep}
3355 % The separator for the numeric time format.
3356 % \begin{macrocode}
3357 \newcommand*{\DTMenGGtimesep}{:}
3358 % \end{macrocode}
3359 %\end{macro}
3360 %
3361 %Provide keys that can be used in \cs{DTMlangsetup} to set these
3362 %separators.
3363 % \begin{macrocode}
3364 \DTMdefkey{en-GG}{dowdaysep}{\renewcommand*{\DTMenGGdowdaysep}{#1}}
3365 \DTMdefkey{en-GG}{daymonthsep}{\renewcommand*{\DTMenGGdaymonthsep}{#1}}
3366 \DTMdefkey{en-GG}{monthyearsep}{\renewcommand*{\DTMenGGmonthyearsep}{#1}}
3367 \DTMdefkey{en-GG}{datetimesep}{\renewcommand*{\DTMenGGdatetimesep}{#1}}
3368 \DTMdefkey{en-GG}{timezonesep}{\renewcommand*{\DTMenGGtimezonesep}{#1}}
3369 \DTMdefkey{en-GG}{datesep}{\renewcommand*{\DTMenGGdatesep}{#1}}
3370 \DTMdefkey{en-GG}{timesep}{\renewcommand*{\DTMenGGtimesep}{#1}}
3371 % \end{macrocode}
3372 %
3373 % Define a boolean key that can switch between full and abbreviated
3374 % formats for the month and day of week names in the text format.
3375 % \begin{macrocode}
3376 \DTMdefboolkey{en-GG}{abbr}[true]{}
3377 % \end{macrocode}
3378 % The default is the full name.
3379 % \begin{macrocode}
3380 \DTMsetbool{en-GG}{abbr}{false}
3381 % \end{macrocode}
3382 %
3383 % Define a boolean key that determines if the time zone mappings
3384 % should be used.
3385 % \begin{macrocode}
3386 \DTMdefboolkey{en-GG}{mapzone}[true]{}
3387 % \end{macrocode}
3388 % The default is to use mappings.
3389 % \begin{macrocode}
3390 \DTMsetbool{en-GG}{mapzone}{true}
3391 % \end{macrocode}
3392 %
3393 % Define a boolean key that determines whether to show or hide the
3394 % day of the month. (Called "showdayofmonth" instead of "showday" to
3395 % avoid confusion with the day of the week.)
3396 % \begin{macrocode}
3397 \DTMdefboolkey{en-GG}{showdayofmonth}[true]{}
3398 % \end{macrocode}
3399 % The default is to show the day of the month.
3400 % \begin{macrocode}
3401 \DTMsetbool{en-GG}{showdayofmonth}{true}
3402 % \end{macrocode}
3403 %
3404 % Define a boolean key that determines whether to show or hide the
3405 % year.
3406 % \begin{macrocode}
3407 \DTMdefboolkey{en-GG}{showyear}[true]{}
3408 % \end{macrocode}
3409 % The default is to show the year.
3410 % \begin{macrocode}
3411 \DTMsetbool{en-GG}{showyear}{true}
3412 % \end{macrocode}
3413 %
3414 %\begin{macro}{\DTMenGGfmtordsuffix}
3415 % Define the ordinal suffix to be used by this style.
3416 % \begin{macrocode}
3417 \newcommand*{\DTMenGGfmtordsuffix}[1]{#1}
3418 % \end{macrocode}
3419 %\end{macro}
3420 %
3421 % Define a setting to change the ordinal suffix style.
3422 %\changes{1.05}{2019-10-21}{renamed scratch variables}
3423 % \begin{macrocode}
3424 \DTMdefchoicekey{en-GG}{ord}[\@dtm@val\@dtm@nr]{level,raise,omit,sc}{%
3425 \ifcase\@dtm@nr\relax
3426 \renewcommand*{\DTMenGGfmtordsuffix}[1]{##1}%
3427 \or
3428 \renewcommand*{\DTMenGGfmtordsuffix}[1]{%
3429 \DTMtexorpdfstring{\protect\textsuperscript{##1}}{##1}}%
3430 \or
3431 \renewcommand*{\DTMenGGfmtordsuffix}[1]{}%
3432 \or
3433 \renewcommand*{\DTMenGGfmtordsuffix}[1]{%
3434 \DTMtexorpdfstring{\protect\textsc{##1}}{##1}}%
3435 \fi
3436 }
3437 % \end{macrocode}
3438 %
3439 % Define the "en-GG" style.
3440 % \begin{macrocode}
3441 \DTMnewstyle
3442 {en-GG}% label
3443 {% date style
3444 \renewcommand*{\DTMenglishfmtordsuffix}{\DTMenGGfmtordsuffix}%
3445 \renewcommand*\DTMdisplaydate[4]{%
3446 \ifDTMshowdow
3447 \ifnum##4>-1 % space intended
3448 \DTMifbool{en-GG}{abbr}%
3449 {\DTMenglishshortweekdayname{##4}}%
3450 {\DTMenglishweekdayname{##4}}%
3451 \DTMenGGdowdaysep
3452 \fi
3453 \fi
3454 \DTMifbool{en-GG}{showdayofmonth}%
3455 {%
3456 \DTMenglishordinal{##3}%
3457 \DTMenGGdaymonthsep
3458 }%
3459 {}%
3460 \DTMifbool{en-GG}{abbr}%
3461 {\DTMenglishshortmonthname{##2}}%
3462 {\DTMenglishmonthname{##2}}%
3463 \DTMifbool{en-GG}{showyear}%
3464 {%
3465 \DTMenGGmonthyearsep\number##1 % space intended
3466 }%
3467 {}%
3468 }%
3469 \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
3470 }%
3471 {% time style
3472 \renewcommand*\DTMenglishtimesep{\DTMenGGtimesep}%
3473 \DTMsettimestyle{englishampm}%
3474 }%
3475 {% zone style
3476 \DTMresetzones
3477 \DTMenGGzonemaps
3478 \renewcommand*{\DTMdisplayzone}[2]{%
3479 \DTMifbool{en-GG}{mapzone}%
3480 {\DTMusezonemapordefault{##1}{##2}}%
3481 {%
3482 \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
3483 \ifDTMshowzoneminutes\DTMenGGtimesep\DTMtwodigits{##2}\fi
3484 }%
3485 }%
3486 }%
3487 {% full style
3488 \renewcommand*{\DTMdisplay}[9]{%
3489 \ifDTMshowdate
3490 \DTMdisplaydate{##1}{##2}{##3}{##4}%
3491 \DTMenGGdatetimesep
3492 \fi
3493 \DTMdisplaytime{##5}{##6}{##7}%
3494 \ifDTMshowzone
3495 \DTMenGGtimezonesep
3496 \DTMdisplayzone{##8}{##9}%
3497 \fi
3498 }%
3499 \renewcommand*{\DTMDisplay}{\DTMdisplay}%
3500 }%
3501 % \end{macrocode}
3502 %
3503 % Define numeric style.
3504 % \begin{macrocode}
3505 \DTMnewstyle
3506 {en-GG-numeric}% label
3507 {% date style
3508 \renewcommand*\DTMdisplaydate[4]{%
3509 \DTMifbool{en-GG}{showdayofmonth}%
3510 {%
3511 \number##3 % space intended
3512 \DTMenGGdatesep
3513 }%
3514 {}%
3515 \number##2 % space intended
3516 \DTMifbool{en-GG}{showyear}%
3517 {%
3518 \DTMenGGdatesep
3519 \number##1 % space intended
3520 }%
3521 {}%
3522 }%
3523 \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
3524 }%
3525 {% time style
3526 \renewcommand*\DTMdisplaytime[3]{%
3527 \number##1
3528 \DTMenGGtimesep\DTMtwodigits{##2}%
3529 \ifDTMshowseconds\DTMenGGtimesep\DTMtwodigits{##3}\fi
3530 }%
3531 }%
3532 {% zone style
3533 \DTMresetzones
3534 \DTMenGGzonemaps
3535 \renewcommand*{\DTMdisplayzone}[2]{%
3536 \DTMifbool{en-GG}{mapzone}%
3537 {\DTMusezonemapordefault{##1}{##2}}%
3538 {%
3539 \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
3540 \ifDTMshowzoneminutes\DTMenGGtimesep\DTMtwodigits{##2}\fi
3541 }%
3542 }%
3543 }%
3544 {% full style
3545 \renewcommand*{\DTMdisplay}[9]{%
3546 \ifDTMshowdate
3547 \DTMdisplaydate{##1}{##2}{##3}{##4}%
3548 \DTMenGGdatetimesep
3549 \fi
3550 \DTMdisplaytime{##5}{##6}{##7}%
3551 \ifDTMshowzone
3552 \DTMenGGtimezonesep
3553 \DTMdisplayzone{##8}{##9}%
3554 \fi
3555 }%
3556 \renewcommand*{\DTMDisplay}{\DTMdisplay}%
3557 }
3558 % \end{macrocode}
3559 %
3560 %\begin{macro}{\DTMenGGzonemaps}
3561 % The time zone mappings are set through this command, which can be
3562 % redefined if extra mappings are required or mappings need to be
3563 % removed.
3564 % \begin{macrocode}
3565 \newcommand*{\DTMenGGzonemaps}{%
3566 \DTMdefzonemap{00}{00}{GMT}%
3567 \DTMdefzonemap{01}{00}{BST}%
3568 }
3569 % \end{macrocode}
3570 %\end{macro}
3571 %
3572 % Switch style according to the \opt{useregional} setting.
3573 % \begin{macrocode}
3574 \DTMifcaseregional
3575 {}% do nothing
3576 {\DTMsetstyle{en-GG}}%
3577 {\DTMsetstyle{en-GG-numeric}}%
3578 % \end{macrocode}
3579 %
3580 % Redefine \cs{dateenglish} (or \cs{date}\meta{dialect}) to prevent
3581 % \sty{babel} from resetting \cs{today}. (For this to work,
3582 % \sty{babel} must already have been loaded if it's required.)
3583 % \begin{macrocode}
3584 \ifcsundef{date\CurrentTrackedDialect}
3585 {% do nothing
3586 \ifundef\dateenglish
3587 {%
3588 }%
3589 {%
3590 \def\dateenglish{%
3591 \DTMifcaseregional
3592 {}% do nothing
3593 {\DTMsetstyle{en-GG}}%
3594 {\DTMsetstyle{en-GG-numeric}}%
3595 }%
3596 }%
3597 }%
3598 {%
3599 \csdef{date\CurrentTrackedDialect}{%
3600 \DTMifcaseregional
3601 {}% do nothing
3602 {\DTMsetstyle{en-GG}}%
3603 {\DTMsetstyle{en-GG-numeric}}%
3604 }%
3605 }%
3606 % \end{macrocode}
3607 %\iffalse
3608 % \begin{macrocode}
3609 %</datetime2-en-GG.ldf>
3610 % \end{macrocode}
3611 %\fi
3612 %\subsection{English (JE) Code (\texttt{datetime2-en-JE.ldf})}
3613 %This file contains the \texttt{en-JE} style.
3614 %\changes{1.0}{2015-03-24}{Initial release}
3615 %\iffalse
3616 % \begin{macrocode}
3617 %<*datetime2-en-JE.ldf>
3618 % \end{macrocode}
3619 %\fi
3620 %
3621 % Identify this module.
3622 % \begin{macrocode}
3623 \ProvidesDateTimeModule{en-JE}[2019/10/21 v1.05 (NLCT)]
3624 % \end{macrocode}
3625 % Load base English module.
3626 % \begin{macrocode}
3627 \RequireDateTimeModule{english-base}
3628 % \end{macrocode}
3629 %
3630 % Allow the user a way of configuring the "en-JE" and
3631 % "en-JE-numeric" styles. This doesn't use the package wide separators such as
3632 % \cs{dtm@datetimesep} in case other date formats are also required.
3633 %
3634 %\begin{macro}{\DTMenJEdowdaysep}
3635 %\changes{1.04}{2016-03-09}{new}
3636 % The separator between the day of week name and the day of month
3637 % number for the text format.
3638 % \begin{macrocode}
3639 \newcommand*{\DTMenJEdowdaysep}{\space}
3640 % \end{macrocode}
3641 %\end{macro}
3642 %
3643 %\begin{macro}{\DTMenJEdaymonthsep}
3644 % The separator between the day and month for the text format.
3645 % \begin{macrocode}
3646 \newcommand*{\DTMenJEdaymonthsep}{\space}
3647 % \end{macrocode}
3648 %\end{macro}
3649 %
3650 %\begin{macro}{\DTMenJEmonthyearsep}
3651 % The separator between the month and year for the text format.
3652 % \begin{macrocode}
3653 \newcommand*{\DTMenJEmonthyearsep}{\space}
3654 % \end{macrocode}
3655 %\end{macro}
3656 %
3657 %\begin{macro}{\DTMenJEdatetimesep}
3658 % The separator between the date and time blocks in the full format
3659 % (either text or numeric).
3660 % \begin{macrocode}
3661 \newcommand*{\DTMenJEdatetimesep}{\space}
3662 % \end{macrocode}
3663 %\end{macro}
3664 %
3665 %\begin{macro}{\DTMenJEtimezonesep}
3666 % The separator between the time and zone blocks in the full format
3667 % (either text or numeric).
3668 % \begin{macrocode}
3669 \newcommand*{\DTMenJEtimezonesep}{\space}
3670 % \end{macrocode}
3671 %\end{macro}
3672 %
3673 %\begin{macro}{\DTMenJEdatesep}
3674 % The separator for the numeric date format.
3675 % \begin{macrocode}
3676 \newcommand*{\DTMenJEdatesep}{/}
3677 % \end{macrocode}
3678 %\end{macro}
3679 %
3680 %\begin{macro}{\DTMenJEtimesep}
3681 % The separator for the numeric time format.
3682 % \begin{macrocode}
3683 \newcommand*{\DTMenJEtimesep}{:}
3684 % \end{macrocode}
3685 %\end{macro}
3686 %
3687 %Provide keys that can be used in \cs{DTMlangsetup} to set these
3688 %separators.
3689 % \begin{macrocode}
3690 \DTMdefkey{en-JE}{dowdaysep}{\renewcommand*{\DTMenJEdowdaysep}{#1}}
3691 \DTMdefkey{en-JE}{daymonthsep}{\renewcommand*{\DTMenJEdaymonthsep}{#1}}
3692 \DTMdefkey{en-JE}{monthyearsep}{\renewcommand*{\DTMenJEmonthyearsep}{#1}}
3693 \DTMdefkey{en-JE}{datetimesep}{\renewcommand*{\DTMenJEdatetimesep}{#1}}
3694 \DTMdefkey{en-JE}{timezonesep}{\renewcommand*{\DTMenJEtimezonesep}{#1}}
3695 \DTMdefkey{en-JE}{datesep}{\renewcommand*{\DTMenJEdatesep}{#1}}
3696 \DTMdefkey{en-JE}{timesep}{\renewcommand*{\DTMenJEtimesep}{#1}}
3697 % \end{macrocode}
3698 %
3699 % Define a boolean key that can switch between full and abbreviated
3700 % formats for the month and day of week names in the text format.
3701 % \begin{macrocode}
3702 \DTMdefboolkey{en-JE}{abbr}[true]{}
3703 % \end{macrocode}
3704 % The default is the full name.
3705 % \begin{macrocode}
3706 \DTMsetbool{en-JE}{abbr}{false}
3707 % \end{macrocode}
3708 %
3709 % Define a boolean key that determines if the time zone mappings
3710 % should be used.
3711 % \begin{macrocode}
3712 \DTMdefboolkey{en-JE}{mapzone}[true]{}
3713 % \end{macrocode}
3714 % The default is to use mappings.
3715 % \begin{macrocode}
3716 \DTMsetbool{en-JE}{mapzone}{true}
3717 % \end{macrocode}
3718 %
3719 % Define a boolean key that determines whether to show or hide the
3720 % day of the month. (Called "showdayofmonth" instead of "showday" to
3721 % avoid confusion with the day of the week.)
3722 % \begin{macrocode}
3723 \DTMdefboolkey{en-JE}{showdayofmonth}[true]{}
3724 % \end{macrocode}
3725 % The default is to show the day of the month.
3726 % \begin{macrocode}
3727 \DTMsetbool{en-JE}{showdayofmonth}{true}
3728 % \end{macrocode}
3729 %
3730 % Define a boolean key that determines whether to show or hide the
3731 % year.
3732 % \begin{macrocode}
3733 \DTMdefboolkey{en-JE}{showyear}[true]{}
3734 % \end{macrocode}
3735 % The default is to show the year.
3736 % \begin{macrocode}
3737 \DTMsetbool{en-JE}{showyear}{true}
3738 % \end{macrocode}
3739 %
3740 %\begin{macro}{\DTMenJEfmtordsuffix}
3741 % Define the ordinal suffix to be used by this style.
3742 % \begin{macrocode}
3743 \newcommand*{\DTMenJEfmtordsuffix}[1]{#1}
3744 % \end{macrocode}
3745 %\end{macro}
3746 %
3747 % Define a setting to change the ordinal suffix style.
3748 %\changes{1.05}{2019-10-21}{renamed scratch variables}
3749 % \begin{macrocode}
3750 \DTMdefchoicekey{en-JE}{ord}[\@dtm@val\@dtm@nr]{level,raise,omit,sc}{%
3751 \ifcase\@dtm@nr\relax
3752 \renewcommand*{\DTMenJEfmtordsuffix}[1]{##1}%
3753 \or
3754 \renewcommand*{\DTMenJEfmtordsuffix}[1]{%
3755 \DTMtexorpdfstring{\protect\textsuperscript{##1}}{##1}}%
3756 \or
3757 \renewcommand*{\DTMenJEfmtordsuffix}[1]{}%
3758 \or
3759 \renewcommand*{\DTMenJEfmtordsuffix}[1]{%
3760 \DTMtexorpdfstring{\protect\textsc{##1}}{##1}}%
3761 \fi
3762 }
3763 % \end{macrocode}
3764 %
3765 % Define the "en-JE" style.
3766 % \begin{macrocode}
3767 \DTMnewstyle
3768 {en-JE}% label
3769 {% date style
3770 \renewcommand*{\DTMenglishfmtordsuffix}{\DTMenJEfmtordsuffix}%
3771 \renewcommand*\DTMdisplaydate[4]{%
3772 \ifDTMshowdow
3773 \ifnum##4>-1 % space intended
3774 \DTMifbool{en-JE}{abbr}%
3775 {\DTMenglishshortweekdayname{##4}}%
3776 {\DTMenglishweekdayname{##4}}%
3777 \DTMenJEdowdaysep
3778 \fi
3779 \fi
3780 \DTMifbool{en-JE}{showdayofmonth}%
3781 {%
3782 \DTMenglishordinal{##3}%
3783 \DTMenJEdaymonthsep
3784 }%
3785 {}%
3786 \DTMifbool{en-JE}{abbr}%
3787 {\DTMenglishshortmonthname{##2}}%
3788 {\DTMenglishmonthname{##2}}%
3789 \DTMifbool{en-JE}{showyear}%
3790 {%
3791 \DTMenJEmonthyearsep\number##1 % space intended
3792 }%
3793 {}%
3794 }%
3795 \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
3796 }%
3797 {% time style
3798 \renewcommand*\DTMenglishtimesep{\DTMenJEtimesep}%
3799 \DTMsettimestyle{englishampm}%
3800 }%
3801 {% zone style
3802 \DTMresetzones
3803 \DTMenJEzonemaps
3804 \renewcommand*{\DTMdisplayzone}[2]{%
3805 \DTMifbool{en-JE}{mapzone}%
3806 {\DTMusezonemapordefault{##1}{##2}}%
3807 {%
3808 \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
3809 \ifDTMshowzoneminutes\DTMenJEtimesep\DTMtwodigits{##2}\fi
3810 }%
3811 }%
3812 }%
3813 {% full style
3814 \renewcommand*{\DTMdisplay}[9]{%
3815 \ifDTMshowdate
3816 \DTMdisplaydate{##1}{##2}{##3}{##4}%
3817 \DTMenJEdatetimesep
3818 \fi
3819 \DTMdisplaytime{##5}{##6}{##7}%
3820 \ifDTMshowzone
3821 \DTMenJEtimezonesep
3822 \DTMdisplayzone{##8}{##9}%
3823 \fi
3824 }%
3825 \renewcommand*{\DTMDisplay}{\DTMdisplay}%
3826 }%
3827 % \end{macrocode}
3828 %
3829 % Define numeric style.
3830 % \begin{macrocode}
3831 \DTMnewstyle
3832 {en-JE-numeric}% label
3833 {% date style
3834 \renewcommand*\DTMdisplaydate[4]{%
3835 \DTMifbool{en-JE}{showdayofmonth}%
3836 {%
3837 \number##3 % space intended
3838 \DTMenJEdatesep
3839 }%
3840 {}%
3841 \number##2 % space intended
3842 \DTMifbool{en-JE}{showyear}%
3843 {%
3844 \DTMenJEdatesep
3845 \number##1 % space intended
3846 }%
3847 {}%
3848 }%
3849 \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
3850 }%
3851 {% time style
3852 \renewcommand*\DTMdisplaytime[3]{%
3853 \number##1
3854 \DTMenJEtimesep\DTMtwodigits{##2}%
3855 \ifDTMshowseconds\DTMenJEtimesep\DTMtwodigits{##3}\fi
3856 }%
3857 }%
3858 {% zone style
3859 \DTMresetzones
3860 \DTMenJEzonemaps
3861 \renewcommand*{\DTMdisplayzone}[2]{%
3862 \DTMifbool{en-JE}{mapzone}%
3863 {\DTMusezonemapordefault{##1}{##2}}%
3864 {%
3865 \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
3866 \ifDTMshowzoneminutes\DTMenJEtimesep\DTMtwodigits{##2}\fi
3867 }%
3868 }%
3869 }%
3870 {% full style
3871 \renewcommand*{\DTMdisplay}[9]{%
3872 \ifDTMshowdate
3873 \DTMdisplaydate{##1}{##2}{##3}{##4}%
3874 \DTMenJEdatetimesep
3875 \fi
3876 \DTMdisplaytime{##5}{##6}{##7}%
3877 \ifDTMshowzone
3878 \DTMenJEtimezonesep
3879 \DTMdisplayzone{##8}{##9}%
3880 \fi
3881 }%
3882 \renewcommand*{\DTMDisplay}{\DTMdisplay}%
3883 }
3884 % \end{macrocode}
3885 %
3886 %\begin{macro}{\DTMenJEzonemaps}
3887 % The time zone mappings are set through this command, which can be
3888 % redefined if extra mappings are required or mappings need to be
3889 % removed.
3890 % \begin{macrocode}
3891 \newcommand*{\DTMenJEzonemaps}{%
3892 \DTMdefzonemap{00}{00}{GMT}%
3893 \DTMdefzonemap{01}{00}{BST}%
3894 }
3895 % \end{macrocode}
3896 %\end{macro}
3897 %
3898 % Switch style according to the \opt{useregional} setting.
3899 % \begin{macrocode}
3900 \DTMifcaseregional
3901 {}% do nothing
3902 {\DTMsetstyle{en-JE}}%
3903 {\DTMsetstyle{en-JE-numeric}}%
3904 % \end{macrocode}
3905 %
3906 % Redefine \cs{dateenglish} (or \cs{date}\meta{dialect}) to prevent
3907 % \sty{babel} from resetting \cs{today}. (For this to work,
3908 % \sty{babel} must already have been loaded if it's required.)
3909 % \begin{macrocode}
3910 \ifcsundef{date\CurrentTrackedDialect}
3911 {% do nothing
3912 \ifundef\dateenglish
3913 {%
3914 }%
3915 {%
3916 \def\dateenglish{%
3917 \DTMifcaseregional
3918 {}% do nothing
3919 {\DTMsetstyle{en-JE}}%
3920 {\DTMsetstyle{en-JE-numeric}}%
3921 }%
3922 }%
3923 }%
3924 {%
3925 \csdef{date\CurrentTrackedDialect}{%
3926 \DTMifcaseregional
3927 {}% do nothing
3928 {\DTMsetstyle{en-JE}}%
3929 {\DTMsetstyle{en-JE-numeric}}%
3930 }%
3931 }%
3932 % \end{macrocode}
3933 %\iffalse
3934 % \begin{macrocode}
3935 %</datetime2-en-JE.ldf>
3936 % \end{macrocode}
3937 %\fi
3938 %\subsection{English (IM) Code (\texttt{datetime2-en-IM.ldf})}
3939 %This file contains the \texttt{en-IM} style.
3940 %\changes{1.0}{2015-03-24}{Initial release}
3941 %\iffalse
3942 % \begin{macrocode}
3943 %<*datetime2-en-IM.ldf>
3944 % \end{macrocode}
3945 %\fi
3946 %
3947 % Identify this module.
3948 % \begin{macrocode}
3949 \ProvidesDateTimeModule{en-IM}[2019/10/21 v1.05 (NLCT)]
3950 % \end{macrocode}
3951 % Load base English module.
3952 % \begin{macrocode}
3953 \RequireDateTimeModule{english-base}
3954 % \end{macrocode}
3955 %
3956 % Allow the user a way of configuring the "en-IM" and
3957 % "en-IM-numeric" styles. This doesn't use the package wide separators such as
3958 % \cs{dtm@datetimesep} in case other date formats are also required.
3959 %
3960 %\begin{macro}{\DTMenIMdowdaysep}
3961 %\changes{1.04}{2016-03-09}{new}
3962 % The separator between the day of week name and the day of month
3963 % number for the text format.
3964 % \begin{macrocode}
3965 \newcommand*{\DTMenIMdowdaysep}{\space}
3966 % \end{macrocode}
3967 %\end{macro}
3968 %
3969 %\begin{macro}{\DTMenIMdaymonthsep}
3970 % The separator between the day and month for the text format.
3971 % \begin{macrocode}
3972 \newcommand*{\DTMenIMdaymonthsep}{\space}
3973 % \end{macrocode}
3974 %\end{macro}
3975 %
3976 %\begin{macro}{\DTMenIMmonthyearsep}
3977 % The separator between the month and year for the text format.
3978 % \begin{macrocode}
3979 \newcommand*{\DTMenIMmonthyearsep}{\space}
3980 % \end{macrocode}
3981 %\end{macro}
3982 %
3983 %\begin{macro}{\DTMenIMdatetimesep}
3984 % The separator between the date and time blocks in the full format
3985 % (either text or numeric).
3986 % \begin{macrocode}
3987 \newcommand*{\DTMenIMdatetimesep}{\space}
3988 % \end{macrocode}
3989 %\end{macro}
3990 %
3991 %\begin{macro}{\DTMenIMtimezonesep}
3992 % The separator between the time and zone blocks in the full format
3993 % (either text or numeric).
3994 % \begin{macrocode}
3995 \newcommand*{\DTMenIMtimezonesep}{\space}
3996 % \end{macrocode}
3997 %\end{macro}
3998 %
3999 %\begin{macro}{\DTMenIMdatesep}
4000 % The separator for the numeric date format.
4001 % \begin{macrocode}
4002 \newcommand*{\DTMenIMdatesep}{/}
4003 % \end{macrocode}
4004 %\end{macro}
4005 %
4006 %\begin{macro}{\DTMenIMtimesep}
4007 % The separator for the numeric time format.
4008 % \begin{macrocode}
4009 \newcommand*{\DTMenIMtimesep}{:}
4010 % \end{macrocode}
4011 %\end{macro}
4012 %
4013 %Provide keys that can be used in \cs{DTMlangsetup} to set these
4014 %separators.
4015 % \begin{macrocode}
4016 \DTMdefkey{en-IM}{dowdaysep}{\renewcommand*{\DTMenIMdowdaysep}{#1}}
4017 \DTMdefkey{en-IM}{daymonthsep}{\renewcommand*{\DTMenIMdaymonthsep}{#1}}
4018 \DTMdefkey{en-IM}{monthyearsep}{\renewcommand*{\DTMenIMmonthyearsep}{#1}}
4019 \DTMdefkey{en-IM}{datetimesep}{\renewcommand*{\DTMenIMdatetimesep}{#1}}
4020 \DTMdefkey{en-IM}{timezonesep}{\renewcommand*{\DTMenIMtimezonesep}{#1}}
4021 \DTMdefkey{en-IM}{datesep}{\renewcommand*{\DTMenIMdatesep}{#1}}
4022 \DTMdefkey{en-IM}{timesep}{\renewcommand*{\DTMenIMtimesep}{#1}}
4023 % \end{macrocode}
4024 %
4025 % Define a boolean key that can switch between full and abbreviated
4026 % formats for the month and day of week names in the text format.
4027 % \begin{macrocode}
4028 \DTMdefboolkey{en-IM}{abbr}[true]{}
4029 % \end{macrocode}
4030 % The default is the full name.
4031 % \begin{macrocode}
4032 \DTMsetbool{en-IM}{abbr}{false}
4033 % \end{macrocode}
4034 %
4035 % Define a boolean key that determines if the time zone mappings
4036 % should be used.
4037 % \begin{macrocode}
4038 \DTMdefboolkey{en-IM}{mapzone}[true]{}
4039 % \end{macrocode}
4040 % The default is to use mappings.
4041 % \begin{macrocode}
4042 \DTMsetbool{en-IM}{mapzone}{true}
4043 % \end{macrocode}
4044 %
4045 % Define a boolean key that determines whether to show or hide the
4046 % day of the month. (Called "showdayofmonth" instead of "showday" to
4047 % avoid confusion with the day of the week.)
4048 % \begin{macrocode}
4049 \DTMdefboolkey{en-IM}{showdayofmonth}[true]{}
4050 % \end{macrocode}
4051 % The default is to show the day of the month.
4052 % \begin{macrocode}
4053 \DTMsetbool{en-IM}{showdayofmonth}{true}
4054 % \end{macrocode}
4055 %
4056 % Define a boolean key that determines whether to show or hide the
4057 % year.
4058 % \begin{macrocode}
4059 \DTMdefboolkey{en-IM}{showyear}[true]{}
4060 % \end{macrocode}
4061 % The default is to show the year.
4062 % \begin{macrocode}
4063 \DTMsetbool{en-IM}{showyear}{true}
4064 % \end{macrocode}
4065 %
4066 %\begin{macro}{\DTMenIMfmtordsuffix}
4067 % Define the ordinal suffix to be used by this style.
4068 % \begin{macrocode}
4069 \newcommand*{\DTMenIMfmtordsuffix}[1]{#1}
4070 % \end{macrocode}
4071 %\end{macro}
4072 %
4073 % Define a setting to change the ordinal suffix style.
4074 %\changes{1.05}{2019-10-21}{renamed scratch variables}
4075 % \begin{macrocode}
4076 \DTMdefchoicekey{en-IM}{ord}[\@dtm@val\@dtm@nr]{level,raise,omit,sc}{%
4077 \ifcase\@dtm@nr\relax
4078 \renewcommand*{\DTMenIMfmtordsuffix}[1]{##1}%
4079 \or
4080 \renewcommand*{\DTMenIMfmtordsuffix}[1]{%
4081 \DTMtexorpdfstring{\protect\textsuperscript{##1}}{##1}}%
4082 \or
4083 \renewcommand*{\DTMenIMfmtordsuffix}[1]{}%
4084 \or
4085 \renewcommand*{\DTMenIMfmtordsuffix}[1]{%
4086 \DTMtexorpdfstring{\protect\textsc{##1}}{##1}}%
4087 \fi
4088 }
4089 % \end{macrocode}
4090 %
4091 % Define the "en-IM" style.
4092 % \begin{macrocode}
4093 \DTMnewstyle
4094 {en-IM}% label
4095 {% date style
4096 \renewcommand*{\DTMenglishfmtordsuffix}{\DTMenIMfmtordsuffix}%
4097 \renewcommand*\DTMdisplaydate[4]{%
4098 \ifDTMshowdow
4099 \ifnum##4>-1 % space intended
4100 \DTMifbool{en-IM}{abbr}%
4101 {\DTMenglishshortweekdayname{##4}}%
4102 {\DTMenglishweekdayname{##4}}%
4103 \DTMenIMdowdaysep
4104 \fi
4105 \fi
4106 \DTMifbool{en-IM}{showdayofmonth}%
4107 {%
4108 \DTMenglishordinal{##3}%
4109 \DTMenIMdaymonthsep
4110 }%
4111 {}%
4112 \DTMifbool{en-IM}{abbr}%
4113 {\DTMenglishshortmonthname{##2}}%
4114 {\DTMenglishmonthname{##2}}%
4115 \DTMifbool{en-IM}{showyear}%
4116 {%
4117 \DTMenIMmonthyearsep\number##1 % space intended
4118 }%
4119 {}%
4120 }%
4121 \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
4122 }%
4123 {% time style
4124 \renewcommand*\DTMenglishtimesep{\DTMenIMtimesep}%
4125 \DTMsettimestyle{englishampm}%
4126 }%
4127 {% zone style
4128 \DTMresetzones
4129 \DTMenIMzonemaps
4130 \renewcommand*{\DTMdisplayzone}[2]{%
4131 \DTMifbool{en-IM}{mapzone}%
4132 {\DTMusezonemapordefault{##1}{##2}}%
4133 {%
4134 \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
4135 \ifDTMshowzoneminutes\DTMenIMtimesep\DTMtwodigits{##2}\fi
4136 }%
4137 }%
4138 }%
4139 {% full style
4140 \renewcommand*{\DTMdisplay}[9]{%
4141 \ifDTMshowdate
4142 \DTMdisplaydate{##1}{##2}{##3}{##4}%
4143 \DTMenIMdatetimesep
4144 \fi
4145 \DTMdisplaytime{##5}{##6}{##7}%
4146 \ifDTMshowzone
4147 \DTMenIMtimezonesep
4148 \DTMdisplayzone{##8}{##9}%
4149 \fi
4150 }%
4151 \renewcommand*{\DTMDisplay}{\DTMdisplay}%
4152 }%
4153 % \end{macrocode}
4154 %
4155 % Define numeric style.
4156 % \begin{macrocode}
4157 \DTMnewstyle
4158 {en-IM-numeric}% label
4159 {% date style
4160 \renewcommand*\DTMdisplaydate[4]{%
4161 \DTMifbool{en-IM}{showdayofmonth}%
4162 {%
4163 \number##3 % space intended
4164 \DTMenIMdatesep
4165 }%
4166 {}%
4167 \number##2 % space intended
4168 \DTMifbool{en-IM}{showyear}%
4169 {%
4170 \DTMenIMdatesep
4171 \number##1 % space intended
4172 }%
4173 {}%
4174 }%
4175 \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
4176 }%
4177 {% time style
4178 \renewcommand*\DTMdisplaytime[3]{%
4179 \number##1
4180 \DTMenIMtimesep\DTMtwodigits{##2}%
4181 \ifDTMshowseconds\DTMenIMtimesep\DTMtwodigits{##3}\fi
4182 }%
4183 }%
4184 {% zone style
4185 \DTMresetzones
4186 \DTMenIMzonemaps
4187 \renewcommand*{\DTMdisplayzone}[2]{%
4188 \DTMifbool{en-IM}{mapzone}%
4189 {\DTMusezonemapordefault{##1}{##2}}%
4190 {%
4191 \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
4192 \ifDTMshowzoneminutes\DTMenIMtimesep\DTMtwodigits{##2}\fi
4193 }%
4194 }%
4195 }%
4196 {% full style
4197 \renewcommand*{\DTMdisplay}[9]{%
4198 \ifDTMshowdate
4199 \DTMdisplaydate{##1}{##2}{##3}{##4}%
4200 \DTMenIMdatetimesep
4201 \fi
4202 \DTMdisplaytime{##5}{##6}{##7}%
4203 \ifDTMshowzone
4204 \DTMenIMtimezonesep
4205 \DTMdisplayzone{##8}{##9}%
4206 \fi
4207 }%
4208 \renewcommand*{\DTMDisplay}{\DTMdisplay}%
4209 }
4210 % \end{macrocode}
4211 %
4212 %\begin{macro}{\DTMenIMzonemaps}
4213 % The time zone mappings are set through this command, which can be
4214 % redefined if extra mappings are required or mappings need to be
4215 % removed.
4216 % \begin{macrocode}
4217 \newcommand*{\DTMenIMzonemaps}{%
4218 \DTMdefzonemap{00}{00}{GMT}%
4219 \DTMdefzonemap{01}{00}{BST}%
4220 }
4221 % \end{macrocode}
4222 %\end{macro}
4223 %
4224 % Switch style according to the \opt{useregional} setting.
4225 % \begin{macrocode}
4226 \DTMifcaseregional
4227 {}% do nothing
4228 {\DTMsetstyle{en-IM}}%
4229 {\DTMsetstyle{en-IM-numeric}}%
4230 % \end{macrocode}
4231 %
4232 % Redefine \cs{dateenglish} (or \cs{date}\meta{dialect}) to prevent
4233 % \sty{babel} from resetting \cs{today}. (For this to work,
4234 % \sty{babel} must already have been loaded if it's required.)
4235 % \begin{macrocode}
4236 \ifcsundef{date\CurrentTrackedDialect}
4237 {% do nothing
4238 \ifundef\dateenglish
4239 {%
4240 }%
4241 {%
4242 \def\dateenglish{%
4243 \DTMifcaseregional
4244 {}% do nothing
4245 {\DTMsetstyle{en-IM}}%
4246 {\DTMsetstyle{en-IM-numeric}}%
4247 }%
4248 }%
4249 }%
4250 {%
4251 \csdef{date\CurrentTrackedDialect}{%
4252 \DTMifcaseregional
4253 {}% do nothing
4254 {\DTMsetstyle{en-IM}}%
4255 {\DTMsetstyle{en-IM-numeric}}%
4256 }%
4257 }%
4258 % \end{macrocode}
4259 %\iffalse
4260 % \begin{macrocode}
4261 %</datetime2-en-IM.ldf>
4262 % \end{macrocode}
4263 %\fi
4264 %\subsection{English (MT) Code (\texttt{datetime2-en-MT.ldf})}
4265 %This file contains the \texttt{en-MT} style.
4266 %\changes{1.0}{2015-03-24}{Initial release}
4267 %\iffalse
4268 % \begin{macrocode}
4269 %<*datetime2-en-MT.ldf>
4270 % \end{macrocode}
4271 %\fi
4272 %
4273 % Identify this module.
4274 % \begin{macrocode}
4275 \ProvidesDateTimeModule{en-MT}[2019/10/21 v1.05 (NLCT)]
4276 % \end{macrocode}
4277 % Load base English module.
4278 % \begin{macrocode}
4279 \RequireDateTimeModule{english-base}
4280 % \end{macrocode}
4281 %
4282 % Allow the user a way of configuring the "en-MT" and
4283 % "en-MT-numeric" styles. This doesn't use the package wide separators such as
4284 % \cs{dtm@datetimesep} in case other date formats are also required.
4285 %
4286 %\begin{macro}{\DTMenMTdowdaysep}
4287 %\changes{1.04}{2016-03-09}{new}
4288 % The separator between the day of week name and the day of month
4289 % number for the text format.
4290 % \begin{macrocode}
4291 \newcommand*{\DTMenMTdowdaysep}{\space}
4292 % \end{macrocode}
4293 %\end{macro}
4294 %
4295 %\begin{macro}{\DTMenMTdaymonthsep}
4296 % The separator between the day and month for the text format.
4297 % \begin{macrocode}
4298 \newcommand*{\DTMenMTdaymonthsep}{\space}
4299 % \end{macrocode}
4300 %\end{macro}
4301 %
4302 %\begin{macro}{\DTMenMTmonthyearsep}
4303 % The separator between the month and year for the text format.
4304 % \begin{macrocode}
4305 \newcommand*{\DTMenMTmonthyearsep}{\space}
4306 % \end{macrocode}
4307 %\end{macro}
4308 %
4309 %\begin{macro}{\DTMenMTdatetimesep}
4310 % The separator between the date and time blocks in the full format
4311 % (either text or numeric).
4312 % \begin{macrocode}
4313 \newcommand*{\DTMenMTdatetimesep}{\space}
4314 % \end{macrocode}
4315 %\end{macro}
4316 %
4317 %\begin{macro}{\DTMenMTtimezonesep}
4318 % The separator between the time and zone blocks in the full format
4319 % (either text or numeric).
4320 % \begin{macrocode}
4321 \newcommand*{\DTMenMTtimezonesep}{\space}
4322 % \end{macrocode}
4323 %\end{macro}
4324 %
4325 %\begin{macro}{\DTMenMTdatesep}
4326 % The separator for the numeric date format.
4327 % \begin{macrocode}
4328 \newcommand*{\DTMenMTdatesep}{/}
4329 % \end{macrocode}
4330 %\end{macro}
4331 %
4332 %\begin{macro}{\DTMenMTtimesep}
4333 % The separator for the numeric time format.
4334 % \begin{macrocode}
4335 \newcommand*{\DTMenMTtimesep}{:}
4336 % \end{macrocode}
4337 %\end{macro}
4338 %
4339 %Provide keys that can be used in \cs{DTMlangsetup} to set these
4340 %separators.
4341 % \begin{macrocode}
4342 \DTMdefkey{en-MT}{dowdaysep}{\renewcommand*{\DTMenMTdowdaysep}{#1}}
4343 \DTMdefkey{en-MT}{daymonthsep}{\renewcommand*{\DTMenMTdaymonthsep}{#1}}
4344 \DTMdefkey{en-MT}{monthyearsep}{\renewcommand*{\DTMenMTmonthyearsep}{#1}}
4345 \DTMdefkey{en-MT}{datetimesep}{\renewcommand*{\DTMenMTdatetimesep}{#1}}
4346 \DTMdefkey{en-MT}{timezonesep}{\renewcommand*{\DTMenMTtimezonesep}{#1}}
4347 \DTMdefkey{en-MT}{datesep}{\renewcommand*{\DTMenMTdatesep}{#1}}
4348 \DTMdefkey{en-MT}{timesep}{\renewcommand*{\DTMenMTtimesep}{#1}}
4349 % \end{macrocode}
4350 %
4351 % Define a boolean key that can switch between full and abbreviated
4352 % formats for the month and day of week names in the text format.
4353 % \begin{macrocode}
4354 \DTMdefboolkey{en-MT}{abbr}[true]{}
4355 % \end{macrocode}
4356 % The default is the full name.
4357 % \begin{macrocode}
4358 \DTMsetbool{en-MT}{abbr}{false}
4359 % \end{macrocode}
4360 %
4361 % Define a boolean key that determines if the time zone mappings
4362 % should be used.
4363 % \begin{macrocode}
4364 \DTMdefboolkey{en-MT}{mapzone}[true]{}
4365 % \end{macrocode}
4366 % The default is to use mappings.
4367 % \begin{macrocode}
4368 \DTMsetbool{en-MT}{mapzone}{true}
4369 % \end{macrocode}
4370 %
4371 % Define a boolean key that determines whether to show or hide the
4372 % day of the month. (Called "showdayofmonth" instead of "showday" to
4373 % avoid confusion with the day of the week.)
4374 % \begin{macrocode}
4375 \DTMdefboolkey{en-MT}{showdayofmonth}[true]{}
4376 % \end{macrocode}
4377 % The default is to show the day of the month.
4378 % \begin{macrocode}
4379 \DTMsetbool{en-MT}{showdayofmonth}{true}
4380 % \end{macrocode}
4381 %
4382 % Define a boolean key that determines whether to show or hide the
4383 % year.
4384 % \begin{macrocode}
4385 \DTMdefboolkey{en-MT}{showyear}[true]{}
4386 % \end{macrocode}
4387 % The default is to show the year.
4388 % \begin{macrocode}
4389 \DTMsetbool{en-MT}{showyear}{true}
4390 % \end{macrocode}
4391 %
4392 %\begin{macro}{\DTMenMTfmtordsuffix}
4393 % Define the ordinal suffix to be used by this style.
4394 % \begin{macrocode}
4395 \newcommand*{\DTMenMTfmtordsuffix}[1]{}
4396 % \end{macrocode}
4397 %\end{macro}
4398 %
4399 % Define a setting to change the ordinal suffix style.
4400 %\changes{1.05}{2019-10-21}{renamed scratch variables}
4401 % \begin{macrocode}
4402 \DTMdefchoicekey{en-MT}{ord}[\@dtm@val\@dtm@nr]{level,raise,omit,sc}{%
4403 \ifcase\@dtm@nr\relax
4404 \renewcommand*{\DTMenMTfmtordsuffix}[1]{##1}%
4405 \or
4406 \renewcommand*{\DTMenMTfmtordsuffix}[1]{%
4407 \DTMtexorpdfstring{\protect\textsuperscript{##1}}{##1}}%
4408 \or
4409 \renewcommand*{\DTMenMTfmtordsuffix}[1]{}%
4410 \or
4411 \renewcommand*{\DTMenMTfmtordsuffix}[1]{%
4412 \DTMtexorpdfstring{\protect\textsc{##1}}{##1}}%
4413 \fi
4414 }
4415 % \end{macrocode}
4416 %
4417 % Define the "en-MT" style.
4418 % \begin{macrocode}
4419 \DTMnewstyle
4420 {en-MT}% label
4421 {% date style
4422 \renewcommand*{\DTMenglishfmtordsuffix}{\DTMenMTfmtordsuffix}%
4423 \renewcommand*\DTMdisplaydate[4]{%
4424 \ifDTMshowdow
4425 \ifnum##4>-1 % space intended
4426 \DTMifbool{en-MT}{abbr}%
4427 {\DTMenglishshortweekdayname{##4}}%
4428 {\DTMenglishweekdayname{##4}}%
4429 \DTMenMTdowdaysep
4430 \fi
4431 \fi
4432 \DTMifbool{en-MT}{showdayofmonth}%
4433 {%
4434 \DTMenglishordinal{##3}%
4435 \DTMenMTdaymonthsep
4436 }%
4437 {}%
4438 \DTMifbool{en-MT}{abbr}%
4439 {\DTMenglishshortmonthname{##2}}%
4440 {\DTMenglishmonthname{##2}}%
4441 \DTMifbool{en-MT}{showyear}%
4442 {%
4443 \DTMenMTmonthyearsep\number##1 % space intended
4444 }%
4445 {}%
4446 }%
4447 \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
4448 }%
4449 {% time style
4450 \renewcommand*\DTMenglishtimesep{\DTMenMTtimesep}%
4451 \DTMsettimestyle{englishampm}%
4452 }%
4453 {% zone style
4454 \DTMresetzones
4455 \DTMenMTzonemaps
4456 \renewcommand*{\DTMdisplayzone}[2]{%
4457 \DTMifbool{en-MT}{mapzone}%
4458 {\DTMusezonemapordefault{##1}{##2}}%
4459 {%
4460 \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
4461 \ifDTMshowzoneminutes\DTMenMTtimesep\DTMtwodigits{##2}\fi
4462 }%
4463 }%
4464 }%
4465 {% full style
4466 \renewcommand*{\DTMdisplay}[9]{%
4467 \ifDTMshowdate
4468 \DTMdisplaydate{##1}{##2}{##3}{##4}%
4469 \DTMenMTdatetimesep
4470 \fi
4471 \DTMdisplaytime{##5}{##6}{##7}%
4472 \ifDTMshowzone
4473 \DTMenMTtimezonesep
4474 \DTMdisplayzone{##8}{##9}%
4475 \fi
4476 }%
4477 \renewcommand*{\DTMDisplay}{\DTMdisplay}%
4478 }%
4479 % \end{macrocode}
4480 %
4481 % Define numeric style.
4482 % \begin{macrocode}
4483 \DTMnewstyle
4484 {en-MT-numeric}% label
4485 {% date style
4486 \renewcommand*\DTMdisplaydate[4]{%
4487 \DTMifbool{en-MT}{showdayofmonth}%
4488 {%
4489 \number##3 % space intended
4490 \DTMenMTdatesep
4491 }%
4492 {}%
4493 \number##2 % space intended
4494 \DTMifbool{en-MT}{showyear}%
4495 {%
4496 \DTMenMTdatesep
4497 \number##1 % space intended
4498 }%
4499 {}%
4500 }%
4501 \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
4502 }%
4503 {% time style
4504 \renewcommand*\DTMdisplaytime[3]{%
4505 \number##1
4506 \DTMenMTtimesep\DTMtwodigits{##2}%
4507 \ifDTMshowseconds\DTMenMTtimesep\DTMtwodigits{##3}\fi
4508 }%
4509 }%
4510 {% zone style
4511 \DTMresetzones
4512 \DTMenMTzonemaps
4513 \renewcommand*{\DTMdisplayzone}[2]{%
4514 \DTMifbool{en-MT}{mapzone}%
4515 {\DTMusezonemapordefault{##1}{##2}}%
4516 {%
4517 \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
4518 \ifDTMshowzoneminutes\DTMenMTtimesep\DTMtwodigits{##2}\fi
4519 }%
4520 }%
4521 }%
4522 {% full style
4523 \renewcommand*{\DTMdisplay}[9]{%
4524 \ifDTMshowdate
4525 \DTMdisplaydate{##1}{##2}{##3}{##4}%
4526 \DTMenMTdatetimesep
4527 \fi
4528 \DTMdisplaytime{##5}{##6}{##7}%
4529 \ifDTMshowzone
4530 \DTMenMTtimezonesep
4531 \DTMdisplayzone{##8}{##9}%
4532 \fi
4533 }%
4534 \renewcommand*{\DTMDisplay}{\DTMdisplay}%
4535 }
4536 % \end{macrocode}
4537 %
4538 %\begin{macro}{\DTMenMTzonemaps}
4539 % The time zone mappings are set through this command, which can be
4540 % redefined if extra mappings are required or mappings need to be
4541 % removed.
4542 % \begin{macrocode}
4543 \newcommand*{\DTMenMTzonemaps}{%
4544 \DTMdefzonemap{02}{00}{CEST}%
4545 \DTMdefzonemap{01}{00}{CET}%
4546 }
4547 % \end{macrocode}
4548 %\end{macro}
4549 %
4550 % Switch style according to the \opt{useregional} setting.
4551 % \begin{macrocode}
4552 \DTMifcaseregional
4553 {}% do nothing
4554 {\DTMsetstyle{en-MT}}%
4555 {\DTMsetstyle{en-MT-numeric}}%
4556 % \end{macrocode}
4557 %
4558 % Redefine \cs{dateenglish} (or \cs{date}\meta{dialect}) to prevent
4559 % \sty{babel} from resetting \cs{today}. (For this to work,
4560 % \sty{babel} must already have been loaded if it's required.)
4561 % \begin{macrocode}
4562 \ifcsundef{date\CurrentTrackedDialect}
4563 {% do nothing
4564 \ifundef\dateenglish
4565 {%
4566 }%
4567 {%
4568 \def\dateenglish{%
4569 \DTMifcaseregional
4570 {}% do nothing
4571 {\DTMsetstyle{en-MT}}%
4572 {\DTMsetstyle{en-MT-numeric}}%
4573 }%
4574 }%
4575 }%
4576 {%
4577 \csdef{date\CurrentTrackedDialect}{%
4578 \DTMifcaseregional
4579 {}% do nothing
4580 {\DTMsetstyle{en-MT}}%
4581 {\DTMsetstyle{en-MT-numeric}}%
4582 }%
4583 }%
4584 % \end{macrocode}
4585 %
4586 %\iffalse
4587 % \begin{macrocode}
4588 %</datetime2-en-MT.ldf>
4589 % \end{macrocode}
4590 %\fi
4591 %\subsection{English (IE) Code (\texttt{datetime2-en-IE.ldf})}
4592 %This file contains the \texttt{en-IE} style.
4593 %\changes{1.0}{2015-03-24}{Initial release}
4594 %\iffalse
4595 % \begin{macrocode}
4596 %<*datetime2-en-IE.ldf>
4597 % \end{macrocode}
4598 %\fi
4599 %
4600 % Identify this module.
4601 % \begin{macrocode}
4602 \ProvidesDateTimeModule{en-IE}[2019/10/21 v1.05 (NLCT)]
4603 % \end{macrocode}
4604 % Load base English module.
4605 % \begin{macrocode}
4606 \RequireDateTimeModule{english-base}
4607 % \end{macrocode}
4608 %
4609 % Allow the user a way of configuring the "en-IE" and
4610 % "en-IE-numeric" styles. This doesn't use the package wide separators such as
4611 % \cs{dtm@datetimesep} in case other date formats are also required.
4612 %
4613 %\begin{macro}{\DTMenIEdowdaysep}
4614 %\changes{1.04}{2016-03-09}{new}
4615 % The separator between the day and month for the text format.
4616 % \begin{macrocode}
4617 \newcommand*{\DTMenIEdowdaysep}{\space}
4618 % \end{macrocode}
4619 %\end{macro}
4620 %
4621 %\begin{macro}{\DTMenIEdaymonthsep}
4622 % The separator between the day and month for the text format.
4623 % \begin{macrocode}
4624 \newcommand*{\DTMenIEdaymonthsep}{\space}
4625 % \end{macrocode}
4626 %\end{macro}
4627 %
4628 %\begin{macro}{\DTMenIEmonthyearsep}
4629 % The separator between the month and year for the text format.
4630 % \begin{macrocode}
4631 \newcommand*{\DTMenIEmonthyearsep}{\space}
4632 % \end{macrocode}
4633 %\end{macro}
4634 %
4635 %\begin{macro}{\DTMenIEdatetimesep}
4636 % The separator between the date and time blocks in the full format
4637 % (either text or numeric).
4638 % \begin{macrocode}
4639 \newcommand*{\DTMenIEdatetimesep}{\space}
4640 % \end{macrocode}
4641 %\end{macro}
4642 %
4643 %\begin{macro}{\DTMenIEtimezonesep}
4644 % The separator between the time and zone blocks in the full format
4645 % (either text or numeric).
4646 % \begin{macrocode}
4647 \newcommand*{\DTMenIEtimezonesep}{\space}
4648 % \end{macrocode}
4649 %\end{macro}
4650 %
4651 %\begin{macro}{\DTMenIEdatesep}
4652 % The separator for the numeric date format.
4653 % \begin{macrocode}
4654 \newcommand*{\DTMenIEdatesep}{/}
4655 % \end{macrocode}
4656 %\end{macro}
4657 %
4658 %\begin{macro}{\DTMenIEtimesep}
4659 % The separator for the numeric time format.
4660 % \begin{macrocode}
4661 \newcommand*{\DTMenIEtimesep}{:}
4662 % \end{macrocode}
4663 %\end{macro}
4664 %
4665 %Provide keys that can be used in \cs{DTMlangsetup} to set these
4666 %separators.
4667 % \begin{macrocode}
4668 \DTMdefkey{en-IE}{dowdaysep}{\renewcommand*{\DTMenIEdowdaysep}{#1}}
4669 \DTMdefkey{en-IE}{daymonthsep}{\renewcommand*{\DTMenIEdaymonthsep}{#1}}
4670 \DTMdefkey{en-IE}{monthyearsep}{\renewcommand*{\DTMenIEmonthyearsep}{#1}}
4671 \DTMdefkey{en-IE}{datetimesep}{\renewcommand*{\DTMenIEdatetimesep}{#1}}
4672 \DTMdefkey{en-IE}{timezonesep}{\renewcommand*{\DTMenIEtimezonesep}{#1}}
4673 \DTMdefkey{en-IE}{datesep}{\renewcommand*{\DTMenIEdatesep}{#1}}
4674 \DTMdefkey{en-IE}{timesep}{\renewcommand*{\DTMenIEtimesep}{#1}}
4675 % \end{macrocode}
4676 %
4677 % Define a boolean key that can switch between full and abbreviated
4678 % formats for the month and day of week names in the text format.
4679 % \begin{macrocode}
4680 \DTMdefboolkey{en-IE}{abbr}[true]{}
4681 % \end{macrocode}
4682 % The default is the full name.
4683 % \begin{macrocode}
4684 \DTMsetbool{en-IE}{abbr}{false}
4685 % \end{macrocode}
4686 %
4687 % Define a boolean key that determines if the time zone mappings
4688 % should be used.
4689 % \begin{macrocode}
4690 \DTMdefboolkey{en-IE}{mapzone}[true]{}
4691 % \end{macrocode}
4692 % The default is to use mappings.
4693 % \begin{macrocode}
4694 \DTMsetbool{en-IE}{mapzone}{true}
4695 % \end{macrocode}
4696 %
4697 % Define a boolean key that determines whether to show or hide the
4698 % day of the month. (Called "showdayofmonth" instead of "showday" to
4699 % avoid confusion with the day of the week.)
4700 % \begin{macrocode}
4701 \DTMdefboolkey{en-IE}{showdayofmonth}[true]{}
4702 % \end{macrocode}
4703 % The default is to show the day of the month.
4704 % \begin{macrocode}
4705 \DTMsetbool{en-IE}{showdayofmonth}{true}
4706 % \end{macrocode}
4707 %
4708 % Define a boolean key that determines whether to show or hide the
4709 % year.
4710 % \begin{macrocode}
4711 \DTMdefboolkey{en-IE}{showyear}[true]{}
4712 % \end{macrocode}
4713 % The default is to show the year.
4714 % \begin{macrocode}
4715 \DTMsetbool{en-IE}{showyear}{true}
4716 % \end{macrocode}
4717 %
4718 %\begin{macro}{\DTMenIEfmtordsuffix}
4719 % Define the ordinal suffix to be used by this style.
4720 % \begin{macrocode}
4721 \newcommand*{\DTMenIEfmtordsuffix}[1]{#1}
4722 % \end{macrocode}
4723 %\end{macro}
4724 %
4725 % Define a setting to change the ordinal suffix style.
4726 %\changes{1.05}{2019-10-21}{renamed scratch variables}
4727 % \begin{macrocode}
4728 \DTMdefchoicekey{en-IE}{ord}[\@dtm@val\@dtm@nr]{level,raise,omit,sc}{%
4729 \ifcase\@dtm@nr\relax
4730 \renewcommand*{\DTMenIEfmtordsuffix}[1]{##1}%
4731 \or
4732 \renewcommand*{\DTMenIEfmtordsuffix}[1]{%
4733 \DTMtexorpdfstring{\protect\textsuperscript{##1}}{##1}}%
4734 \or
4735 \renewcommand*{\DTMenIEfmtordsuffix}[1]{}%
4736 \or
4737 \renewcommand*{\DTMenIEfmtordsuffix}[1]{%
4738 \DTMtexorpdfstring{\protect\textsc{##1}}{##1}}%
4739 \fi
4740 }
4741 % \end{macrocode}
4742 %
4743 % Define the "en-IE" style.
4744 % \begin{macrocode}
4745 \DTMnewstyle
4746 {en-IE}% label
4747 {% date style
4748 \renewcommand*{\DTMenglishfmtordsuffix}{\DTMenIEfmtordsuffix}%
4749 \renewcommand*\DTMdisplaydate[4]{%
4750 \ifDTMshowdow
4751 \ifnum##4>-1 % space intended
4752 \DTMifbool{en-IE}{abbr}%
4753 {\DTMenglishshortweekdayname{##4}}%
4754 {\DTMenglishweekdayname{##4}}%
4755 \DTMenIEdowdaysep
4756 \fi
4757 \fi
4758 \DTMifbool{en-IE}{showdayofmonth}%
4759 {%
4760 \DTMenglishordinal{##3}%
4761 \DTMenIEdaymonthsep
4762 }%
4763 {}%
4764 \DTMifbool{en-IE}{abbr}%
4765 {\DTMenglishshortmonthname{##2}}%
4766 {\DTMenglishmonthname{##2}}%
4767 \DTMifbool{en-IE}{showyear}%
4768 {%
4769 \DTMenIEmonthyearsep\number##1 % space intended
4770 }%
4771 {}%
4772 }%
4773 \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
4774 }%
4775 {% time style
4776 \renewcommand*\DTMenglishtimesep{\DTMenIEtimesep}%
4777 \DTMsettimestyle{englishampm}%
4778 }%
4779 {% zone style
4780 \DTMresetzones
4781 \DTMenIEzonemaps
4782 \renewcommand*{\DTMdisplayzone}[2]{%
4783 \DTMifbool{en-IE}{mapzone}%
4784 {\DTMusezonemapordefault{##1}{##2}}%
4785 {%
4786 \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
4787 \ifDTMshowzoneminutes\DTMenIEtimesep\DTMtwodigits{##2}\fi
4788 }%
4789 }%
4790 }%
4791 {% full style
4792 \renewcommand*{\DTMdisplay}[9]{%
4793 \ifDTMshowdate
4794 \DTMdisplaydate{##1}{##2}{##3}{##4}%
4795 \DTMenIEdatetimesep
4796 \fi
4797 \DTMdisplaytime{##5}{##6}{##7}%
4798 \ifDTMshowzone
4799 \DTMenIEtimezonesep
4800 \DTMdisplayzone{##8}{##9}%
4801 \fi
4802 }%
4803 \renewcommand*{\DTMDisplay}{\DTMdisplay}%
4804 }%
4805 % \end{macrocode}
4806 %
4807 % Define numeric style.
4808 % \begin{macrocode}
4809 \DTMnewstyle
4810 {en-IE-numeric}% label
4811 {% date style
4812 \renewcommand*\DTMdisplaydate[4]{%
4813 \DTMifbool{en-IE}{showdayofmonth}%
4814 {%
4815 \number##3 % space intended
4816 \DTMenIEdatesep
4817 }%
4818 {}%
4819 \number##2 % space intended
4820 \DTMifbool{en-IE}{showyear}%
4821 {%
4822 \DTMenIEdatesep
4823 \number##1 % space intended
4824 }%
4825 {}%
4826 }%
4827 \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
4828 }%
4829 {% time style
4830 \renewcommand*\DTMdisplaytime[3]{%
4831 \number##1
4832 \DTMenIEtimesep\DTMtwodigits{##2}%
4833 \ifDTMshowseconds\DTMenIEtimesep\DTMtwodigits{##3}\fi
4834 }%
4835 }%
4836 {% zone style
4837 \DTMresetzones
4838 \DTMenIEzonemaps
4839 \renewcommand*{\DTMdisplayzone}[2]{%
4840 \DTMifbool{en-IE}{mapzone}%
4841 {\DTMusezonemapordefault{##1}{##2}}%
4842 {%
4843 \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
4844 \ifDTMshowzoneminutes\DTMenIEtimesep\DTMtwodigits{##2}\fi
4845 }%
4846 }%
4847 }%
4848 {% full style
4849 \renewcommand*{\DTMdisplay}[9]{%
4850 \ifDTMshowdate
4851 \DTMdisplaydate{##1}{##2}{##3}{##4}%
4852 \DTMenIEdatetimesep
4853 \fi
4854 \DTMdisplaytime{##5}{##6}{##7}%
4855 \ifDTMshowzone
4856 \DTMenIEtimezonesep
4857 \DTMdisplayzone{##8}{##9}%
4858 \fi
4859 }%
4860 \renewcommand*{\DTMDisplay}{\DTMdisplay}%
4861 }
4862 % \end{macrocode}
4863 %
4864 %\begin{macro}{\DTMenIEzonemaps}
4865 % The time zone mappings are set through this command, which can be
4866 % redefined if extra mappings are required or mappings need to be
4867 % removed.
4868 % \begin{macrocode}
4869 \newcommand*{\DTMenIEzonemaps}{%
4870 \DTMdefzonemap{00}{00}{GMT}%
4871 \DTMdefzonemap{01}{00}{IST}%
4872 }
4873 % \end{macrocode}
4874 %\end{macro}
4875 %
4876 % Switch style according to the \opt{useregional} setting.
4877 % \begin{macrocode}
4878 \DTMifcaseregional
4879 {}% do nothing
4880 {\DTMsetstyle{en-IE}}%
4881 {\DTMsetstyle{en-IE-numeric}}%
4882 % \end{macrocode}
4883 %
4884 % Redefine \cs{dateenglish} (or \cs{date}\meta{dialect}) to prevent
4885 % \sty{babel} from resetting \cs{today}. (For this to work,
4886 % \sty{babel} must already have been loaded if it's required.)
4887 % \begin{macrocode}
4888 \ifcsundef{date\CurrentTrackedDialect}
4889 {% do nothing
4890 \ifundef\dateenglish
4891 {%
4892 }%
4893 {%
4894 \def\dateenglish{%
4895 \DTMifcaseregional
4896 {}% do nothing
4897 {\DTMsetstyle{en-IE}}%
4898 {\DTMsetstyle{en-IE-numeric}}%
4899 }%
4900 }%
4901 }%
4902 {%
4903 \csdef{date\CurrentTrackedDialect}{%
4904 \DTMifcaseregional
4905 {}% do nothing
4906 {\DTMsetstyle{en-IE}}%
4907 {\DTMsetstyle{en-IE-numeric}}%
4908 }%
4909 }%
4910 % \end{macrocode}
4911 %
4912 %\iffalse
4913 % \begin{macrocode}
4914 %</datetime2-en-IE.ldf>
4915 % \end{macrocode}
4916 %\fi
4917 %\Finale
4918 \endinput