%\iffalse
%<*package>
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%</package>
%\fi
% \iffalse
% Doc-Source file to use with LaTeX2e
% Copyright (C) 2015-2019 Nicola Talbot, all rights reserved.
% \fi
% \iffalse
%<*driver>
\documentclass{ltxdoc}

\usepackage{alltt}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[colorlinks,
            bookmarks,
            hyperindex=false,
            pdfauthor={Nicola L.C. Talbot},
            pdftitle={datetime2.sty English Module}]{hyperref}


\CheckSum{2727}

\renewcommand*{\usage}[1]{\hyperpage{#1}}
\renewcommand*{\main}[1]{\hyperpage{#1}}
\IndexPrologue{\section*{\indexname}\markboth{\indexname}{\indexname}}
\setcounter{IndexColumns}{2}

\newcommand*{\sty}[1]{\textsf{#1}}
\newcommand*{\opt}[1]{\texttt{#1}\index{#1=\texttt{#1}|main}}
\newcommand*{\utc}[2]{\textsc{utc}\ifnum#1<0 $-$\number-#1\else $+$\number#1\fi
 \ifnum#2>0 :\number#2 \fi\relax}

\RecordChanges
\PageIndex
\CodelineNumbered

\begin{document}
\DocInput{datetime2-english.dtx}
\end{document}
%</driver>
%\fi
%
%\MakeShortVerb{"}
%
%\title{English Module for datetime2 Package}
%\author{Nicola L. C. Talbot}
%\date{2019-10-21 (v1.05)}
%\maketitle
%
%\begin{abstract}
%This is the English language module for the \sty{datetime2}
%package. If you want to use the settings in this module you must
%install it in addition to installing \sty{datetime2}. If you use
%\sty{babel} or \sty{polyglossia}, you will need this module to
%prevent them from redefining \cs{today}. The \sty{datetime2}
% \opt{useregional} setting must be on (\texttt{text} or
% \texttt{numeric}) for the language styles to be set.
% Alternatively, you can set them in the document using
% \cs{DTMsetstyle}, but without the \opt{useregional} setting on the
% style will be changed by \cs{date}\meta{language}.
%\end{abstract}
%
%\tableofcontents
%\clearpage
%
%\section{Introduction}
%\label{sec:intro}
% This bundle provides the English modules for \sty{datetime2}.
% The basic "english" module is used when "english" has been 
% detected as one of the document's language settings but no
% regional variant has been detected. Note that the \sty{tracklang} 
% package can't detect the variant passed to \sty{polyglossia} unless it's been
% passed as a document class option or passed to \sty{tracklang}.
% See the \sty{tracklang} documentation for further details.
%
% Here are some examples for British English with
% \sty{polyglossia}:
%
%\begin{enumerate}
%\item Pass "british" in the document class option list:
%\begin{verbatim}
%\documentclass[british]{article}
%
%\usepackage{fontspec}
%\usepackage{polyglossia}
%\setmainlanguage[variant=uk]{english}
%\usepackage{datetime2}
%\end{verbatim}
%(You need to set the \opt{useregional} option to either
%\texttt{text} or \texttt{numeric} to enable the "en-GB" or
%"en-GB-numeric" styles.)
%
%\item Pass "en-GB" in the document class option list:
%\begin{verbatim}
%\documentclass[en-GB]{article}
%
%\usepackage{fontspec}
%\usepackage{polyglossia}
%\setdefaultlanguage[variant=uk]{english}
%
%\usepackage{datetime2}
%\end{verbatim}
%(You need to set the \opt{useregional} option to either
%\texttt{text} or \texttt{numeric} to enable the "en-GB" or
%"en-GB-numeric" styles.)
%
%\item Pass "en-GB" to \sty{datetime2}:
%\begin{verbatim}
%\documentclass{article}
%
%\usepackage{fontspec}
%\usepackage{polyglossia}
%\setdefaultlanguage[variant=uk]{english}
%
%\usepackage[en-GB]{datetime2}
%\end{verbatim}
% In this last example, the style is automatically switched to
% "en-GB".
%\end{enumerate}
%
%Note that if you pass the language setting through the
%\sty{datetime2} package option list (as in the above example)
%this will also set the \opt{useregional} option to \texttt{text}.
%
%If you're not using \sty{babel} or \sty{polyglossia} but still
% want to use the English modules, you can similarly use the language or
% regional setting in the document class or \sty{datetime2} package
% options. Note that since \sty{datetime2} loads \sty{tracklang},
% this setting will be remembered by any subsequently loaded
% packages that use \sty{tracklang} to determine the document
% language settings.
%
% For example, to use the "en-GB" date style without loading
% \sty{babel} or \sty{polyglossia}:
%\begin{verbatim}
%\documentclass{article}
%\usepackage[en-GB]{datetime2}
%\begin{document}
%\today
%\end{document}
%\end{verbatim}
%
% If you want to change the settings for a particular module, you
% must use the module's name (such as "en-GB") rather than a
% \sty{babel} or \sty{polyglossia} synonym (such as "british" or "uk").
% For example:
%\begin{verbatim}
%\DTMlangsetup[en-GB]{ord=raise}
%\end{verbatim}
%
%\section{Base module}
%\label{sec:base}
%The "english-base" module is loaded by all the English modules. It
%provides the commands that produce text, such as the month names.
%It also provides a 12 hour time style called \texttt{englishampm}.
%
%\section{English (no region)}
%\label{sec:english}
% The default "english" module is used when English has been set as
% one of the document languages, but no regional variant has been
% detected or there is no support for the given region.
%
% This basic module provides the date-time style "english" which
% uses the same style as \LaTeX's default \cs{today}. (That is, the
% middle-endian date style.) This style ignores most of the settings, including
% \opt{showdow} and the date separators. The time style uses the
% "englishampm" style defined in the base module which uses the
% package-wide \opt{hourminsep} setting. The zone style is the
% same as that provided by the "default" style. (That is, numerical
% ISO or just ``Z''.) The full date, time and zone style (used by \cs{DTMdisplay})
% have spaces between each block. The \opt{showdate}, \opt{showzone}, \opt{showseconds},
% \opt{showzoneminutes} and \opt{showisoZ} \sty{datetime2} settings are honoured.
%
%This module checks for the existence of \cs{dateenglish} or
%\cs{date}\meta{dialect} (in the case of an unknown English
%variant that doesn't match any of the supplied English dialect modules).
%If it exists, the command will be redefined so that it
%sets the date, time and zone styles to "english" if the
%\opt{useregional} setting is set to \texttt{text}. If the setting
%is \texttt{numeric} the "default" numeric style will be used as the
%lack of region makes it ambiguous.
%
%\section{English (GB)}
%\label{sec:en-GB}
%
%The "en-GB" module is loaded if British English has been specified.
%This may be specified through options such as "british", "en-GB" or
%"UKenglish". (See the note on \sty{polyglossia} in \S\ref{sec:intro}.)
%
% This module defines the text style "en-GB" and the
% numeric style "en-GB-numeric" style. The "en-GB" style will
% automatically be set if the \opt{useregional} option is
% set to \texttt{text}. The "en-GB-numeric" style will automatically
% be set if the \opt{useregional} option is set to \texttt{numeric}.
%
% The "en-GB" time style uses the base "englishampm" style.
%
% There are a number of settings provided that can be used in
% \cs{DTMlangsetup} to modify the date-time style. These are:
%
%\begin{description}
%\item[\opt{dowdaysep}] The separator between the day of week name and the
%day of month number. This defaults to \cs{space}. Ignored if the
%\opt{showdow} option is \opt{false}.
%
%\item[\opt{daymonthsep}] The separator between the day and the month
%name in the \texttt{en-GB} style. This defaults to \cs{space}.
%
%\item[\opt{monthyearsep}] The separator between the month name and year
% in the \texttt{en-GB} style. This defaults to \cs{space}.
%
%\item[\opt{datesep}] The separator between the date numbers in the
%"en-GB-numeric" style. This defaults to "/" (slash).
%
%\item[\opt{timesep}] The separator between the hours and minutes in the
%"en-GB-numeric" style. This defaults to ":" (colon).
%
%\item[\opt{datetimesep}] The separator between the date and time for the
%full date-time format (as used by \cs{DTMdisplay}) for both the
%"en-GB" and "en-GB-numeric" styles. This defaults
%to \cs{space}.
%
%\item[\opt{timezonesep}] The separator between the time and zone for the
%full date-time format (as used by \cs{DTMdisplay}) for both the 
%"en-GB" and "en-GB-numeric" styles. This defaults
%to \cs{space}.
%
%\item[\opt{abbr}] This is a~boolean key. If "true", the month (and week
%day name if shown) is abbreviated for the "en-GB" style. The default is "false".
%
%\item[\opt{mapzone}] This is a~boolean key. If "true" the time zone
%mappings are applied. (The default is \texttt{true}.) The "en-GB"
% and "en-GB-numeric" styles set the mappings GMT
%(\utc{00}{00}) and BST (\utc{01}{00}).
%Other time zone mappings that have previously been set 
%(for example, by another regional style) will remain unchanged 
%unless you redefine \cs{DTMresetzones} to reset or unset them.
%
%\item[\opt{ord}] This may take one of the following values: "level"
%(ordinal suffix level with the number), "raise" (ordinal suffix as
%a superscript\footnote{Just in case you plan to send me an irate
%email on this issue, the superscript is a regional handwriting
%style not an invention of word processors although they have
%adopted the style. I was using this style in school in the 1970s
%before I'd ever heard of a word processor so please don't tell me
%I've picked up the habit from Word. I'm not a time-traveller, nor
%were my primary school teachers\,---\,that I know of! If, conversely,
%you want to know why the default is \texttt{level} rather than
%\texttt{raise}, it's because the main purpose of the
%\sty{datetime2} package is to provide an \emph{expandable} text
%format and \cs{textsuperscript} isn't expandable.}),
% "omit" (omit the ordinal suffix) and "sc" (small
%caps ordinal suffix). If you want a different style you can
%redefine \cs{DTMenGBfmtordsuffix} which takes one argument (the
%suffix). Take care if \cs{DTMenGBfmtordsuffix} contains fragile
%commands, as they will need to be protected against expansion.
%
%\item[\opt{showdayofmonth}] A boolean key that determines whether
%or not to show the day of the month. The default value is "true".
%If "false" the day-month separator is also omitted.
%
%\item[\opt{showyear}] A boolean key that determines whether
%or not to show the year. The default value is "true". If "false"
%the month-year separator is also omitted.
%\end{description}
%
%The above settings are specific to this module. In addition, the
%\opt{showdow} boolean option provided by the \sty{datetime2} package is
%also checked to determine whether or not to show the day of the
%week in the "en-GB" style. 
%
%The time zone checks the \opt{mapzone}
%setting (described above). If it's set, then
%\cs{DTMusezonemapordefault} is used otherwise a numeric
%\meta{TZH}\meta{sep}\meta{TZM} is displayed. (The minute part will be
%omitted if the \sty{datetime2} package option \opt{showzoneminutes} is
%set to "false". The zone style ignores the \opt{showisoZ} option.
%
%
%\section{English (US)}
%\label{sec:en-US}
%
%The "en-US" module is loaded if US English has been specified. This
%may be done through options such as "american", "en-US" or
%"USenglish". (See the note on \sty{polyglossia} in \S\ref{sec:intro}.)
%
%This module defines the styles "en-US" and
%"en-US-numeric". There a number of settings that can be used in 
% \cs{DTMlangsetup} to modify these styles. They are:
%\begin{description}
%\item[\opt{monthdaysep}] The separator between the month name and
%the day in the "en-US" style. The default is \cs{space}
%
%\item[\opt{dayyearsep}] The separator between the day and the year
%in the "en-US" style.  The default is ",\space"
%
%\item[\opt{dowmonthsep}] The separator between the day-of-week
%name and the month name in the "en-US" style. The default is
%\cs{space}. This is new to version 1.02, which now supports the
%\opt{showdow} package option.
%
%\item[\opt{datesep}] The separator between the date numbers in the
%"en-US-numeric" format.
%
%\item[\opt{timesep}] The separator between the hour and minutes in the
%"en-US-numeric" format.
%
%\item[\opt{datetimesep}] The separator between the date and the
%time for the full style used by \cs{DTMdisplay} for the "en-US"
%and "en-US-numeric". The default is \cs{space}
%
%\item[\opt{timezonesep}] The separator between the times and 
%zone for the full style used by \cs{DTMdisplay}. The default is
%\cs{space}
%
%\item[\opt{abbr}] This is a~boolean key. If "true", the month 
%is abbreviated. The default is "false".
%
%\item[\opt{ord}] The same as the "en-GB" style except that the default
%value is "omit".
%
%\item[\opt{showdayofmonth}] A boolean key that determines whether
%or not to show the day of the month. The default value is "true".
%If "false" the day-year separator is also omitted.
%
%\item[\opt{showyear}] A boolean key that determines whether
%or not to show the year. The default value is "true". If "false"
%the day-year separator is also omitted if the day of the month is
%shown otherwise both the day-year and month-day separators are omitted.
%
%\item[\opt{mapzone}] This is a~boolean key. If "true" the time zone
%mappings are applied. (The default is \texttt{false}.) The "en-US" style sets the mappings ADT
%(\utc{-03}{00}), AST (\utc{-04}{00}), EST (\utc{-05}{00}), CST
%(\utc{-06}{00}),
%MST (\utc{-07}{00}) and PST (\utc{-08}{00}). If your want to use different
%mappings, you can redefine \cs{DTMenUSzonemaps}.
%Other time zone mappings that have previously been set 
%(for example, by another regional style) will remain unchanged 
%unless you redefine \cs{DTMresetzones} to reset or unset them.
%
%\item[\opt{zone}] (new to v1.03) As mentioned above, if the \opt{mapzone} 
% option is set, the time zone mappings are set using \cs{DTMenUSzonemaps}.
% This option can be used to both append to \cs{DTMenUSzonemaps} and
% set the new mappings. The \opt{zone} option may take one of the
% following values:
% \begin{itemize}
% \item \opt{std} or \opt{standard}: set the standard time zone
% mappings AST (\utc{-4}{00}), EST (\utc{-5}{00}), CST (\utc{-6}{00}), MST
% (\utc{-7}{00}), PST (\utc{-8}{00}), AKST (\utc{-9}{00}), HAST (\utc{-10}{00}), SST
% (\utc{-10}{00}), ChST (\utc{10}{00}).
% \item \opt{dst} or \opt{daylight}: set the daylight savings time
% zone mappings ADT (\utc{-3}{00}), EDT (\utc{-4}{00}), CDT (\utc{-6}{00}), MDT
% (\utc{-6}{00}), PDT (\utc{-7}{00}), AKDT (\utc{-8}{00}), HADT (\utc{-9}{00}).
% \item \opt{atlantic}: set the Atlantic standard and daylight
% saving mappings AST (\utc{-4}{00}) and ADT (\utc{-3}{00}).
% \item \opt{eastern}: set the Eastern standard and daylight
% saving mappings EST (\utc{-5}{00}) and EDT (\utc{-4}{00}).
% \item \opt{central}: set the Central standard and daylight
% saving mappings CST (\utc{-6}{00}) and CDT (\utc{-5}{00}).
% \item \opt{mountain}: set the Mountain standard and daylight
% saving mappings MST (\utc{-7}{00}) and MDT (\utc{-6}{00}).
% \item \opt{pacific}: set the Pacific standard and daylight
% saving mappings PST (\utc{-8}{00}) and PDT (\utc{-7}{00}).
% \item \opt{alaska}: set the Alaska standard and daylight
% saving mappings AKST (\utc{-9}{00}) and AKDT (\utc{-8}{00}).
% \item \opt{hawaii-aleutian} or \opt{hawaii} or \opt{aleutian}: 
% set the Hawaii-Aleutian standard and daylight
% saving mappings HAST (\utc{-10}{00}) and HADT (\utc{-9}{00}).
% \item \opt{samoa}: set the Samoa Standard Time mapping SST (\utc{-11}{00}).
% \item \opt{chamorro}: set the Chamorro Standard Time mapping ChST (\utc{-10}{00}).
% \item \opt{clear}: redefines \cs{DTMenUSzonemaps} to empty and
% clears the mappings (using \cs{DTMclearmap}) for \utc{-3}{00}, \utc{-4}{00},
% \utc{-5}{00}, \utc{-6}{00}, \utc{-7}{00}, \utc{-8}{00}, \utc{-9}{00}, \utc{-10}{00}, 
% \utc{-11}{00} and \utc{10}{00}.
% \end{itemize}
% Other existing mappings are unchanged. For example,
%\begin{verbatim}
%\DTMlangsetup[en-US]{zone=atlantic,zone=pacific}
%\end{verbatim}
% will set the mappings AST (\utc{-4}{00}), ADT (\utc{-3}{00}), PST (\utc{-8}{00})
% and PDT (\utc{-7}{00}). Any other time zone offset mappings that were
% previously set will remain the same. However:
%\begin{verbatim}
%\DTMlangsetup[en-US]{zone=atlantic,zone=eastern}
%\end{verbatim}
% will result in the mappings ADT (\utc{-3}{00}), EST (\utc{-5}{00}) and EDT
% (\utc{-4}{00}), since the EDT mapping will overwrite the AST mapping.
% Again, any other time zone offset mappings that were previously
% set remain the same.
%
% Another example:
%\begin{verbatim}
%\DTMlangsetup[en-US]{zone=dst,zone=atlantic,zone=pacific}
%\end{verbatim}
% This will first set the daylight saving mappings and then set the
% Atlantic mappings, which means that \utc{-4}{00} will now be mapped to
% AST instead of EDT, and then it will set the Pacific mappings,
% which means that \utc{-8}{00} will now be mapped to PST instead of
% AKDT.
%\end{description}
%
%The "en-US" time style uses the "englishampm" style. The "en-US-numeric"
%uses a 24 hour style. The time zone checks the \opt{mapzone}
%setting (described above). If it's set, then
%\cs{DTMusezonemapordefault} is used otherwise a numeric
%\meta{TZH}:\meta{TZM} is displayed. (The minute part will be
%omitted if the \sty{datetime2} package option \opt{showzoneminutes} is
%set to "false". The zone style ignores the \opt{showisoZ} option.
%
%\section{English (CA)}
%\label{sec:en-CA}
%
%The "en-CA" module is loaded if Canadian English has been specified. This
%may be done through options such as "en-CA" or
%"canadian". (See the note on \sty{polyglossia} in \S\ref{sec:intro}.)
%
% This module provides the "en-CA" and "en-CA-numeric" styles
% that are virtually identical to the "en-US" and "en-US-numeric" style.
% These have the same options as for the US styles but the zone maps
% are provided by \cs{DTMenCAzonemaps}, which can be redefined as required.
% As from v1.03, there's also a \opt{zone} setting that works in a
% similar manner to the \opt{zone} setting for the "en-US" module
% described above. For "en-CA", the
% available values are:
% \begin{itemize}
% \item \opt{std} or \opt{standard}: set the standard time zone
% mappings NST (\utc{-3}{30}), AST (\utc{-4}{00}), EST (\utc{-5}{00}), CST (\utc{-6}{00}), MST
% (\utc{-7}{00}), PST (\utc{-8}{00}).
% \item \opt{dst} or \opt{daylight}: set the daylight savings time
% zone mappings NDT (\utc{-2}{30}), ADT (\utc{-3}{00}), EDT (\utc{-4}{00}), CDT (\utc{-6}{00}),
% MDT (\utc{-6}{00}), PDT (\utc{-7}{00}).
% \item \opt{newfoundland}: set the Newfoundland standard and daylight
% saving mappings NST (\utc{-3}{30}) and NDT (\utc{-2}{30}).
% \item \opt{atlantic}: set the Atlantic standard and daylight
% saving mappings AST (\utc{-4}{00}) and ADT (\utc{-3}{00}).
% \item \opt{eastern}: set the Eastern standard and daylight
% saving mappings EST (\utc{-5}{00}) and EDT (\utc{-4}{00}).
% \item \opt{central}: set the Central standard and daylight
% saving mappings CST (\utc{-6}{00}) and CDT (\utc{-5}{00}).
% \item \opt{mountain}: set the Mountain standard and daylight
% saving mappings MST (\utc{-7}{00}) and MDT (\utc{-6}{00}).
% \item \opt{pacific}: set the Pacific standard and daylight
% saving mappings PST (\utc{-8}{00}) and PDT (\utc{-7}{00}).
% \item \opt{clear}: redefines \cs{DTMenCAzonemaps} to empty and
% clears the mappings (using \cs{DTMclearmap}) for \utc{-2}{30},
% \utc{-3}{30}, \utc{-3}{00}, \utc{-4}{00}, \utc{-5}{00}, \utc{-6}{00}, \utc{-7}{00} and \utc{-8}{00}.
% \end{itemize}
% For example, if you live in a region that doesn't implement
% daylight saving:
%\begin{verbatim}
%\DTMlangsetup[en-CA]{zone=std}
%\end{verbatim}
%
%\section{English (AU)}
%\label{sec:en-AU}
%
%The "en-AU" module is loaded if Australian English has been specified. This
%may be done through options such as "en-AU" or
%"australian". (See the note on \sty{polyglossia} in \S\ref{sec:intro}.)
%
% This module provides the "en-AU" and "en-AU-numeric" styles that
% are virtually identical to the "en-GB" and "en-GB-numeric" styles.
% These have the same options as the GB styles (except that the default value of
% \opt{ord} is "omit" rather than "level" and the default value of
% "mapzone" is false) but the zone maps are provided by
%\cs{DTMenAUzonemaps}, which can be redefined as required. This
%doesn't take all zones into account, but as from v1.03, there is
%now the \opt{zone} option, which modifies \cs{DTMenAUzonemaps}.
%This works in much the same way as for the "en-US" and "en-CA"
%options of the same name, described above. Available values for the "en-AU" module:
% \begin{itemize}
% \item \opt{std} or \opt{standard}: set the standard time zone
% mappings CCT (\utc{6}{30}), CXT (\utc{7}{00}), AWST (\utc{8}{00}), ACWST (\utc{8}{45}),
% ACST (\utc{9}{30}), AEST (\utc{10}{00}), LHST (\utc{10}{30}),
% NFT (\utc{11}{00}).
% \item \opt{dst} or \opt{daylight}: set the daylight savings time
% zone mappings AWDT (\utc{9}{00}), ACDT (\utc{10}{30}), AEDT (\utc{11}{00}).
% Note that conflicting zones are missing, such as LHDT (\utc{11}{00})
% which coincides with AEDT.
% \item \opt{central}: set the Australian Central standard and daylight
% saving mappings ACST (\utc{9}{30}) and ACDT (\utc{10}{30}).
% \item \opt{central-western}: set the Australian Central Western
% Standard Time mapping ACWST (\utc{8}{45}).
% \item \opt{western}: set the Australian Western standard and daylight
% saving mappings AWST (\utc{8}{0}) and AWDT (\utc{9}{0}).
% \item \opt{eastern}: set the Australian Eastern standard and daylight
% saving mappings AEST (\utc{10}{0}) and AEDT (\utc{11}{0}).
% \item \opt{christmas}: set the Christmas Island Time mapping CXT
% (\utc{7}{0}).
% \item \opt{lord-howe}: set the Lord Howe Island standard and daylight
% saving mappings LHST (\utc{10}{30}) and LHDT (\utc{11}{0}).
% \item \opt{norfolk}: set the Norfolk Island
% time mapping NFT (\utc{11}{0}).
% \item \opt{cocos} or \opt{keeling}: set the Cocos (Keeling) island
% time mapping CCT (\utc{6}{30}).
% \item \opt{clear}: redefines \cs{DTMenAUzonemaps} to empty and
% clears the mappings (using \cs{DTMclearmap}) for \utc{6}{30},
% \utc{7}{00}, \utc{8}{00}, \utc{8}{45}, \utc{9}{00}, \utc{9}{30}, \utc{10}{00},
% \utc{10}{30}, \utc{11}{00}. 
% \end{itemize}
%Example:
%\begin{verbatim}
%\DTMlangsetup[en-AU]{zone=cocos,zone=christmas}
%\end{verbatim}
%
%\section{English (NZ)}
%\label{sec:en-NZ}
%
%The "en-NZ" module is loaded if New Zealand English has been specified. This
%may be done through options such as "en-NZ" or
%"newzealand". (See the note on \sty{polyglossia} in \S\ref{sec:intro}.)
%
% This module provides the "en-NZ" and "en-NZ-numeric" styles that
% are virtually identical to the "AU" styles but the zone maps are provided by
%\cs{DTMenNZzonemaps}, which can be redefined as required.
% The default NZ mappings are NZST (\utc{12}{00}), CHAST (\utc{12}{45}),
% NZDT (\utc{13}{00}), CHADT (\utc{13}{45}).
%
%\section{English (GG)}
%\label{sec:en-GG}
%
% The Guernsey English "en-GG" and "en-GG-numeric" styles are like the 
% British English "en-GB" and "en-GB-numeric" styles, but replace \texttt{enGB}
% with \texttt{enGG} in the command names. This style can be loaded
% by using \texttt{en-GG} as a document class option or as a
% package option for either \sty{tracklang} or \sty{datetime2}.
%
%\section{English (JE)}
%\label{sec:en-JE}
% The Jersey English "en-JE" and "en-JE-numeric" styles are like the 
% British English "en-GB" and "en-GB-numeric" styles, but replace \texttt{enGB}
% with \texttt{enJE} in the command names. This style can be loaded
% by using \texttt{en-JE} as a document class option or as a
% package option for either \sty{tracklang} or \sty{datetime2}.
%
%\section{English (IM)}
%\label{sec:en-IM}
% The Isle of Man "en-IM" and "en-IM-numeric" styles are like the 
% British English "en-GB" and "en-GB-numeric" styles, but replace \texttt{enGB}
% with \texttt{enIM} in the command names. This style can be loaded
% by using \texttt{en-IM} as a document class option or as a
% package option for either \sty{tracklang} or \sty{datetime2}.
%
%\section{English (MT)}
%\label{sec:en-MT}
% The Malta English "en-MT" and "en-MT-numeric" styles are like the 
% British English "en-GB" and "en-GB-numeric" styles, but replace \texttt{enGB}
% with \texttt{enMT} in the command names. This style can be loaded
% by using \texttt{en-MT} as a document class option or as a
% package option for either \sty{tracklang} or \sty{datetime2}.
%
% There are two main differences in the
% \texttt{en-GB}\slash\texttt{en-GB-numeric} and
% \texttt{en-MT}\slash\texttt{en-MT-numeric} styles: the \opt{ord} option
% (for the text styles) defaults to
% \texttt{omit} and the CET (\utc{1}{0}) and CEST (\utc{2}{0}) time zone
% mappings are added (for both the text and numeric styles).
%
%\section{English (IE)}
%\label{sec:en-IE}
% The Republic of Ireland English "en-IE" and "en-IE-numeric" styles are like the 
% British English "en-GB" and "en-GB-numeric" styles, but replace \texttt{enGB}
% with \texttt{enIE} in the command names. This style can be loaded
% by using \texttt{en-IE} as a document class option or as a
% package option for either \sty{tracklang} or \sty{datetime2}.
% You will need at least version 1.2 of the \sty{tracklang} package
% installed.
%
% The only difference in the
% \texttt{en-GB}\slash\texttt{en-GB-numeric} and
% \texttt{en-IE}\slash\texttt{en-IE-numeric} styles is that
% the \utc{1}{0} time zone is mapped to IST instead of
% BST. If you prefer WET/WEST time zones, you can do:
%\begin{verbatim}
%\renewcommand*{\DTMenIEzonemaps}{%
%  \DTMdefzonemap{00}{00}{WET}%
%  \DTMdefzonemap{01}{00}{WEST}%
%}
%\end{verbatim}
%
%For Irish Gaelic you need the "irish" module instead.
%
%\StopEventually{%
%\clearpage
%\phantomsection
%\addcontentsline{toc}{section}{Change History}%
%\PrintChanges
%\addcontentsline{toc}{section}{\indexname}%
%\PrintIndex}
%\section{The Code}
%\iffalse
%    \begin{macrocode}
%<*datetime2-english-base.ldf>
%    \end{macrocode}
%\fi
%\subsection{Base Code (\texttt{datetime2-english-base.ldf})}
%This file contains the code common to all the English regional
%variations.
%\changes{1.0}{2015-03-24}{Initial release}
% Identify module
%    \begin{macrocode}
\ProvidesDateTimeModule{english-base}[2019/10/21 v1.05 (NLCT)]
%    \end{macrocode}
% Since the main emphasize of the \sty{datetime2} package is to
% provide expandable dates where possible, the commands here need to
% be expandable. (Anything that wasn't expandable would need to be
% protected.) Therefore the default ordinal format is a simple
% expandable format (which is why \sty{fmtcount} isn't being used).
%\begin{macro}{\DTMenglishordinal}
%    \begin{macrocode}
\newcommand*{\DTMenglishordinal}[1]{%
  \number#1 % space intended
  \DTMenglishfmtordsuffix{%
    \ifcase#1
    \or \DTMenglishst 
    \or \DTMenglishnd 
    \or \DTMenglishrd 
    \or \DTMenglishth 
    \or \DTMenglishth 
    \or \DTMenglishth 
    \or \DTMenglishth 
    \or \DTMenglishth 
    \or \DTMenglishth 
    \or \DTMenglishth 
    \or \DTMenglishth 
    \or \DTMenglishth 
    \or \DTMenglishth 
    \or \DTMenglishth 
    \or \DTMenglishth 
    \or \DTMenglishth 
    \or \DTMenglishth 
    \or \DTMenglishth 
    \or \DTMenglishth 
    \or \DTMenglishth 
    \or \DTMenglishst 
    \or \DTMenglishnd 
    \or \DTMenglishrd 
    \or \DTMenglishth 
    \or \DTMenglishth 
    \or \DTMenglishth 
    \or \DTMenglishth 
    \or \DTMenglishth 
    \or \DTMenglishth 
    \or \DTMenglishth 
    \or \DTMenglishst 
    \fi
  }%
}
%    \end{macrocode}
%\end{macro}
%
%Just in case a~user has some need to change the ordinal suffixes,
%these are provided as commands.
%\begin{macro}{\DTMenglishst}
%    \begin{macrocode}
\newcommand*{\DTMenglishst}{st}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\DTMenglishnd}
%    \begin{macrocode}
\newcommand*{\DTMenglishnd}{nd}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\DTMenglishrd}
%    \begin{macrocode}
\newcommand*{\DTMenglishrd}{rd}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\DTMenglishth}
%    \begin{macrocode}
\newcommand*{\DTMenglishth}{th}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenglishfmtordsuffix}
%The suffix can have a format applied to it (for example, made a
%superscript or converted to small caps). The default ignores
%the argument, which makes it consistent with \TeX's default date
%format. This can be changed by regional modules.
%    \begin{macrocode}
\newcommand*{\DTMenglishfmtordsuffix}[1]{}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenglishmonthname}
% English month names.
%    \begin{macrocode}
\newcommand*{\DTMenglishmonthname}[1]{%
  \ifcase#1
  \or
  January%
  \or
  February%
  \or
  March%
  \or
  April%
  \or
  May%
  \or
  June%
  \or
  July%
  \or
  August%
  \or
  September%
  \or
  October%
  \or
  November%
  \or
  December%
  \fi
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenglishshortmonthname}
% Abbreviated English month names.
%    \begin{macrocode}
\newcommand*{\DTMenglishshortmonthname}[1]{%
  \ifcase#1
  \or
  Jan%
  \or
  Feb%
  \or
  Mar%
  \or
  Apr%
  \or
  May%
  \or
  Jun%
  \or
  Jul%
  \or
  Aug%
  \or
  Sep%
  \or
  Oct%
  \or
  Nov%
  \or
  Dec%
  \fi
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenglishweekdayname}
% English day of week names.
%    \begin{macrocode}
\newcommand*{\DTMenglishweekdayname}[1]{%
  \ifcase#1
  Monday%
  \or
  Tuesday%
  \or
  Wednesday%
  \or
  Thursday%
  \or
  Friday%
  \or
  Saturday%
  \or
  Sunday%
  \fi
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenglishweekdayname}
% English abbreviated day of week names.
%    \begin{macrocode}
\newcommand*{\DTMenglishshortweekdayname}[1]{%
  \ifcase#1
  Mon%
  \or
  Tue%
  \or
  Wed%
  \or
  Thu%
  \or
  Fri%
  \or
  Sat%
  \or
  Sun%
  \fi
}
%    \end{macrocode}
%\end{macro}
%
% 12 hour time tags.
%\begin{macro}{\DTMenglisham}
%    \begin{macrocode}
\newcommand*\DTMenglisham{am}%
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenglishpm}
%    \begin{macrocode}
\newcommand*\DTMenglishpm{pm}%
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenglishmidnight}
%    \begin{macrocode}
\newcommand*\DTMenglishmidnight{midnight}%
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenglishnoon}
%    \begin{macrocode}
\newcommand*\DTMenglishnoon{noon}%
%    \end{macrocode}
%\end{macro}
%
% am/pm time style.
%\begin{macro}{\DTMenglishampmfmt}
%    \begin{macrocode}
\newcommand*{\DTMenglishampmfmt}[1]{#1}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenglishtimesep}
%    \begin{macrocode}
\newcommand*{\DTMenglishtimesep}{\DTMsep{hourmin}}
%    \end{macrocode}
%\end{macro}
%
% This style ignores seconds.
%    \begin{macrocode}
\DTMnewtimestyle
 {englishampm}% label
 {% 
    \renewcommand*\DTMdisplaytime[3]{%
      \ifnum##2=0
        \ifnum##1=12
          \DTMtexorpdfstring
            {\DTMenglishampmfmt{\DTMenglishnoon}}%
            {\DTMenglishnoon}%
        \else
          \ifnum##1=0
            \DTMtexorpdfstring
            {\DTMenglishampmfmt{\DTMenglishmidnight}}%
            {\DTMenglishmidnight}%
          \else
            \ifnum##1=24
              \DTMtexorpdfstring
              {\DTMenglishampmfmt{\DTMenglishmidnight}}%
              {\DTMenglishmidnight}%
            \else
              \ifnum##1<12
                \number##1
                \DTMtexorpdfstring
                {\DTMenglishampmfmt{\DTMenglisham}}%
                {\DTMenglisham}%
              \else
                \number\numexpr##1-12\relax
                \DTMtexorpdfstring
                {\DTMenglishampmfmt{\DTMenglishpm}}%
                {\DTMenglishpm}%
              \fi
            \fi
          \fi
        \fi
      \else
        \ifnum##1<13
          \ifnum##1=0
            12%
          \else
            \number##1
          \fi
          \DTMenglishtimesep\DTMtwodigits{##2}%
          \ifnum##1=12
%    \end{macrocode}
% v1.03 bug fixed replaced \cs{DTMenglisham} with \cs{DTMenglishpm}
%\changes{1.03}{2016-01-23}{fixed bug that displayed am instead of pm}
%    \begin{macrocode}
            \DTMtexorpdfstring
            {\DTMenglishampmfmt{\DTMenglishpm}}%
            {\DTMenglishpm}%
          \else
            \DTMtexorpdfstring
            {\DTMenglishampmfmt{\DTMenglisham}}%
            {\DTMenglisham}%
          \fi
        \else
          \number\numexpr##1-12\relax
          \DTMenglishtimesep\DTMtwodigits{##2}%
          \ifnum##1=24
%    \end{macrocode}
% v1.03 bug fixed replaced \cs{DTMenglishpm} with \cs{DTMenglisham}
%\changes{1.03}{2016-01-23}{fixed bug that displayed am instead of pm}
%    \begin{macrocode}
            \DTMtexorpdfstring
            {\DTMenglishampmfmt{\DTMenglisham}}%
            {\DTMenglisham}%
          \else
            \DTMtexorpdfstring
            {\DTMenglishampmfmt{\DTMenglishpm}}%
            {\DTMenglishpm}%
          \fi
        \fi
      \fi
    }%
 }%
%    \end{macrocode}
%
%
%\iffalse
%    \begin{macrocode}
%</datetime2-english-base.ldf>
%    \end{macrocode}
%\fi
%\subsection{Default English Code (\texttt{datetime2-english.ldf})}
% This file contains the style used if English is requested without
% a~known region. It uses \TeX's default date style.
% This style ignores the \opt{showdow} (show day of week) setting.
%\changes{1.0}{2015-03-24}{Initial release}
%
%\iffalse
%    \begin{macrocode}
%<*datetime2-english.ldf>
%    \end{macrocode}
%\fi
%
% Identify Module
%    \begin{macrocode}
\ProvidesDateTimeModule{english}[2019/10/21 v1.05 (NLCT)]
%    \end{macrocode}
% Load the base English module.
%    \begin{macrocode}
\RequireDateTimeModule{english-base}
%    \end{macrocode}
%
% Define default English text style (TeX's default) labelled "english".
% The time zone is just the "default" style (no mappings applied)
% but "showisoZ" setting checked. The full style places a space
% between each block (date, time and zone). The numeric setting is
% ambiguous without a region so it will use the "default" style.
%    \begin{macrocode}
\DTMnewstyle
 {english}% label
 {% date style
   \renewcommand*{\DTMenglishfmtordsuffix}[1]{}%
   \renewcommand*\DTMdisplaydate[4]{%
     \DTMenglishmonthname{##2}\space\number##3, \number##1
   }%
   \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
 }%
 {% time style
   \renewcommand*{\DTMenglishtimesep}{\DTMsep{hourmin}}%
   \DTMsettimestyle{englishampm}%
 }%
 {% zone style
   \DTMsetzonestyle{default}%
 }%
 {% full style
   \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate
     \DTMdisplaydate{##1}{##2}{##3}{##4}%
     \space
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone
     \space
     \DTMdisplayzone{##8}{##9}%
    \fi
   }%
   \renewcommand*{\DTMDisplay}{\DTMdisplay}%
 }%
%    \end{macrocode}
% Switch the style according to the \opt{useregional} setting.
%    \begin{macrocode}
\DTMifcaseregional
{}% do nothing
{\DTMsetstyle{english}}%
{\DTMsetstyle{default}}%
%    \end{macrocode}
%
% Redefine \cs{dateenglish} (or \cs{date}\meta{dialect}) to prevent
% \sty{babel} from resetting \cs{today}. (For this to work,
% \sty{babel} must already have been loaded if it's required.)
%    \begin{macrocode}
\ifcsundef{date\CurrentTrackedDialect}
{%
  \ifundef\dateenglish
  {% do nothing
  }%
  {%
    \def\dateenglish{%
      \DTMifcaseregional
      {}% do nothing
      {\DTMsetstyle{english}}%
      {\DTMsetstyle{default}}%
    }%
  }%
}%
{%
  \csdef{date\CurrentTrackedDialect}{%
    \DTMifcaseregional
    {}% do nothing
    {\DTMsetstyle{english}}%
    {\DTMsetstyle{default}}%
  }%
}%
%    \end{macrocode}
%\iffalse
%    \begin{macrocode}
%</datetime2-english.ldf>
%    \end{macrocode}
%\fi
%
%\subsection{English (GB) Code (\texttt{datetime2-en-GB.ldf})}
%This file contains the British English style.
%\changes{1.0}{2015-03-24}{Initial release}
%\iffalse
%    \begin{macrocode}
%<*datetime2-en-GB.ldf>
%    \end{macrocode}
%\fi
% Identify this module.
%    \begin{macrocode}
\ProvidesDateTimeModule{en-GB}[2019/10/21 v1.05 (NLCT)]
%    \end{macrocode}
% Load base English module.
%    \begin{macrocode}
\RequireDateTimeModule{english-base}
%    \end{macrocode}
%
% Allow the user a way of configuring the "en-GB" and
% "en-GB-numeric" styles. This doesn't use the package wide separators such as
% \cs{dtm@datetimesep} in case other date formats are also required.
%
%\begin{macro}{\DTMenGBdowdaysep}
%\changes{1.04}{2016-03-09}{new}
% The separator between the day of week name and the day of month
% number for the text format.
%    \begin{macrocode}
\newcommand*{\DTMenGBdowdaysep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenGBdaymonthsep}
% The separator between the day and month for the text format.
%    \begin{macrocode}
\newcommand*{\DTMenGBdaymonthsep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenGBmonthyearsep}
% The separator between the month and year for the text format.
%    \begin{macrocode}
\newcommand*{\DTMenGBmonthyearsep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenGBdatetimesep}
% The separator between the date and time blocks in the full format
% (either text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMenGBdatetimesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenGBtimezonesep}
% The separator between the time and zone blocks in the full format
% (either text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMenGBtimezonesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenGBdatesep}
% The separator for the numeric date format.
%    \begin{macrocode}
\newcommand*{\DTMenGBdatesep}{/}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenGBtimesep}
% The separator for the numeric time format.
%    \begin{macrocode}
\newcommand*{\DTMenGBtimesep}{:}
%    \end{macrocode}
%\end{macro}
%
%Provide keys that can be used in \cs{DTMlangsetup} to set these
%separators.
%    \begin{macrocode}
\DTMdefkey{en-GB}{dowdaysep}{\renewcommand*{\DTMenGBdowdaysep}{#1}}
\DTMdefkey{en-GB}{daymonthsep}{\renewcommand*{\DTMenGBdaymonthsep}{#1}}
\DTMdefkey{en-GB}{monthyearsep}{\renewcommand*{\DTMenGBmonthyearsep}{#1}}
\DTMdefkey{en-GB}{datetimesep}{\renewcommand*{\DTMenGBdatetimesep}{#1}}
\DTMdefkey{en-GB}{timezonesep}{\renewcommand*{\DTMenGBtimezonesep}{#1}}
\DTMdefkey{en-GB}{datesep}{\renewcommand*{\DTMenGBdatesep}{#1}}
\DTMdefkey{en-GB}{timesep}{\renewcommand*{\DTMenGBtimesep}{#1}}
%    \end{macrocode}
%
% Define a boolean key that can switch between full and abbreviated
% formats for the month and day of week names in the text format.
%    \begin{macrocode}
\DTMdefboolkey{en-GB}{abbr}[true]{}
%    \end{macrocode}
% The default is the full name.
%    \begin{macrocode}
\DTMsetbool{en-GB}{abbr}{false}
%    \end{macrocode}
%
% Define a boolean key that determines if the time zone mappings
% should be used.
%    \begin{macrocode}
\DTMdefboolkey{en-GB}{mapzone}[true]{}
%    \end{macrocode}
% The default is to use mappings.
%    \begin{macrocode}
\DTMsetbool{en-GB}{mapzone}{true}
%    \end{macrocode}
%
% Define a boolean key that determines whether to show or hide the
% day of the month. (Called "showdayofmonth" instead of "showday" to
% avoid confusion with the day of the week.)
%    \begin{macrocode}
\DTMdefboolkey{en-GB}{showdayofmonth}[true]{}
%    \end{macrocode}
% The default is to show the day of the month.
%    \begin{macrocode}
\DTMsetbool{en-GB}{showdayofmonth}{true}
%    \end{macrocode}
%
% Define a boolean key that determines whether to show or hide the
% year.
%    \begin{macrocode}
\DTMdefboolkey{en-GB}{showyear}[true]{}
%    \end{macrocode}
% The default is to show the year.
%    \begin{macrocode}
\DTMsetbool{en-GB}{showyear}{true}
%    \end{macrocode}
%
%\begin{macro}{\DTMenGBfmtordsuffix}
% Define the ordinal suffix to be used by this style.
%    \begin{macrocode}
\newcommand*{\DTMenGBfmtordsuffix}[1]{#1}
%    \end{macrocode}
%\end{macro}
%
% Define a setting to change the ordinal suffix style.
%\changes{1.05}{2019-10-21}{renamed scratch variables}
%    \begin{macrocode}
\DTMdefchoicekey{en-GB}{ord}[\@dtm@val\@dtm@nr]{level,raise,omit,sc}{%
 \ifcase\@dtm@nr\relax
   \renewcommand*{\DTMenGBfmtordsuffix}[1]{##1}%
 \or
   \renewcommand*{\DTMenGBfmtordsuffix}[1]{%
    \DTMtexorpdfstring{\protect\textsuperscript{##1}}{##1}}%
 \or
   \renewcommand*{\DTMenGBfmtordsuffix}[1]{}%
 \or
   \renewcommand*{\DTMenGBfmtordsuffix}[1]{%
    \DTMtexorpdfstring{\protect\textsc{##1}}{##1}}%
 \fi
}
%    \end{macrocode}
%
% Define the "en-GB" style.
%    \begin{macrocode}
\DTMnewstyle
 {en-GB}% label
 {% date style
   \renewcommand*{\DTMenglishfmtordsuffix}{\DTMenGBfmtordsuffix}%
   \renewcommand*\DTMdisplaydate[4]{%
     \ifDTMshowdow
       \ifnum##4>-1
        \DTMifbool{en-GB}{abbr}%
         {\DTMenglishshortweekdayname{##4}}%
         {\DTMenglishweekdayname{##4}}%
        \DTMenGBdowdaysep
       \fi
     \fi
     \DTMifbool{en-GB}{showdayofmonth}%
     {%
       \DTMenglishordinal{##3}%
       \DTMenGBdaymonthsep
     }%
     {}%
     \DTMifbool{en-GB}{abbr}%
     {\DTMenglishshortmonthname{##2}}%
     {\DTMenglishmonthname{##2}}%
     \DTMifbool{en-GB}{showyear}%
     {%
       \DTMenGBmonthyearsep\number##1 % space intended
     }%
     {}%
   }%
   \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
 }%
 {% time style
   \renewcommand*\DTMenglishtimesep{\DTMenGBtimesep}%
   \DTMsettimestyle{englishampm}%
 }%
 {% zone style
   \DTMresetzones
   \DTMenGBzonemaps
   \renewcommand*{\DTMdisplayzone}[2]{%
     \DTMifbool{en-GB}{mapzone}%
     {\DTMusezonemapordefault{##1}{##2}}%
     {%
       \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
       \ifDTMshowzoneminutes\DTMenGBtimesep\DTMtwodigits{##2}\fi
     }%
   }%
 }%
 {% full style
   \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate
     \DTMdisplaydate{##1}{##2}{##3}{##4}%
     \DTMenGBdatetimesep
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone
     \DTMenGBtimezonesep
     \DTMdisplayzone{##8}{##9}%
    \fi
   }%
   \renewcommand*{\DTMDisplay}{\DTMdisplay}%
 }%
%    \end{macrocode}
%
% Define numeric style.
%\changes{1.01}{2015-04-09}{fixed mispelt style name}
%    \begin{macrocode}
\DTMnewstyle
 {en-GB-numeric}% label
 {% date style
    \renewcommand*\DTMdisplaydate[4]{%
      \DTMifbool{en-GB}{showdayofmonth}%
      {%
        \number##3 % space intended
        \DTMenGBdatesep
      }%
      {}%
      \number##2 % space intended
      \DTMifbool{en-GB}{showyear}%
      {%
        \DTMenGBdatesep
        \number##1 % space intended
      }%
      {}%
    }%
    \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
 }%
 {% time style
    \renewcommand*\DTMdisplaytime[3]{%
      \number##1
      \DTMenGBtimesep\DTMtwodigits{##2}%
      \ifDTMshowseconds\DTMenGBtimesep\DTMtwodigits{##3}\fi
    }%
 }%
 {% zone style
   \DTMresetzones
   \DTMenGBzonemaps
   \renewcommand*{\DTMdisplayzone}[2]{%
     \DTMifbool{en-GB}{mapzone}%
     {\DTMusezonemapordefault{##1}{##2}}%
     {%
       \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
       \ifDTMshowzoneminutes\DTMenGBtimesep\DTMtwodigits{##2}\fi
     }%
   }%
 }%
 {% full style
   \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate
     \DTMdisplaydate{##1}{##2}{##3}{##4}%
     \DTMenGBdatetimesep
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone
     \DTMenGBtimezonesep
     \DTMdisplayzone{##8}{##9}%
    \fi
   }%
   \renewcommand*{\DTMDisplay}{\DTMdisplay}%
 }
%    \end{macrocode}
%
%\begin{macro}{\DTMenGBzonemaps}
% The time zone mappings are set through this command, which can be
% redefined if extra mappings are required or mappings need to be
% removed.
%    \begin{macrocode}
\newcommand*{\DTMenGBzonemaps}{%
  \DTMdefzonemap{00}{00}{GMT}%
  \DTMdefzonemap{01}{00}{BST}%
}
%    \end{macrocode}
%\end{macro}
%
% Switch style according to the \opt{useregional} setting.
%    \begin{macrocode}
\DTMifcaseregional
{}% do nothing
{\DTMsetstyle{en-GB}}%
{\DTMsetstyle{en-GB-numeric}}%
%    \end{macrocode}
%
% Redefine \cs{dateenglish} (or \cs{date}\meta{dialect}) to prevent
% \sty{babel} from resetting \cs{today}. (For this to work,
% \sty{babel} must already have been loaded if it's required.)
%    \begin{macrocode}
\ifcsundef{date\CurrentTrackedDialect}
{% do nothing
  \ifundef\dateenglish
  {%
  }%
  {%
    \def\dateenglish{%
      \DTMifcaseregional
      {}% do nothing
      {\DTMsetstyle{en-GB}}%
      {\DTMsetstyle{en-GB-numeric}}%
    }%
  }%
}%
{%
  \csdef{date\CurrentTrackedDialect}{%
    \DTMifcaseregional
    {}% do nothing
    {\DTMsetstyle{en-GB}}%
    {\DTMsetstyle{en-GB-numeric}}%
  }%
}%
%    \end{macrocode}
%
%\iffalse
%    \begin{macrocode}
%</datetime2-en-GB.ldf>
%    \end{macrocode}
%\fi
%\subsection{English (US) Code (\texttt{datetime2-en-US.ldf})}
%This file contains the US English style.
%\changes{1.0}{2015-03-24}{Initial release}
%\iffalse
%    \begin{macrocode}
%<*datetime2-en-US.ldf>
%    \end{macrocode}
%\fi
%
% Identify this module.
%    \begin{macrocode}
\ProvidesDateTimeModule{en-US}[2019/10/21 v1.05 (NLCT)]
%    \end{macrocode}
% Load base English module.
%    \begin{macrocode}
\RequireDateTimeModule{english-base}
%    \end{macrocode}
%
% Allow the user a way of configuring the "en-US" date format.
% This doesn't use the package wide separators such as
% \cs{dtm@datetimesep} in case other date formats are also required.
%\begin{macro}{\DTMenUSmonthdaysep}
% The separator between the month and day for the text format.
%    \begin{macrocode}
\newcommand*{\DTMenUSmonthdaysep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenUSdowmonthsep}
% The separator between the day of week name and the month for the text format.
% (New to version 1.02.)
%\changes{1.02}{2016-01-18}{new}
%    \begin{macrocode}
\newcommand*{\DTMenUSdowmonthsep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenUSdayyearsep}
% The separator between the day and year for the text format.
%    \begin{macrocode}
\newcommand*{\DTMenUSdayyearsep}{,\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenUSdatetimesep}
% The separator between the date and time blocks in the full format
% (either text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMenUSdatetimesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenUStimezonesep}
% The separator between the time and zone blocks in the full format
% (either text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMenUStimezonesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenUSdatesep}
% The separator for the numeric date format.
%    \begin{macrocode}
\newcommand*{\DTMenUSdatesep}{/}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenUStimesep}
% The separator for the numeric time format.
%    \begin{macrocode}
\newcommand*{\DTMenUStimesep}{:}
%    \end{macrocode}
%\end{macro}
%
%Provide keys that can be used in \cs{DTMlangsetup} to set these
%separators.
%    \begin{macrocode}
\DTMdefkey{en-US}{monthdaysep}{\renewcommand*{\DTMenUSmonthdaysep}{#1}}
\DTMdefkey{en-US}{dowmonthsep}{\renewcommand*{\DTMenUSdowmonthsep}{#1}}
\DTMdefkey{en-US}{dayyearsep}{\renewcommand*{\DTMenUSdayyearsep}{#1}}
\DTMdefkey{en-US}{datetimesep}{\renewcommand*{\DTMenUSdatetimesep}{#1}}
\DTMdefkey{en-US}{timezonesep}{\renewcommand*{\DTMenUStimezonesep}{#1}}
\DTMdefkey{en-US}{datesep}{\renewcommand*{\DTMenUSdatesep}{#1}}
\DTMdefkey{en-US}{timesep}{\renewcommand*{\DTMenUStimesep}{#1}}
%    \end{macrocode}
%
% Define a boolean key that can switch between full and abbreviated
% formats for the month and day of week names in the text format.
%    \begin{macrocode}
\DTMdefboolkey{en-US}{abbr}[true]{}
%    \end{macrocode}
% The default is the full name.
%    \begin{macrocode}
\DTMsetbool{en-US}{abbr}{false}
%    \end{macrocode}
%
% Define a boolean key that determines if the time zone mappings
% should be used.
%    \begin{macrocode}
\DTMdefboolkey{en-US}{mapzone}[true]{}
%    \end{macrocode}
% The default is no mappings.
%    \begin{macrocode}
\DTMsetbool{en-US}{mapzone}{false}
%    \end{macrocode}
%
% Define a boolean key that determines whether to show or hide the
% day of the month. (Called "showdayofmonth" instead of "showday" to
% avoid confusion with the day of the week.)
%    \begin{macrocode}
\DTMdefboolkey{en-US}{showdayofmonth}[true]{}
%    \end{macrocode}
% The default is to show the day of the month.
%    \begin{macrocode}
\DTMsetbool{en-US}{showdayofmonth}{true}
%    \end{macrocode}
%
% Define a boolean key that determines whether to show or hide the
% year.
%    \begin{macrocode}
\DTMdefboolkey{en-US}{showyear}[true]{}
%    \end{macrocode}
% The default is to show the year.
%    \begin{macrocode}
\DTMsetbool{en-US}{showyear}{true}
%    \end{macrocode}
%
%\begin{macro}{\DTMenUSfmtordsuffix}
% Define the ordinal suffix to be used by this style.
%    \begin{macrocode}
\newcommand*{\DTMenUSfmtordsuffix}[1]{}
%    \end{macrocode}
%\end{macro}
%
% Define a setting to change the ordinal suffix style.
%\changes{1.05}{2019-10-21}{renamed scratch variables}
%    \begin{macrocode}
\DTMdefchoicekey{en-US}{ord}[\@dtm@val\@dtm@nr]{level,raise,omit,sc}{%
 \ifcase\@dtm@nr\relax
   \renewcommand*{\DTMenUSfmtordsuffix}[1]{##1}%
 \or
   \renewcommand*{\DTMenUSfmtordsuffix}[1]{%
    \DTMtexorpdfstring{\protect\textsuperscript{##1}}{##1}}%
 \or
   \renewcommand*{\DTMenUSfmtordsuffix}[1]{}%
 \or
   \renewcommand*{\DTMenUSfmtordsuffix}[1]{%
    \DTMtexorpdfstring{\protect\textsc{##1}}{##1}}%
 \fi
}
%    \end{macrocode}
%
% Define a setting to change zone mappings.
%\changes{1.03}{2016-01-23}{added zone option to en-US}
%\changes{1.05}{2019-10-21}{renamed scratch variables}
%    \begin{macrocode}
\DTMdefchoicekey{en-US}{zone}[\@dtm@val\@dtm@nr]%
 {std,standard,dst,daylight,atlantic,eastern,central,mountain,%
  pacific,alaska,hawaii-aleutian,hawaii,aleutian,samoa,charmorro,clear}%
{%
 \ifcase\@dtm@nr\relax
  % std
   \appto\DTMenUSzonemaps{\DTMenUSstdzonemaps}%
   \DTMenUSstdzonemaps
 \or
  % standard
   \appto\DTMenUSzonemaps{\DTMenUSstdzonemaps}%
   \DTMenUSstdzonemaps
 \or
  % dst
   \appto\DTMenUSzonemaps{\DTMenUSdstzonemaps}%
   \DTMenUSdstzonemaps
 \or
  % daylight
   \appto\DTMenUSzonemaps{\DTMenUSdstzonemaps}%
   \DTMenUSdstzonemaps
 \or
  % atlantic
   \appto\DTMenUSzonemaps{\DTMenUSatlanticzonemaps}%
   \DTMenUSatlanticzonemaps
 \or
  % eastern
   \appto\DTMenUSzonemaps{\DTMenUSeasternzonemaps}%
   \DTMenUSeasternzonemaps
 \or
  % central
   \appto\DTMenUSzonemaps{\DTMenUScentralzonemaps}%
   \DTMenUScentralzonemaps
 \or
  % mountain
   \appto\DTMenUSzonemaps{\DTMenUSmountainzonemaps}%
   \DTMenUSmountainzonemaps
 \or
  % pacific
   \appto\DTMenUSzonemaps{\DTMenUSpacificzonemaps}%
   \DTMenUSpacificzonemaps
 \or
  % alaska
   \appto\DTMenUSzonemaps{\DTMenUSalaskazonemaps}%
   \DTMenUSalaskazonemaps
 \or
  % hawaii-aleutian
   \appto\DTMenUSzonemaps{\DTMenUShawaiialeutianzonemaps}%
   \DTMenUShawaiialeutianzonemaps
 \or
  % hawaii
   \appto\DTMenUSzonemaps{\DTMenUShawaiialeutianzonemaps}%
   \DTMenUShawaiialeutianzonemaps
 \or
  % aleutian
   \appto\DTMenUSzonemaps{\DTMenUShawaiialeutianzonemaps}%
   \DTMenUShawaiialeutianzonemaps
 \or
  % samoa
   \appto\DTMenUSzonemaps{\DTMenUSsamoazonemaps}%
   \DTMenUSsamoazonemaps
 \or
  % chamorro
   \appto\DTMenUSzonemaps{\DTMenUSchamorrozonemaps}%
   \DTMenUSchamorrozonemaps
 \or
  % clear
   \renewcommand*{\DTMenUSzonemaps}{}%
   \DTMclearmap{-3}{0}%
   \DTMclearmap{-4}{0}%
   \DTMclearmap{-5}{0}%
   \DTMclearmap{-6}{0}%
   \DTMclearmap{-7}{0}%
   \DTMclearmap{-8}{0}%
   \DTMclearmap{-9}{0}%
   \DTMclearmap{-10}{0}%
   \DTMclearmap{-11}{0}%
   \DTMclearmap{10}{0}%
 \fi
}
%    \end{macrocode}
%
%
% Define the "en-US" style. Hiding the day of month is a bit awkward
% as the default day-year separator has a comma that should
% disappear if the day number is missing so the month-day separator
% is used as the month-year separator if the day is missing.
%\changes{1.02}{2016-01-18}{added support for showdow option}
%    \begin{macrocode}
\DTMnewstyle
 {en-US}% label
 {% date style
   \renewcommand*{\DTMenglishfmtordsuffix}{\DTMenUSfmtordsuffix}%
   \renewcommand*\DTMdisplaydate[4]{%
%    \end{macrocode}
% Support for \opt{showdow} added in v1.02 (thanks to Alan Munn).
%    \begin{macrocode}
     \ifDTMshowdow
       \ifnum##4>-1 % space intended
        \DTMifbool{en-US}{abbr}%
         {\DTMenglishshortweekdayname{##4}}%
         {\DTMenglishweekdayname{##4}}%
         \DTMenUSdowmonthsep
       \fi
     \fi
     \DTMifbool{en-US}{abbr}%
     {\DTMenglishshortmonthname{##2}}%
     {\DTMenglishmonthname{##2}}%
     \DTMifbool{en-US}{showdayofmonth}%
     {%
       \DTMenUSmonthdaysep
       \DTMenglishordinal{##3}%
       \DTMifbool{en-US}{showyear}%
       {%
         \DTMenUSdayyearsep
         \number##1 % space intended
       }%
       {}%
     }%
     {%
       \DTMifbool{en-US}{showyear}%
       {%
         \DTMenUSmonthdaysep
         \number##1 % space intended
       }%
       {}%
     }%
   }%
   \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
 }%
 {% time style
   \renewcommand*\DTMenglishtimesep{\DTMenUStimesep}%
   \DTMsettimestyle{englishampm}%
 }%
 {% zone style
   \DTMresetzones
   \DTMenUSzonemaps
   \renewcommand*{\DTMdisplayzone}[2]{%
     \DTMifbool{en-US}{mapzone}%
     {\DTMusezonemapordefault{##1}{##2}}%
     {%
       \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
       \ifDTMshowzoneminutes\DTMenUStimesep\DTMtwodigits{##2}\fi
     }%
   }%
 }%
 {% full style
   \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate
     \DTMdisplaydate{##1}{##2}{##3}{##4}%
     \DTMenUSdatetimesep
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone
     \DTMenUStimezonesep
     \DTMdisplayzone{##8}{##9}%
    \fi
   }%
   \renewcommand*{\DTMDisplay}{\DTMdisplay}%
 }%
%    \end{macrocode}
%
% Define numeric style.
%    \begin{macrocode}
\DTMnewstyle
 {en-US-numeric}% label
 {% date style
    \renewcommand*\DTMdisplaydate[4]{%
      \number##2 % space intended
      \DTMifbool{en-US}{showdayofmonth}%
      {%
        \DTMenUSdatesep
        \number##3 % space intended
      }%
      {}%
      \DTMifbool{en-US}{showyear}%
      {%
        \DTMenUSdatesep
        \number##1 % space intended
      }%
      {}%
    }%
    \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
 }%
 {% time style
    \renewcommand*\DTMdisplaytime[3]{%
      \number##1
      \DTMenUStimesep\DTMtwodigits{##2}%
      \ifDTMshowseconds\DTMenUStimesep\DTMtwodigits{##3}\fi
    }%
 }%
 {% zone style
   \DTMresetzones
   \DTMenUSzonemaps
   \renewcommand*{\DTMdisplayzone}[2]{%
     \DTMifbool{en-US}{mapzone}%
     {\DTMusezonemapordefault{##1}{##2}}%
     {%
       \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
       \ifDTMshowzoneminutes\DTMenUStimesep\DTMtwodigits{##2}\fi
     }%
   }%
 }%
 {% full style
   \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate
     \DTMdisplaydate{##1}{##2}{##3}{##4}%
     \DTMenUSdatetimesep
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone
     \DTMenUStimezonesep
     \DTMdisplayzone{##8}{##9}%
    \fi
   }%
   \renewcommand*{\DTMDisplay}{\DTMdisplay}%
 }
%    \end{macrocode}
%
%\begin{macro}{\DTMenUSzonemaps}
% The time zone mappings are set through this command, which can be
% redefined if extra mappings are required or mappings need to be
% removed. (These don't take daylight saving into account.)
%    \begin{macrocode}
\newcommand*{\DTMenUSzonemaps}{%
  \DTMdefzonemap{-3}{00}{ADT}%
  \DTMdefzonemap{-4}{00}{AST}%
  \DTMdefzonemap{-5}{00}{EST}%
  \DTMdefzonemap{-6}{00}{CST}%
  \DTMdefzonemap{-7}{00}{MST}%
  \DTMdefzonemap{-8}{00}{PST}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenUSstdzonemaps}
% Just the standard time zone mappings.
%\changes{1.03}{2016-01-23}{new}
%    \begin{macrocode}
\newcommand*{\DTMenUSstdzonemaps}{%
  \DTMdefzonemap{-4}{00}{AST}%
  \DTMdefzonemap{-5}{00}{EST}%
  \DTMdefzonemap{-6}{00}{CST}%
  \DTMdefzonemap{-7}{00}{MST}%
  \DTMdefzonemap{-8}{00}{PST}%
  \DTMdefzonemap{-9}{00}{AKST}%
  \DTMdefzonemap{-10}{00}{HAST}%
  \DTMdefzonemap{-11}{00}{SST}%
  \DTMdefzonemap{10}{00}{ChST}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenUSdstzonemaps}
% Just daylight saving mappings.
%\changes{1.03}{2016-01-23}{new}
%    \begin{macrocode}
\newcommand*{\DTMenUSdstzonemaps}{%
  \DTMdefzonemap{-3}{00}{ADT}%
  \DTMdefzonemap{-4}{00}{EDT}%
  \DTMdefzonemap{-5}{00}{CDT}%
  \DTMdefzonemap{-6}{00}{MDT}%
  \DTMdefzonemap{-7}{00}{PDT}%
  \DTMdefzonemap{-8}{00}{AKDT}%
  \DTMdefzonemap{-9}{00}{HADT}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenUSatlanticzonemaps}
% Just the Atlantic zone mappings (AST and ADT).
%\changes{1.03}{2016-01-23}{new}
%    \begin{macrocode}
\newcommand*{\DTMenUSatlanticzonemaps}{%
  \DTMdefzonemap{-4}{00}{AST}%
  \DTMdefzonemap{-3}{00}{ADT}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenUSeasternzonemaps}
% Just the Eastern zone mappings (EST and EDT).
%\changes{1.03}{2016-01-23}{new}
%    \begin{macrocode}
\newcommand*{\DTMenUSeasternzonemaps}{%
  \DTMdefzonemap{-5}{00}{EST}%
  \DTMdefzonemap{-4}{00}{EDT}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenUScentralzonemaps}
% Just the Central zone mappings (CST and CDT).
%\changes{1.03}{2016-01-23}{new}
%    \begin{macrocode}
\newcommand*{\DTMenUScentralzonemaps}{%
  \DTMdefzonemap{-6}{00}{CST}%
  \DTMdefzonemap{-5}{00}{CDT}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenUSmountainzonemaps}
% Just the Mountain zone mappings (MST and MDT).
%\changes{1.03}{2016-01-23}{new}
%    \begin{macrocode}
\newcommand*{\DTMenUSmountainzonemaps}{%
  \DTMdefzonemap{-7}{00}{MST}%
  \DTMdefzonemap{-6}{00}{MDT}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenUSpacificzonemaps}
% Just the Pacific zone mappings (PST and PDT).
%\changes{1.03}{2016-01-23}{new}
%    \begin{macrocode}
\newcommand*{\DTMenUSpacificzonemaps}{%
  \DTMdefzonemap{-8}{00}{PST}%
  \DTMdefzonemap{-7}{00}{PDT}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenUSalaskazonemaps}
% Just the Alaska zone mappings (AKST and AKDT).
%\changes{1.03}{2016-01-23}{new}
%    \begin{macrocode}
\newcommand*{\DTMenUSalaskazonemaps}{%
  \DTMdefzonemap{-9}{00}{AKST}%
  \DTMdefzonemap{-8}{00}{AKDT}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenUShawaiialeutianzonemaps}
% Just the Hawaii-Aleutian zone mappings (HAST and HADT).
%\changes{1.03}{2016-01-23}{new}
%    \begin{macrocode}
\newcommand*{\DTMenUShawaiialeutianzonemaps}{%
  \DTMdefzonemap{-10}{00}{HAST}%
  \DTMdefzonemap{-9}{00}{HADT}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenUSsamoazonemaps}
% Just the Samoa standard time (SST).
%\changes{1.03}{2016-01-23}{new}
%    \begin{macrocode}
\newcommand*{\DTMenUSsamoazonemaps}{%
  \DTMdefzonemap{-11}{00}{SST}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenUSchamorrozonemaps}
% Just the Chamorro standard time (ChST).
%\changes{1.03}{2016-01-23}{new}
%    \begin{macrocode}
\newcommand*{\DTMenUSchamorrozonemaps}{%
  \DTMdefzonemap{10}{00}{ChST}%
}
%    \end{macrocode}
%\end{macro}
%
%
% Switch style according to the \opt{useregional} setting.
%    \begin{macrocode}
\DTMifcaseregional
{}% do nothing
{\DTMsetstyle{en-US}}%
{\DTMsetstyle{en-US-numeric}}%
%    \end{macrocode}
%
% Redefine \cs{dateenglish} (or \cs{date}\meta{dialect}) to prevent
% \sty{babel} from resetting \cs{today}. (For this to work,
% \sty{babel} must already have been loaded if it's required.)
%    \begin{macrocode}
\ifcsundef{date\CurrentTrackedDialect}
{% do nothing
  \ifundef\dateenglish
  {%
  }%
  {%
    \def\dateenglish{%
      \DTMifcaseregional
      {}% do nothing
      {\DTMsetstyle{en-US}}%
      {\DTMsetstyle{en-US-numeric}}%
    }%
  }%
}%
{%
  \csdef{date\CurrentTrackedDialect}{%
    \DTMifcaseregional
    {}% do nothing
    {\DTMsetstyle{en-US}}%
    {\DTMsetstyle{en-US-numeric}}%
  }%
}%
%    \end{macrocode}
%
%\iffalse
%    \begin{macrocode}
%</datetime2-en-US.ldf>
%    \end{macrocode}
%\fi
%\subsection{English (Canada) Code (\texttt{datetime2-en-CA.ldf})}
%This file contains the Canadian English style. This is very similar
%to the US style.
%\changes{1.0}{2015-03-24}{Initial release}
%\iffalse
%    \begin{macrocode}
%<*datetime2-en-CA.ldf>
%    \end{macrocode}
%\fi
%
% Identify this module.
%    \begin{macrocode}
\ProvidesDateTimeModule{en-CA}[2019/10/21 v1.05 (NLCT)]
%    \end{macrocode}
% Load base English module.
%    \begin{macrocode}
\RequireDateTimeModule{english-base}
%    \end{macrocode}
%
% Allow the user a way of configuring the "en-CA" and
% "en-CA-numeric" formats. This doesn't use the package wide separators such as
% \cs{dtm@datetimesep} in case other date formats are also required.
%\begin{macro}{\DTMenCAmonthdaysep}
% The separator between the month and day for the text format.
%    \begin{macrocode}
\newcommand*{\DTMenCAmonthdaysep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenCAdowmonthsep}
% The separator between the day of week name and the month for the text format.
% (New to version 1.02.)
%\changes{1.02}{2016-01-18}{new}
%    \begin{macrocode}
\newcommand*{\DTMenCAdowmonthsep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenCAdayyearsep}
% The separator between the day and year for the text format.
%    \begin{macrocode}
\newcommand*{\DTMenCAdayyearsep}{,\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenCAdatetimesep}
% The separator between the date and time blocks in the full format
% (either text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMenCAdatetimesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenCAtimezonesep}
% The separator between the time and zone blocks in the full format
% (either text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMenCAtimezonesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenCAdatesep}
% The separator for the numeric date format.
%    \begin{macrocode}
\newcommand*{\DTMenCAdatesep}{/}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenCAtimesep}
% The separator for the numeric time format.
%    \begin{macrocode}
\newcommand*{\DTMenCAtimesep}{:}
%    \end{macrocode}
%\end{macro}
%
%Provide keys that can be used in \cs{DTMlangsetup} to set these
%separators.
%    \begin{macrocode}
\DTMdefkey{en-CA}{monthdaysep}{\renewcommand*{\DTMenCAmonthdaysep}{#1}}
\DTMdefkey{en-CA}{dowmonthsep}{\renewcommand*{\DTMenCAdowmonthsep}{#1}}
\DTMdefkey{en-CA}{dayyearsep}{\renewcommand*{\DTMenCAdayyearsep}{#1}}
\DTMdefkey{en-CA}{datetimesep}{\renewcommand*{\DTMenCAdatetimesep}{#1}}
\DTMdefkey{en-CA}{timezonesep}{\renewcommand*{\DTMenCAtimezonesep}{#1}}
\DTMdefkey{en-CA}{datesep}{\renewcommand*{\DTMenCAdatesep}{#1}}
\DTMdefkey{en-CA}{timesep}{\renewcommand*{\DTMenCAtimesep}{#1}}
%    \end{macrocode}
%
% Define a boolean key that can switch between full and abbreviated
% formats for the month and day of week names in the text format.
%    \begin{macrocode}
\DTMdefboolkey{en-CA}{abbr}[true]{}
%    \end{macrocode}
% The default is the full name.
%    \begin{macrocode}
\DTMsetbool{en-CA}{abbr}{false}
%    \end{macrocode}
%
% Define a boolean key that determines if the time zone mappings
% should be used.
%    \begin{macrocode}
\DTMdefboolkey{en-CA}{mapzone}[true]{}
%    \end{macrocode}
% The default is no mappings.
%    \begin{macrocode}
\DTMsetbool{en-CA}{mapzone}{false}
%    \end{macrocode}
%
% Define a boolean key that determines whether to show or hide the
% day of the month. (Called "showdayofmonth" instead of "showday" to
% avoid confusion with the day of the week.)
%    \begin{macrocode}
\DTMdefboolkey{en-CA}{showdayofmonth}[true]{}
%    \end{macrocode}
% The default is to show the day of the month.
%    \begin{macrocode}
\DTMsetbool{en-CA}{showdayofmonth}{true}
%    \end{macrocode}
%
% Define a boolean key that determines whether to show or hide the
% year.
%    \begin{macrocode}
\DTMdefboolkey{en-CA}{showyear}[true]{}
%    \end{macrocode}
% The default is to show the year.
%    \begin{macrocode}
\DTMsetbool{en-CA}{showyear}{true}
%    \end{macrocode}
%
%\begin{macro}{\DTMenCAfmtordsuffix}
% Define the ordinal suffix to be used by this style.
%    \begin{macrocode}
\newcommand*{\DTMenCAfmtordsuffix}[1]{}
%    \end{macrocode}
%\end{macro}
%
% Define a setting to change the ordinal suffix style.
%\changes{1.05}{2019-10-21}{renamed scratch variables}
%    \begin{macrocode}
\DTMdefchoicekey{en-CA}{ord}[\@dtm@val\@dtm@nr]{level,raise,omit,sc}{%
 \ifcase\@dtm@nr\relax
   \renewcommand*{\DTMenCAfmtordsuffix}[1]{##1}%
 \or
   \renewcommand*{\DTMenCAfmtordsuffix}[1]{%
    \DTMtexorpdfstring{\protect\textsuperscript{##1}}{##1}}%
 \or
   \renewcommand*{\DTMenCAfmtordsuffix}[1]{}%
 \or
   \renewcommand*{\DTMenCAfmtordsuffix}[1]{%
    \DTMtexorpdfstring{\protect\textsc{##1}}{##1}}%
 \fi
}
%    \end{macrocode}
%
% Define a setting to change zone mappings.
%\changes{1.03}{2016-01-23}{added zone option to en-CA}
%\changes{1.05}{2019-10-21}{renamed scratch variables}
%    \begin{macrocode}
\DTMdefchoicekey{en-CA}{zone}[\@dtm@val\@dtm@nr]%
 {std,standard,dst,daylight,newfoundland,atlantic,eastern,central,mountain,%
  pacific,clear}%
{%
 \ifcase\@dtm@nr\relax
  % std
   \appto\DTMenCAzonemaps{\DTMenCAstdzonemaps}%
   \DTMenCAstdzonemaps
 \or
  % standard
   \appto\DTMenCAzonemaps{\DTMenCAstdzonemaps}%
   \DTMenCAstdzonemaps
 \or
  % dst
   \appto\DTMenCAzonemaps{\DTMenCAdstzonemaps}%
   \DTMenCAdstzonemaps
 \or
  % daylight
   \appto\DTMenCAzonemaps{\DTMenCAdstzonemaps}%
   \DTMenCAdstzonemaps
 \or
  % newfoundland
   \appto\DTMenCAzonemaps{\DTMenCAnewfoundlandzonemaps}%
   \DTMenCAnewfoundlandzonemaps
 \or
  % atlantic
   \appto\DTMenCAzonemaps{\DTMenCAatlanticzonemaps}%
   \DTMenCAatlanticzonemaps
 \or
  % eastern
   \appto\DTMenCAzonemaps{\DTMenCAeasternzonemaps}%
   \DTMenCAeasternzonemaps
 \or
  % central
   \appto\DTMenCAzonemaps{\DTMenCAcentralzonemaps}%
   \DTMenCAcentralzonemaps
 \or
  % mountain
   \appto\DTMenCAzonemaps{\DTMenCAmountainzonemaps}%
   \DTMenCAmountainzonemaps
 \or
  % pacific
   \appto\DTMenCAzonemaps{\DTMenCApacificzonemaps}%
   \DTMenCApacificzonemaps
 \or
  % clear
   \renewcommand*{\DTMenCAzonemaps}{}%
   \DTMclearmap{-2}{30}%
   \DTMclearmap{-3}{30}%
   \DTMclearmap{-3}{0}%
   \DTMclearmap{-4}{0}%
   \DTMclearmap{-5}{0}%
   \DTMclearmap{-6}{0}%
   \DTMclearmap{-7}{0}%
   \DTMclearmap{-8}{0}%
 \fi
}
%    \end{macrocode}
%
% Define the "en-CA" style (similar to "en-US").
%    \begin{macrocode}
\DTMnewstyle
 {en-CA}% label
 {% date style
   \renewcommand*{\DTMenglishfmtordsuffix}{\DTMenCAfmtordsuffix}%
   \renewcommand*\DTMdisplaydate[4]{%
%    \end{macrocode}
% Support for \opt{showdow} added in v1.02 (thanks to Alan Munn).
%    \begin{macrocode}
     \ifDTMshowdow
       \ifnum##4>-1 % space intended
        \DTMifbool{en-CA}{abbr}%
         {\DTMenglishshortweekdayname{##4}}%
         {\DTMenglishweekdayname{##4}}%
         \DTMenCAdowmonthsep
       \fi
     \fi
     \DTMifbool{en-CA}{abbr}%
     {\DTMenglishshortmonthname{##2}}%
     {\DTMenglishmonthname{##2}}%
     \DTMifbool{en-CA}{showdayofmonth}%
     {%
       \DTMenCAmonthdaysep
       \DTMenglishordinal{##3}%
       \DTMifbool{en-CA}{showyear}%
       {%
         \DTMenCAdayyearsep
         \number##1 % intended
       }%
       {}%
     }%
     {%
       \DTMifbool{en-CA}{showyear}%
       {%
         \DTMenCAmonthdaysep
         \number##1 % intended
       }%
       {}%
     }%
   }%
   \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
 }%
 {% time style
   \renewcommand*\DTMenglishtimesep{\DTMenCAtimesep}%
   \DTMsettimestyle{englishampm}%
 }%
 {% zone style
   \DTMresetzones
   \DTMenCAzonemaps
   \renewcommand*{\DTMdisplayzone}[2]{%
     \DTMifbool{en-CA}{mapzone}%
     {\DTMusezonemapordefault{##1}{##2}}%
     {%
       \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
       \ifDTMshowzoneminutes\DTMenCAtimesep\DTMtwodigits{##2}\fi
     }%
   }%
 }%
 {% full style
   \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate
     \DTMdisplaydate{##1}{##2}{##3}{##4}%
     \DTMenCAdatetimesep
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone
     \DTMenCAtimezonesep
     \DTMdisplayzone{##8}{##9}%
    \fi
   }%
   \renewcommand*{\DTMDisplay}{\DTMdisplay}%
 }%
%    \end{macrocode}
%
% Define numeric style.
%    \begin{macrocode}
\DTMnewstyle
 {en-CA-numeric}% label
 {% date style
    \renewcommand*\DTMdisplaydate[4]{%
      \number##2 % space intended
      \DTMifbool{en-CA}{showdayofmonth}%
      {%
        \DTMenCAdatesep
        \number##3 % space intended
      }%
      {}%
      \DTMifbool{en-CA}{showyear}%
      {%
        \DTMenCAdatesep
        \number##1 % space intended
      }%
      {}%
    }%
    \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
 }%
 {% time style
    \renewcommand*\DTMdisplaytime[3]{%
      \number##1
      \DTMenCAtimesep\DTMtwodigits{##2}%
      \ifDTMshowseconds\DTMenCAtimesep\DTMtwodigits{##3}\fi
    }%
 }%
 {% zone style
   \DTMresetzones
   \DTMenCAzonemaps
   \renewcommand*{\DTMdisplayzone}[2]{%
     \DTMifbool{en-CA}{mapzone}%
     {\DTMusezonemapordefault{##1}{##2}}%
     {%
       \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
       \ifDTMshowzoneminutes\DTMenCAtimesep\DTMtwodigits{##2}\fi
     }%
   }%
 }%
 {% full style
   \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate
     \DTMdisplaydate{##1}{##2}{##3}{##4}%
     \DTMenCAdatetimesep
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone
     \DTMenCAtimezonesep
     \DTMdisplayzone{##8}{##9}%
    \fi
   }%
   \renewcommand*{\DTMDisplay}{\DTMdisplay}%
 }
%    \end{macrocode}
%
%\begin{macro}{\DTMenCAzonemaps}
% The time zone mappings are set through this command, which can be
% redefined if extra mappings are required or mappings need to be
% removed. (These don't take daylight saving into account, except
% for NDT.)
%    \begin{macrocode}
\newcommand*{\DTMenCAzonemaps}{%
  \DTMdefzonemap{-2}{30}{NDT}%
  \DTMdefzonemap{-3}{30}{NST}%
  \DTMdefzonemap{-4}{00}{AST}%
  \DTMdefzonemap{-5}{00}{EST}%
  \DTMdefzonemap{-6}{00}{CST}%
  \DTMdefzonemap{-7}{00}{MST}%
  \DTMdefzonemap{-8}{00}{PST}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenCAstdzonemaps}
% Just the standard time zone mappings.
%\changes{1.03}{2016-01-23}{new}
%    \begin{macrocode}
\newcommand*{\DTMenCAstdzonemaps}{%
  \DTMdefzonemap{-3}{30}{NST}%
  \DTMdefzonemap{-4}{00}{AST}%
  \DTMdefzonemap{-5}{00}{EST}%
  \DTMdefzonemap{-6}{00}{CST}%
  \DTMdefzonemap{-7}{00}{MST}%
  \DTMdefzonemap{-8}{00}{PST}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenCAdstzonemaps}
% Just daylight saving mappings.
%\changes{1.03}{2016-01-23}{new}
%    \begin{macrocode}
\newcommand*{\DTMenCAdstzonemaps}{%
  \DTMdefzonemap{-2}{30}{NDT}%
  \DTMdefzonemap{-3}{00}{ADT}%
  \DTMdefzonemap{-4}{00}{EDT}%
  \DTMdefzonemap{-5}{00}{CDT}%
  \DTMdefzonemap{-6}{00}{MDT}%
  \DTMdefzonemap{-7}{00}{PDT}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenCAnewfoundlandzonemaps}
% Just the Newfoundland zone mappings (NST and NDT).
%\changes{1.03}{2016-01-23}{new}
%    \begin{macrocode}
\newcommand*{\DTMenCAnewfoundlandzonemaps}{%
  \DTMdefzonemap{-3}{30}{NST}%
  \DTMdefzonemap{-2}{30}{NDT}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenCAatlanticzonemaps}
% Just the Atlantic zone mappings (AST and ADT).
%\changes{1.03}{2016-01-23}{new}
%    \begin{macrocode}
\newcommand*{\DTMenCAatlanticzonemaps}{%
  \DTMdefzonemap{-4}{00}{AST}%
  \DTMdefzonemap{-3}{00}{ADT}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenCAeasternzonemaps}
% Just the Eastern zone mappings (EST and EDT).
%\changes{1.03}{2016-01-23}{new}
%    \begin{macrocode}
\newcommand*{\DTMenCAeasternzonemaps}{%
  \DTMdefzonemap{-5}{00}{EST}%
  \DTMdefzonemap{-4}{00}{EDT}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenCAcentralzonemaps}
% Just the Central zone mappings (CST and CDT).
%\changes{1.03}{2016-01-23}{new}
%    \begin{macrocode}
\newcommand*{\DTMenCAcentralzonemaps}{%
  \DTMdefzonemap{-6}{00}{CST}%
  \DTMdefzonemap{-5}{00}{CDT}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenCAmountainzonemaps}
% Just the Mountain zone mappings (MST and MDT).
%\changes{1.03}{2016-01-23}{new}
%    \begin{macrocode}
\newcommand*{\DTMenCAmountainzonemaps}{%
  \DTMdefzonemap{-7}{00}{MST}%
  \DTMdefzonemap{-6}{00}{MDT}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenCApacificzonemaps}
% Just the Pacific zone mappings (PST and PDT).
%\changes{1.03}{2016-01-23}{new}
%    \begin{macrocode}
\newcommand*{\DTMenCApacificzonemaps}{%
  \DTMdefzonemap{-8}{00}{PST}%
  \DTMdefzonemap{-7}{00}{PDT}%
}
%    \end{macrocode}
%\end{macro}
%
%
% Switch style according to the \opt{useregional} setting.
%    \begin{macrocode}
\DTMifcaseregional
{}% do nothing
{\DTMsetstyle{en-CA}}%
{\DTMsetstyle{en-CA-numeric}}%
%    \end{macrocode}
%
% Redefine \cs{dateenglish} (or \cs{date}\meta{dialect}) to prevent
% \sty{babel} from resetting \cs{today}. (For this to work,
% \sty{babel} must already have been loaded if it's required.)
%    \begin{macrocode}
\ifcsundef{date\CurrentTrackedDialect}
{% do nothing
  \ifundef\dateenglish
  {%
  }%
  {%
    \def\dateenglish{%
      \DTMifcaseregional
      {}% do nothing
      {\DTMsetstyle{en-CA}}%
      {\DTMsetstyle{en-CA-numeric}}%
    }%
  }%
}%
{%
  \csdef{date\CurrentTrackedDialect}{%
    \DTMifcaseregional
    {}% do nothing
    {\DTMsetstyle{en-CA}}%
    {\DTMsetstyle{en-CA-numeric}}%
  }%
}%
%    \end{macrocode}
%
%\iffalse
%    \begin{macrocode}
%</datetime2-en-CA.ldf>
%    \end{macrocode}
%\fi
%\subsection{English (Australia) Code (\texttt{datetime2-en-AU.ldf})}
%This file contains the Australian English style.
%\changes{1.0}{2015-03-24}{Initial release}
%\iffalse
%    \begin{macrocode}
%<*datetime2-en-AU.ldf>
%    \end{macrocode}
%\fi
%
% Identify this module.
%    \begin{macrocode}
\ProvidesDateTimeModule{en-AU}[2019/10/21 v1.05 (NLCT)]
%    \end{macrocode}
% Load base English module.
%    \begin{macrocode}
\RequireDateTimeModule{english-base}
%    \end{macrocode}
%
% Allow the user a way of configuring the "en-AU" and
% "en-AU-numeric" styles. This doesn't use the package wide separators such as
% \cs{dtm@datetimesep} in case other date formats are also required.
%
%\begin{macro}{\DTMenAUdowdaysep}
%\changes{1.04}{2016-03-09}{new}
% The separator between the day of week name and the day of month number for the
% text format.
%    \begin{macrocode}
\newcommand*{\DTMenAUdowdaysep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenAUdaymonthsep}
% The separator between the day and month for the text format.
%    \begin{macrocode}
\newcommand*{\DTMenAUdaymonthsep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenAUmonthyearsep}
% The separator between the month and year for the text format.
%    \begin{macrocode}
\newcommand*{\DTMenAUmonthyearsep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenAUdatetimesep}
% The separator between the date and time blocks in the full format
% (either text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMenAUdatetimesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenAUtimezonesep}
% The separator between the time and zone blocks in the full format
% (either text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMenAUtimezonesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenAUdatesep}
% The separator for the numeric date format.
%    \begin{macrocode}
\newcommand*{\DTMenAUdatesep}{/}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenAUtimesep}
% The separator for the numeric time format.
%    \begin{macrocode}
\newcommand*{\DTMenAUtimesep}{:}
%    \end{macrocode}
%\end{macro}
%
%Provide keys that can be used in \cs{DTMlangsetup} to set these
%separators.
%    \begin{macrocode}
\DTMdefkey{en-AU}{dowdaysep}{\renewcommand*{\DTMenAUdowdaysep}{#1}}
\DTMdefkey{en-AU}{daymonthsep}{\renewcommand*{\DTMenAUdaymonthsep}{#1}}
\DTMdefkey{en-AU}{monthyearsep}{\renewcommand*{\DTMenAUmonthyearsep}{#1}}
\DTMdefkey{en-AU}{datetimesep}{\renewcommand*{\DTMenAUdatetimesep}{#1}}
\DTMdefkey{en-AU}{timezonesep}{\renewcommand*{\DTMenAUtimezonesep}{#1}}
\DTMdefkey{en-AU}{datesep}{\renewcommand*{\DTMenAUdatesep}{#1}}
\DTMdefkey{en-AU}{timesep}{\renewcommand*{\DTMenAUtimesep}{#1}}
%    \end{macrocode}
%
% Define a boolean key that can switch between full and abbreviated
% formats for the month and day of week names in the text format.
%    \begin{macrocode}
\DTMdefboolkey{en-AU}{abbr}[true]{}
%    \end{macrocode}
% The default is the full name.
%    \begin{macrocode}
\DTMsetbool{en-AU}{abbr}{false}
%    \end{macrocode}
%
% Define a boolean key that determines if the time zone mappings
% should be used.
%    \begin{macrocode}
\DTMdefboolkey{en-AU}{mapzone}[true]{}
%    \end{macrocode}
% The default is no mappings.
%    \begin{macrocode}
\DTMsetbool{en-AU}{mapzone}{false}
%    \end{macrocode}
%
% Define a boolean key that determines whether to show or hide the
% day of the month. (Called "showdayofmonth" instead of "showday" to
% avoid confusion with the day of the week.)
%    \begin{macrocode}
\DTMdefboolkey{en-AU}{showdayofmonth}[true]{}
%    \end{macrocode}
% The default is to show the day of the month.
%    \begin{macrocode}
\DTMsetbool{en-AU}{showdayofmonth}{true}
%    \end{macrocode}
%
% Define a boolean key that determines whether to show or hide the
% year.
%    \begin{macrocode}
\DTMdefboolkey{en-AU}{showyear}[true]{}
%    \end{macrocode}
% The default is to show the year.
%    \begin{macrocode}
\DTMsetbool{en-AU}{showyear}{true}
%    \end{macrocode}
%
%\begin{macro}{\DTMenAUfmtordsuffix}
% Define the ordinal suffix to be used by this style.
%    \begin{macrocode}
\newcommand*{\DTMenAUfmtordsuffix}[1]{}
%    \end{macrocode}
%\end{macro}
%
% Define a setting to change the ordinal suffix style.
%\changes{1.05}{2019-10-21}{renamed scratch variables}
%    \begin{macrocode}
\DTMdefchoicekey{en-AU}{ord}[\@dtm@val\@dtm@nr]{level,raise,omit,sc}{%
 \ifcase\@dtm@nr\relax
   \renewcommand*{\DTMenAUfmtordsuffix}[1]{##1}%
 \or
   \renewcommand*{\DTMenAUfmtordsuffix}[1]{%
    \DTMtexorpdfstring{\protect\textsuperscript{##1}}{##1}}%
 \or
   \renewcommand*{\DTMenAUfmtordsuffix}[1]{}%
 \or
   \renewcommand*{\DTMenAUfmtordsuffix}[1]{%
    \DTMtexorpdfstring{\protect\textsc{##1}}{##1}}%
 \fi
}
%    \end{macrocode}
%
% Define a setting to change zone mappings.
%\changes{1.03}{2016-01-23}{added zone option to en-AU}
%\changes{1.05}{2019-10-21}{renamed scratch variables}
%    \begin{macrocode}
\DTMdefchoicekey{en-AU}{zone}[\@dtm@val\@dtm@nr]%
 {std,standard,dst,daylight,central,central-western,western%
  eastern,christmas,lord-howe,cocos,keeling,clear}%
{%
 \ifcase\@dtm@nr\relax
  % std
   \appto\DTMenAUzonemaps{\DTMenAUstdzonemaps}%
   \DTMenAUstdzonemaps
 \or
  % standard
   \appto\DTMenAUzonemaps{\DTMenAUstdzonemaps}%
   \DTMenAUstdzonemaps
 \or
  % dst
   \appto\DTMenAUzonemaps{\DTMenAUdstzonemaps}%
   \DTMenAUdstzonemaps
 \or
  % daylight
   \appto\DTMenAUzonemaps{\DTMenAUdstzonemaps}%
   \DTMenAUdstzonemaps
 \or
  % central
   \appto\DTMenAUzonemaps{\DTMenAUcentralzonemaps}%
   \DTMenAUcentralzonemaps
 \or
  % central-western
   \appto\DTMenAUzonemaps{\DTMenAUcentralwesternzonemaps}%
   \DTMenAUcentralwesternzonemaps
 \or
  % western
   \appto\DTMenAUzonemaps{\DTMenAUwesternzonemaps}%
   \DTMenAUwesternzonemaps
 \or
  % eastern
   \appto\DTMenAUzonemaps{\DTMenAUeasternzonemaps}%
   \DTMenAUeasternzonemaps
 \or
  % christmas
   \appto\DTMenAUzonemaps{\DTMenAUchristmaszonemaps}%
   \DTMenAUchristmaszonemaps
 \or
  % lord-howe
   \appto\DTMenAUzonemaps{\DTMenAUlordhowezonemaps}%
   \DTMenAUlordhowezonemaps
 \or
  % norfolk
   \appto\DTMenAUzonemaps{\DTMenAUnorfolkzonemaps}%
   \DTMenAUnorfolkzonemaps
 \or
  % cocos
   \appto\DTMenAUzonemaps{\DTMenAUcocoszonemaps}%
   \DTMenAUcocoszonemaps
 \or
  % keeling
   \appto\DTMenAUzonemaps{\DTMenAUcocoszonemaps}%
   \DTMenAUcocoszonemaps
 \or
  % clear
   \renewcommand*{\DTMenAUzonemaps}{}%
   \DTMclearmap{6}{30}%
   \DTMclearmap{7}{00}%
   \DTMclearmap{8}{00}%
   \DTMclearmap{8}{45}%
   \DTMclearmap{9}{00}%
   \DTMclearmap{9}{30}%
   \DTMclearmap{10}{00}%
   \DTMclearmap{10}{30}%
   \DTMclearmap{11}{00}%
 \fi
}
%    \end{macrocode}
% Define the "en-AU" style.
%    \begin{macrocode}
\DTMnewstyle
 {en-AU}% label
 {% date style
   \renewcommand*{\DTMenglishfmtordsuffix}{\DTMenAUfmtordsuffix}%
   \renewcommand*\DTMdisplaydate[4]{%
     \ifDTMshowdow
       \ifnum##4>-1 % space intended
        \DTMifbool{en-AU}{abbr}%
         {\DTMenglishshortweekdayname{##4}}%
         {\DTMenglishweekdayname{##4}}%
        \DTMenAUdowdaysep
       \fi
     \fi
     \DTMifbool{en-AU}{showdayofmonth}%
     {%
       \DTMenglishordinal{##3}%
       \DTMenAUdaymonthsep
     }%
     {}%
     \DTMifbool{en-AU}{abbr}%
     {\DTMenglishshortmonthname{##2}}%
     {\DTMenglishmonthname{##2}}%
     \DTMifbool{en-AU}{showyear}%
     {%
       \DTMenAUmonthyearsep\number##1 % space intended
     }%
     {}%
   }%
   \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
 }%
 {% time style
   \renewcommand*\DTMenglishtimesep{\DTMenAUtimesep}%
   \DTMsettimestyle{englishampm}%
 }%
 {% zone style
   \DTMresetzones
   \DTMenAUzonemaps
   \renewcommand*{\DTMdisplayzone}[2]{%
     \DTMifbool{en-AU}{mapzone}%
     {\DTMusezonemapordefault{##1}{##2}}%
     {%
       \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
       \ifDTMshowzoneminutes\DTMenAUtimesep\DTMtwodigits{##2}\fi
     }%
   }%
 }%
 {% full style
   \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate
     \DTMdisplaydate{##1}{##2}{##3}{##4}%
     \DTMenAUdatetimesep
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone
     \DTMenAUtimezonesep
     \DTMdisplayzone{##8}{##9}%
    \fi
   }%
   \renewcommand*{\DTMDisplay}{\DTMdisplay}%
 }%
%    \end{macrocode}
%
% Define numeric style.
%    \begin{macrocode}
\DTMnewstyle
 {en-AU-numeric}% label
 {% date style
    \renewcommand*\DTMdisplaydate[4]{%
      \DTMifbool{en-AU}{showdayofmonth}%
      {%
      \number##3 % space intended
      \DTMenAUdatesep
      }%
      {}%
      \number##2 % space intended
      \DTMifbool{en-AU}{showyear}%
      {%
        \DTMenAUdatesep
        \number##1 % space intended
      }%
      {}%
    }%
    \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
 }%
 {% time style
    \renewcommand*\DTMdisplaytime[3]{%
      \number##1
      \DTMenAUtimesep\DTMtwodigits{##2}%
      \ifDTMshowseconds\DTMenAUtimesep\DTMtwodigits{##3}\fi
    }%
 }%
 {% zone style
   \DTMresetzones
   \DTMenAUzonemaps
   \renewcommand*{\DTMdisplayzone}[2]{%
     \DTMifbool{en-AU}{mapzone}%
     {\DTMusezonemapordefault{##1}{##2}}%
     {%
       \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
       \ifDTMshowzoneminutes\DTMenAUtimesep\DTMtwodigits{##2}\fi
     }%
   }%
 }%
 {% full style
   \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate
     \DTMdisplaydate{##1}{##2}{##3}{##4}%
     \DTMenAUdatetimesep
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone
     \DTMenAUtimezonesep
     \DTMdisplayzone{##8}{##9}%
    \fi
   }%
   \renewcommand*{\DTMDisplay}{\DTMdisplay}%
 }
%    \end{macrocode}
%
%\begin{macro}{\DTMenAUzonemaps}
% The time zone mappings are set through this command, which can be
% redefined if extra mappings are required or mappings need to be
% removed.
%    \begin{macrocode}
\newcommand*{\DTMenAUzonemaps}{%
  \DTMdefzonemap{10}{30}{ACDT}% Australian Central Daylight Time
  \DTMdefzonemap{11}{00}{AEDT}% Australian Eastern Daylight Time
  \DTMdefzonemap{9}{30}{ACST}% Australian Central Standard Time
  \DTMdefzonemap{8}{45}{ACWST}% Australian Central Western Standard Time
  \DTMdefzonemap{9}{00}{ACWDT}% Australian Central Western Daylight Time
  \DTMdefzonemap{10}{00}{AEDT}% Australian Eastern Standard Time
  \DTMdefzonemap{8}{00}{AWDT}% Australian Western Standard Time
  \DTMdefzonemap{7}{00}{CXT}% Christmas Island Time
  \DTMdefzonemap{11}{30}{NFT}% Norfolk Island Time
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenAUstdzonemaps}
% Just the standard time zone mappings.
%\changes{1.03}{2016-01-23}{new}
%    \begin{macrocode}
\newcommand*{\DTMenAUstdzonemaps}{%
  \DTMdefzonemap{6}{30}{CCT}%
  \DTMdefzonemap{7}{00}{CXT}%
  \DTMdefzonemap{9}{30}{ACST}%
  \DTMdefzonemap{8}{00}{AWST}%
  \DTMdefzonemap{8}{45}{ACWST}%
  \DTMdefzonemap{10}{00}{AEST}%
  \DTMdefzonemap{10}{30}{LHST}%
  \DTMdefzonemap{11}{00}{NFT}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenAUdstzonemaps}
% Just daylight saving mappings. (Conflicts omitted.)
%\changes{1.03}{2016-01-23}{new}
%    \begin{macrocode}
\newcommand*{\DTMenAUdstzonemaps}{%
  \DTMdefzonemap{9}{00}{AWDT}%
  \DTMdefzonemap{10}{30}{ACDT}%
  \DTMdefzonemap{11}{00}{AEDT}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenAUcentralzonemaps}
% Just the Australian Central zone mappings (ACST and ACDT).
%\changes{1.03}{2016-01-23}{new}
%    \begin{macrocode}
\newcommand*{\DTMenAUcentralzonemaps}{%
  \DTMdefzonemap{9}{30}{ACST}%
  \DTMdefzonemap{10}{30}{ACDT}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenAUcentralwesternzonemaps}
% Just the Australian Central Western zone mapping (ACWST).
%\changes{1.03}{2016-01-23}{new}
%    \begin{macrocode}
\newcommand*{\DTMenAUcentralwesternzonemaps}{%
  \DTMdefzonemap{8}{45}{ACWST}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenAUwesternzonemaps}
% Just the Australian Western zone mappings (AWST and AWDT).
%\changes{1.03}{2016-01-23}{new}
%    \begin{macrocode}
\newcommand*{\DTMenAUwesternzonemaps}{%
  \DTMdefzonemap{8}{00}{AWST}%
  \DTMdefzonemap{9}{00}{AWDT}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenAUeasternzonemaps}
% Just the Australian Eastern zone mappings (AEST and AEDT).
%\changes{1.03}{2016-01-23}{new}
%    \begin{macrocode}
\newcommand*{\DTMenAUeasternzonemaps}{%
  \DTMdefzonemap{10}{00}{AEST}%
  \DTMdefzonemap{11}{00}{AEDT}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenAUchrismaszonemaps}
% Just the Christmas Island zone mapping (CXT).
%\changes{1.03}{2016-01-23}{new}
%    \begin{macrocode}
\newcommand*{\DTMenAUchristmaszonemaps}{%
  \DTMdefzonemap{7}{00}{CXT}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenAUlordhowezonemaps}
% Just the Lord Howe Island zone mappings (LHST and LHDT).
%\changes{1.03}{2016-01-23}{new}
%    \begin{macrocode}
\newcommand*{\DTMenAUlordhowezonemaps}{%
  \DTMdefzonemap{10}{30}{LHST}%
  \DTMdefzonemap{11}{00}{LHDT}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenAUnorfolkzonemaps}
% Just the Norfolk Island zone mapping (NFT).
%\changes{1.03}{2016-01-23}{new}
%    \begin{macrocode}
\newcommand*{\DTMenAUnorfolkzonemaps}{%
  \DTMdefzonemap{11}{00}{NFT}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenAUcocoszonemaps}
% Just the Cocos (Keeling) Island zone mapping (CCT).
%\changes{1.03}{2016-01-23}{new}
%    \begin{macrocode}
\newcommand*{\DTMenAUcocoszonemaps}{%
  \DTMdefzonemap{6}{30}{CCT}%
}
%    \end{macrocode}
%\end{macro}
%
%
% Switch style according to the \opt{useregional} setting.
%    \begin{macrocode}
\DTMifcaseregional
{}% do nothing
{\DTMsetstyle{en-AU}}%
{\DTMsetstyle{en-AU-numeric}}%
%    \end{macrocode}
%
% Redefine \cs{dateenglish} (or \cs{date}\meta{dialect}) to prevent
% \sty{babel} from resetting \cs{today}. (For this to work,
% \sty{babel} must already have been loaded if it's required.)
%    \begin{macrocode}
\ifcsundef{date\CurrentTrackedDialect}
{% do nothing
  \ifundef\dateenglish
  {%
  }%
  {%
    \def\dateenglish{%
      \DTMifcaseregional
      {}% do nothing
      {\DTMsetstyle{en-AU}}%
      {\DTMsetstyle{en-AU-numeric}}%
    }%
  }%
}%
{%
  \csdef{date\CurrentTrackedDialect}{%
    \DTMifcaseregional
    {}% do nothing
    {\DTMsetstyle{en-AU}}%
    {\DTMsetstyle{en-AU-numeric}}%
  }%
}%
%    \end{macrocode}
%
%\iffalse
%    \begin{macrocode}
%</datetime2-en-AU.ldf>
%    \end{macrocode}
%\fi
%\subsection{English (New Zealand) Code (\texttt{datetime2-en-NZ.ldf})}
%This file contains the New Zealand English style.
%\changes{1.0}{2015-03-24}{Initial release}
%\iffalse
%    \begin{macrocode}
%<*datetime2-en-NZ.ldf>
%    \end{macrocode}
%\fi
%
% Identify this module.
%    \begin{macrocode}
\ProvidesDateTimeModule{en-NZ}[2019/10/21 v1.05 (NLCT)]
%    \end{macrocode}
% Load base English module.
%    \begin{macrocode}
\RequireDateTimeModule{english-base}
%    \end{macrocode}
%
% Allow the user a way of configuring the "en-NZ" and
% "en-NZ-numeric" styles.
% This doesn't use the package wide separators such as
% \cs{dtm@datetimesep} in case other date formats are also required.
%
%\begin{macro}{\DTMenNZdowdaysep}
%\changes{1.04}{2016-03-09}{new}
% The separator between the day of week name and the day of month
% number for the text format.
%    \begin{macrocode}
\newcommand*{\DTMenNZdowdaysep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenNZdaymonthsep}
% The separator between the day and month for the text format.
%    \begin{macrocode}
\newcommand*{\DTMenNZdaymonthsep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenNZmonthyearsep}
% The separator between the month and year for the text format.
%    \begin{macrocode}
\newcommand*{\DTMenNZmonthyearsep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenNZdatetimesep}
% The separator between the date and time blocks in the full format
% (either text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMenNZdatetimesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenNZtimezonesep}
% The separator between the time and zone blocks in the full format
% (either text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMenNZtimezonesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenNZdatesep}
% The separator for the numeric date format.
%    \begin{macrocode}
\newcommand*{\DTMenNZdatesep}{/}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenNZtimesep}
% The separator for the numeric time format.
%    \begin{macrocode}
\newcommand*{\DTMenNZtimesep}{:}
%    \end{macrocode}
%\end{macro}
%
%Provide keys that can be used in \cs{DTMlangsetup} to set these
%separators.
%    \begin{macrocode}
\DTMdefkey{en-NZ}{dowdaysep}{\renewcommand*{\DTMenNZdowdaysep}{#1}}
\DTMdefkey{en-NZ}{daymonthsep}{\renewcommand*{\DTMenNZdaymonthsep}{#1}}
\DTMdefkey{en-NZ}{monthyearsep}{\renewcommand*{\DTMenNZmonthyearsep}{#1}}
\DTMdefkey{en-NZ}{datetimesep}{\renewcommand*{\DTMenNZdatetimesep}{#1}}
\DTMdefkey{en-NZ}{timezonesep}{\renewcommand*{\DTMenNZtimezonesep}{#1}}
\DTMdefkey{en-NZ}{datesep}{\renewcommand*{\DTMenNZdatesep}{#1}}
\DTMdefkey{en-NZ}{timesep}{\renewcommand*{\DTMenNZtimesep}{#1}}
%    \end{macrocode}
%
% Define a boolean key that can switch between full and abbreviated
% formats for the month and day of week names in the text format.
%    \begin{macrocode}
\DTMdefboolkey{en-NZ}{abbr}[true]{}
%    \end{macrocode}
% The default is the full name.
%    \begin{macrocode}
\DTMsetbool{en-NZ}{abbr}{false}
%    \end{macrocode}
%
% Define a boolean key that determines if the time zone mappings
% should be used.
%    \begin{macrocode}
\DTMdefboolkey{en-NZ}{mapzone}[true]{}
%    \end{macrocode}
% The default is no mappings.
%    \begin{macrocode}
\DTMsetbool{en-NZ}{mapzone}{false}
%    \end{macrocode}
%
% Define a boolean key that determines whether to show or hide the
% day of the month. (Called "showdayofmonth" instead of "showday" to
% avoid confusion with the day of the week.)
%    \begin{macrocode}
\DTMdefboolkey{en-NZ}{showdayofmonth}[true]{}
%    \end{macrocode}
% The default is to show the day of the month.
%    \begin{macrocode}
\DTMsetbool{en-NZ}{showdayofmonth}{true}
%    \end{macrocode}
%
% Define a boolean key that determines whether to show or hide the
% year.
%    \begin{macrocode}
\DTMdefboolkey{en-NZ}{showyear}[true]{}
%    \end{macrocode}
% The default is to show the year.
%    \begin{macrocode}
\DTMsetbool{en-NZ}{showyear}{true}
%    \end{macrocode}
%
%\begin{macro}{\DTMenNZfmtordsuffix}
% Define the ordinal suffix to be used by this style.
%    \begin{macrocode}
\newcommand*{\DTMenNZfmtordsuffix}[1]{}
%    \end{macrocode}
%\end{macro}
%
% Define a setting to change the ordinal suffix style.
%\changes{1.05}{2019-10-21}{renamed scratch variables}
%    \begin{macrocode}
\DTMdefchoicekey{en-NZ}{ord}[\@dtm@val\@dtm@nr]{level,raise,omit,sc}{%
 \ifcase\@dtm@nr\relax
   \renewcommand*{\DTMenNZfmtordsuffix}[1]{##1}%
 \or
   \renewcommand*{\DTMenNZfmtordsuffix}[1]{%
    \DTMtexorpdfstring{\protect\textsuperscript{##1}}{##1}}%
 \or
   \renewcommand*{\DTMenNZfmtordsuffix}[1]{}%
 \or
   \renewcommand*{\DTMenNZfmtordsuffix}[1]{%
    \DTMtexorpdfstring{\protect\textsc{##1}}{##1}}%
 \fi
}
%    \end{macrocode}
%
% Define the "en-NZ" style.
%    \begin{macrocode}
\DTMnewstyle
 {en-NZ}% label
 {% date style
   \renewcommand*{\DTMenglishfmtordsuffix}{\DTMenNZfmtordsuffix}%
   \renewcommand*\DTMdisplaydate[4]{%
     \ifDTMshowdow
       \ifnum##4>-1 % space intended
        \DTMifbool{en-NZ}{abbr}%
         {\DTMenglishshortweekdayname{##4}}%
         {\DTMenglishweekdayname{##4}}%
        \DTMenNZdowdaysep
       \fi
     \fi
     \DTMifbool{en-NZ}{showdayofmonth}%
     {%
       \DTMenglishordinal{##3}%
       \DTMenNZdaymonthsep
     }%
     {}%
     \DTMifbool{en-NZ}{abbr}%
     {\DTMenglishshortmonthname{##2}}%
     {\DTMenglishmonthname{##2}}%
     \DTMifbool{en-NZ}{showyear}%
     {%
       \DTMenNZmonthyearsep\number##1 % space intended
     }%
     {}%
   }%
   \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
 }%
 {% time style
   \renewcommand*\DTMenglishtimesep{\DTMenNZtimesep}%
   \DTMsettimestyle{englishampm}%
 }%
 {% zone style
   \DTMresetzones
   \DTMenNZzonemaps
   \renewcommand*{\DTMdisplayzone}[2]{%
     \DTMifbool{en-NZ}{mapzone}%
     {\DTMusezonemapordefault{##1}{##2}}%
     {%
       \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
       \ifDTMshowzoneminutes\DTMenNZtimesep\DTMtwodigits{##2}\fi
     }%
   }%
 }%
 {% full style
   \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate
     \DTMdisplaydate{##1}{##2}{##3}{##4}%
     \DTMenNZdatetimesep
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone
     \DTMenNZtimezonesep
     \DTMdisplayzone{##8}{##9}%
    \fi
   }%
   \renewcommand*{\DTMDisplay}{\DTMdisplay}%
 }%
%    \end{macrocode}
%
% Define numeric style.
%    \begin{macrocode}
\DTMnewstyle
 {en-NZ-numeric}% label
 {% date style
    \renewcommand*\DTMdisplaydate[4]{%
      \DTMifbool{en-NZ}{showdayofmonth}%
      {%
        \number##3 % space intended
        \DTMenNZdatesep
      }%
      {}%
      \number##2 % space intended
      \DTMifbool{en-NZ}{showyear}%
      {%
        \DTMenNZdatesep
        \number##1 % space intended
      }%
      {}%
    }%
    \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
 }%
 {% time style
    \renewcommand*\DTMdisplaytime[3]{%
      \number##1
      \DTMenNZtimesep\DTMtwodigits{##2}%
      \ifDTMshowseconds\DTMenNZtimesep\DTMtwodigits{##3}\fi
    }%
 }%
 {% zone style
   \DTMresetzones
   \DTMenNZzonemaps
   \renewcommand*{\DTMdisplayzone}[2]{%
     \DTMifbool{en-NZ}{mapzone}%
     {\DTMusezonemapordefault{##1}{##2}}%
     {%
       \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
       \ifDTMshowzoneminutes\DTMenNZtimesep\DTMtwodigits{##2}\fi
     }%
   }%
 }%
 {% full style
   \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate
     \DTMdisplaydate{##1}{##2}{##3}{##4}%
     \DTMenNZdatetimesep
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone
     \DTMenNZtimezonesep
     \DTMdisplayzone{##8}{##9}%
    \fi
   }%
   \renewcommand*{\DTMDisplay}{\DTMdisplay}%
 }
%    \end{macrocode}
%
%\begin{macro}{\DTMenNZzonemaps}
% The time zone mappings are set through this command, which can be
% redefined if extra mappings are required or mappings need to be
% removed.
%    \begin{macrocode}
\newcommand*{\DTMenNZzonemaps}{%
  \DTMdefzonemap{12}{00}{NZST}%
  \DTMdefzonemap{12}{45}{CHAST}%
  \DTMdefzonemap{13}{00}{NZDT}%
  \DTMdefzonemap{13}{45}{CHADT}%
}
%    \end{macrocode}
%\end{macro}
%
% Switch style according to the \opt{useregional} setting.
%    \begin{macrocode}
\DTMifcaseregional
{}% do nothing
{\DTMsetstyle{en-NZ}}%
{\DTMsetstyle{en-NZ-numeric}}%
%    \end{macrocode}
%
% Redefine \cs{dateenglish} (or \cs{date}\meta{dialect}) to prevent
% \sty{babel} from resetting \cs{today}. (For this to work,
% \sty{babel} must already have been loaded if it's required.)
%    \begin{macrocode}
\ifcsundef{date\CurrentTrackedDialect}
{% do nothing
  \ifundef\dateenglish
  {%
  }%
  {%
    \def\dateenglish{%
      \DTMifcaseregional
      {}% do nothing
      {\DTMsetstyle{en-NZ}}%
      {\DTMsetstyle{en-NZ-numeric}}%
    }%
  }%
}%
{%
  \csdef{date\CurrentTrackedDialect}{%
    \DTMifcaseregional
    {}% do nothing
    {\DTMsetstyle{en-NZ}}%
    {\DTMsetstyle{en-NZ-numeric}}%
  }%
}%
%    \end{macrocode}
%
%\iffalse
%    \begin{macrocode}
%</datetime2-en-NZ.ldf>
%    \end{macrocode}
%\fi
%\subsection{English (GG) Code (\texttt{datetime2-en-GG.ldf})}
%This file contains the \texttt{en-GG} style.
%\changes{1.0}{2015-03-24}{Initial release}
%\iffalse
%    \begin{macrocode}
%<*datetime2-en-GG.ldf>
%    \end{macrocode}
%\fi
%
% Identify this module.
%    \begin{macrocode}
\ProvidesDateTimeModule{en-GG}[2019/10/21 v1.05 (NLCT)]
%    \end{macrocode}
% Load base English module.
%    \begin{macrocode}
\RequireDateTimeModule{english-base}
%    \end{macrocode}
%
% Allow the user a way of configuring the "en-GG" and
% "en-GG-numeric" styles. This doesn't use the package wide separators such as
% \cs{dtm@datetimesep} in case other date formats are also required.
%
%\begin{macro}{\DTMenGGdowdaysep}
%\changes{1.04}{2016-03-09}{new}
% The separator between the day of week name and the day of month
% number for the text format.
%    \begin{macrocode}
\newcommand*{\DTMenGGdowdaysep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenGGdaymonthsep}
% The separator between the day and month for the text format.
%    \begin{macrocode}
\newcommand*{\DTMenGGdaymonthsep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenGGmonthyearsep}
% The separator between the month and year for the text format.
%    \begin{macrocode}
\newcommand*{\DTMenGGmonthyearsep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenGGdatetimesep}
% The separator between the date and time blocks in the full format
% (either text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMenGGdatetimesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenGGtimezonesep}
% The separator between the time and zone blocks in the full format
% (either text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMenGGtimezonesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenGGdatesep}
% The separator for the numeric date format.
%    \begin{macrocode}
\newcommand*{\DTMenGGdatesep}{/}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenGGtimesep}
% The separator for the numeric time format.
%    \begin{macrocode}
\newcommand*{\DTMenGGtimesep}{:}
%    \end{macrocode}
%\end{macro}
%
%Provide keys that can be used in \cs{DTMlangsetup} to set these
%separators.
%    \begin{macrocode}
\DTMdefkey{en-GG}{dowdaysep}{\renewcommand*{\DTMenGGdowdaysep}{#1}}
\DTMdefkey{en-GG}{daymonthsep}{\renewcommand*{\DTMenGGdaymonthsep}{#1}}
\DTMdefkey{en-GG}{monthyearsep}{\renewcommand*{\DTMenGGmonthyearsep}{#1}}
\DTMdefkey{en-GG}{datetimesep}{\renewcommand*{\DTMenGGdatetimesep}{#1}}
\DTMdefkey{en-GG}{timezonesep}{\renewcommand*{\DTMenGGtimezonesep}{#1}}
\DTMdefkey{en-GG}{datesep}{\renewcommand*{\DTMenGGdatesep}{#1}}
\DTMdefkey{en-GG}{timesep}{\renewcommand*{\DTMenGGtimesep}{#1}}
%    \end{macrocode}
%
% Define a boolean key that can switch between full and abbreviated
% formats for the month and day of week names in the text format.
%    \begin{macrocode}
\DTMdefboolkey{en-GG}{abbr}[true]{}
%    \end{macrocode}
% The default is the full name.
%    \begin{macrocode}
\DTMsetbool{en-GG}{abbr}{false}
%    \end{macrocode}
%
% Define a boolean key that determines if the time zone mappings
% should be used.
%    \begin{macrocode}
\DTMdefboolkey{en-GG}{mapzone}[true]{}
%    \end{macrocode}
% The default is to use mappings.
%    \begin{macrocode}
\DTMsetbool{en-GG}{mapzone}{true}
%    \end{macrocode}
%
% Define a boolean key that determines whether to show or hide the
% day of the month. (Called "showdayofmonth" instead of "showday" to
% avoid confusion with the day of the week.)
%    \begin{macrocode}
\DTMdefboolkey{en-GG}{showdayofmonth}[true]{}
%    \end{macrocode}
% The default is to show the day of the month.
%    \begin{macrocode}
\DTMsetbool{en-GG}{showdayofmonth}{true}
%    \end{macrocode}
%
% Define a boolean key that determines whether to show or hide the
% year.
%    \begin{macrocode}
\DTMdefboolkey{en-GG}{showyear}[true]{}
%    \end{macrocode}
% The default is to show the year.
%    \begin{macrocode}
\DTMsetbool{en-GG}{showyear}{true}
%    \end{macrocode}
%
%\begin{macro}{\DTMenGGfmtordsuffix}
% Define the ordinal suffix to be used by this style.
%    \begin{macrocode}
\newcommand*{\DTMenGGfmtordsuffix}[1]{#1}
%    \end{macrocode}
%\end{macro}
%
% Define a setting to change the ordinal suffix style.
%\changes{1.05}{2019-10-21}{renamed scratch variables}
%    \begin{macrocode}
\DTMdefchoicekey{en-GG}{ord}[\@dtm@val\@dtm@nr]{level,raise,omit,sc}{%
 \ifcase\@dtm@nr\relax
   \renewcommand*{\DTMenGGfmtordsuffix}[1]{##1}%
 \or
   \renewcommand*{\DTMenGGfmtordsuffix}[1]{%
    \DTMtexorpdfstring{\protect\textsuperscript{##1}}{##1}}%
 \or
   \renewcommand*{\DTMenGGfmtordsuffix}[1]{}%
 \or
   \renewcommand*{\DTMenGGfmtordsuffix}[1]{%
    \DTMtexorpdfstring{\protect\textsc{##1}}{##1}}%
 \fi
}
%    \end{macrocode}
%
% Define the "en-GG" style.
%    \begin{macrocode}
\DTMnewstyle
 {en-GG}% label
 {% date style
   \renewcommand*{\DTMenglishfmtordsuffix}{\DTMenGGfmtordsuffix}%
   \renewcommand*\DTMdisplaydate[4]{%
     \ifDTMshowdow
       \ifnum##4>-1 % space intended
        \DTMifbool{en-GG}{abbr}%
         {\DTMenglishshortweekdayname{##4}}%
         {\DTMenglishweekdayname{##4}}%
        \DTMenGGdowdaysep
       \fi
     \fi
     \DTMifbool{en-GG}{showdayofmonth}%
     {%
       \DTMenglishordinal{##3}%
       \DTMenGGdaymonthsep
     }%
     {}%
     \DTMifbool{en-GG}{abbr}%
     {\DTMenglishshortmonthname{##2}}%
     {\DTMenglishmonthname{##2}}%
     \DTMifbool{en-GG}{showyear}%
     {%
       \DTMenGGmonthyearsep\number##1 % space intended
     }%
     {}%
   }%
   \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
 }%
 {% time style
   \renewcommand*\DTMenglishtimesep{\DTMenGGtimesep}%
   \DTMsettimestyle{englishampm}%
 }%
 {% zone style
   \DTMresetzones
   \DTMenGGzonemaps
   \renewcommand*{\DTMdisplayzone}[2]{%
     \DTMifbool{en-GG}{mapzone}%
     {\DTMusezonemapordefault{##1}{##2}}%
     {%
       \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
       \ifDTMshowzoneminutes\DTMenGGtimesep\DTMtwodigits{##2}\fi
     }%
   }%
 }%
 {% full style
   \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate
     \DTMdisplaydate{##1}{##2}{##3}{##4}%
     \DTMenGGdatetimesep
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone
     \DTMenGGtimezonesep
     \DTMdisplayzone{##8}{##9}%
    \fi
   }%
   \renewcommand*{\DTMDisplay}{\DTMdisplay}%
 }%
%    \end{macrocode}
%
% Define numeric style.
%    \begin{macrocode}
\DTMnewstyle
 {en-GG-numeric}% label
 {% date style
    \renewcommand*\DTMdisplaydate[4]{%
      \DTMifbool{en-GG}{showdayofmonth}%
      {%
        \number##3 % space intended
        \DTMenGGdatesep
      }%
      {}%
      \number##2 % space intended
      \DTMifbool{en-GG}{showyear}%
      {%
        \DTMenGGdatesep
        \number##1 % space intended
      }%
      {}%
    }%
    \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
 }%
 {% time style
    \renewcommand*\DTMdisplaytime[3]{%
      \number##1
      \DTMenGGtimesep\DTMtwodigits{##2}%
      \ifDTMshowseconds\DTMenGGtimesep\DTMtwodigits{##3}\fi
    }%
 }%
 {% zone style
   \DTMresetzones
   \DTMenGGzonemaps
   \renewcommand*{\DTMdisplayzone}[2]{%
     \DTMifbool{en-GG}{mapzone}%
     {\DTMusezonemapordefault{##1}{##2}}%
     {%
       \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
       \ifDTMshowzoneminutes\DTMenGGtimesep\DTMtwodigits{##2}\fi
     }%
   }%
 }%
 {% full style
   \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate
     \DTMdisplaydate{##1}{##2}{##3}{##4}%
     \DTMenGGdatetimesep
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone
     \DTMenGGtimezonesep
     \DTMdisplayzone{##8}{##9}%
    \fi
   }%
   \renewcommand*{\DTMDisplay}{\DTMdisplay}%
 }
%    \end{macrocode}
%
%\begin{macro}{\DTMenGGzonemaps}
% The time zone mappings are set through this command, which can be
% redefined if extra mappings are required or mappings need to be
% removed.
%    \begin{macrocode}
\newcommand*{\DTMenGGzonemaps}{%
  \DTMdefzonemap{00}{00}{GMT}%
  \DTMdefzonemap{01}{00}{BST}%
}
%    \end{macrocode}
%\end{macro}
%
% Switch style according to the \opt{useregional} setting.
%    \begin{macrocode}
\DTMifcaseregional
{}% do nothing
{\DTMsetstyle{en-GG}}%
{\DTMsetstyle{en-GG-numeric}}%
%    \end{macrocode}
%
% Redefine \cs{dateenglish} (or \cs{date}\meta{dialect}) to prevent
% \sty{babel} from resetting \cs{today}. (For this to work,
% \sty{babel} must already have been loaded if it's required.)
%    \begin{macrocode}
\ifcsundef{date\CurrentTrackedDialect}
{% do nothing
  \ifundef\dateenglish
  {%
  }%
  {%
    \def\dateenglish{%
      \DTMifcaseregional
      {}% do nothing
      {\DTMsetstyle{en-GG}}%
      {\DTMsetstyle{en-GG-numeric}}%
    }%
  }%
}%
{%
  \csdef{date\CurrentTrackedDialect}{%
    \DTMifcaseregional
    {}% do nothing
    {\DTMsetstyle{en-GG}}%
    {\DTMsetstyle{en-GG-numeric}}%
  }%
}%
%    \end{macrocode}
%\iffalse
%    \begin{macrocode}
%</datetime2-en-GG.ldf>
%    \end{macrocode}
%\fi
%\subsection{English (JE) Code (\texttt{datetime2-en-JE.ldf})}
%This file contains the \texttt{en-JE} style.
%\changes{1.0}{2015-03-24}{Initial release}
%\iffalse
%    \begin{macrocode}
%<*datetime2-en-JE.ldf>
%    \end{macrocode}
%\fi
%
% Identify this module.
%    \begin{macrocode}
\ProvidesDateTimeModule{en-JE}[2019/10/21 v1.05 (NLCT)]
%    \end{macrocode}
% Load base English module.
%    \begin{macrocode}
\RequireDateTimeModule{english-base}
%    \end{macrocode}
%
% Allow the user a way of configuring the "en-JE" and
% "en-JE-numeric" styles. This doesn't use the package wide separators such as
% \cs{dtm@datetimesep} in case other date formats are also required.
%
%\begin{macro}{\DTMenJEdowdaysep}
%\changes{1.04}{2016-03-09}{new}
% The separator between the day of week name and the day of month
% number for the text format.
%    \begin{macrocode}
\newcommand*{\DTMenJEdowdaysep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenJEdaymonthsep}
% The separator between the day and month for the text format.
%    \begin{macrocode}
\newcommand*{\DTMenJEdaymonthsep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenJEmonthyearsep}
% The separator between the month and year for the text format.
%    \begin{macrocode}
\newcommand*{\DTMenJEmonthyearsep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenJEdatetimesep}
% The separator between the date and time blocks in the full format
% (either text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMenJEdatetimesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenJEtimezonesep}
% The separator between the time and zone blocks in the full format
% (either text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMenJEtimezonesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenJEdatesep}
% The separator for the numeric date format.
%    \begin{macrocode}
\newcommand*{\DTMenJEdatesep}{/}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenJEtimesep}
% The separator for the numeric time format.
%    \begin{macrocode}
\newcommand*{\DTMenJEtimesep}{:}
%    \end{macrocode}
%\end{macro}
%
%Provide keys that can be used in \cs{DTMlangsetup} to set these
%separators.
%    \begin{macrocode}
\DTMdefkey{en-JE}{dowdaysep}{\renewcommand*{\DTMenJEdowdaysep}{#1}}
\DTMdefkey{en-JE}{daymonthsep}{\renewcommand*{\DTMenJEdaymonthsep}{#1}}
\DTMdefkey{en-JE}{monthyearsep}{\renewcommand*{\DTMenJEmonthyearsep}{#1}}
\DTMdefkey{en-JE}{datetimesep}{\renewcommand*{\DTMenJEdatetimesep}{#1}}
\DTMdefkey{en-JE}{timezonesep}{\renewcommand*{\DTMenJEtimezonesep}{#1}}
\DTMdefkey{en-JE}{datesep}{\renewcommand*{\DTMenJEdatesep}{#1}}
\DTMdefkey{en-JE}{timesep}{\renewcommand*{\DTMenJEtimesep}{#1}}
%    \end{macrocode}
%
% Define a boolean key that can switch between full and abbreviated
% formats for the month and day of week names in the text format.
%    \begin{macrocode}
\DTMdefboolkey{en-JE}{abbr}[true]{}
%    \end{macrocode}
% The default is the full name.
%    \begin{macrocode}
\DTMsetbool{en-JE}{abbr}{false}
%    \end{macrocode}
%
% Define a boolean key that determines if the time zone mappings
% should be used.
%    \begin{macrocode}
\DTMdefboolkey{en-JE}{mapzone}[true]{}
%    \end{macrocode}
% The default is to use mappings.
%    \begin{macrocode}
\DTMsetbool{en-JE}{mapzone}{true}
%    \end{macrocode}
%
% Define a boolean key that determines whether to show or hide the
% day of the month. (Called "showdayofmonth" instead of "showday" to
% avoid confusion with the day of the week.)
%    \begin{macrocode}
\DTMdefboolkey{en-JE}{showdayofmonth}[true]{}
%    \end{macrocode}
% The default is to show the day of the month.
%    \begin{macrocode}
\DTMsetbool{en-JE}{showdayofmonth}{true}
%    \end{macrocode}
%
% Define a boolean key that determines whether to show or hide the
% year.
%    \begin{macrocode}
\DTMdefboolkey{en-JE}{showyear}[true]{}
%    \end{macrocode}
% The default is to show the year.
%    \begin{macrocode}
\DTMsetbool{en-JE}{showyear}{true}
%    \end{macrocode}
%
%\begin{macro}{\DTMenJEfmtordsuffix}
% Define the ordinal suffix to be used by this style.
%    \begin{macrocode}
\newcommand*{\DTMenJEfmtordsuffix}[1]{#1}
%    \end{macrocode}
%\end{macro}
%
% Define a setting to change the ordinal suffix style.
%\changes{1.05}{2019-10-21}{renamed scratch variables}
%    \begin{macrocode}
\DTMdefchoicekey{en-JE}{ord}[\@dtm@val\@dtm@nr]{level,raise,omit,sc}{%
 \ifcase\@dtm@nr\relax
   \renewcommand*{\DTMenJEfmtordsuffix}[1]{##1}%
 \or
   \renewcommand*{\DTMenJEfmtordsuffix}[1]{%
    \DTMtexorpdfstring{\protect\textsuperscript{##1}}{##1}}%
 \or
   \renewcommand*{\DTMenJEfmtordsuffix}[1]{}%
 \or
   \renewcommand*{\DTMenJEfmtordsuffix}[1]{%
    \DTMtexorpdfstring{\protect\textsc{##1}}{##1}}%
 \fi
}
%    \end{macrocode}
%
% Define the "en-JE" style.
%    \begin{macrocode}
\DTMnewstyle
 {en-JE}% label
 {% date style
   \renewcommand*{\DTMenglishfmtordsuffix}{\DTMenJEfmtordsuffix}%
   \renewcommand*\DTMdisplaydate[4]{%
     \ifDTMshowdow
       \ifnum##4>-1 % space intended
        \DTMifbool{en-JE}{abbr}%
         {\DTMenglishshortweekdayname{##4}}%
         {\DTMenglishweekdayname{##4}}%
        \DTMenJEdowdaysep
       \fi
     \fi
     \DTMifbool{en-JE}{showdayofmonth}%
     {%
       \DTMenglishordinal{##3}%
       \DTMenJEdaymonthsep
     }%
     {}%
     \DTMifbool{en-JE}{abbr}%
     {\DTMenglishshortmonthname{##2}}%
     {\DTMenglishmonthname{##2}}%
     \DTMifbool{en-JE}{showyear}%
     {%
       \DTMenJEmonthyearsep\number##1 % space intended
     }%
     {}%
   }%
   \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
 }%
 {% time style
   \renewcommand*\DTMenglishtimesep{\DTMenJEtimesep}%
   \DTMsettimestyle{englishampm}%
 }%
 {% zone style
   \DTMresetzones
   \DTMenJEzonemaps
   \renewcommand*{\DTMdisplayzone}[2]{%
     \DTMifbool{en-JE}{mapzone}%
     {\DTMusezonemapordefault{##1}{##2}}%
     {%
       \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
       \ifDTMshowzoneminutes\DTMenJEtimesep\DTMtwodigits{##2}\fi
     }%
   }%
 }%
 {% full style
   \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate
     \DTMdisplaydate{##1}{##2}{##3}{##4}%
     \DTMenJEdatetimesep
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone
     \DTMenJEtimezonesep
     \DTMdisplayzone{##8}{##9}%
    \fi
   }%
   \renewcommand*{\DTMDisplay}{\DTMdisplay}%
 }%
%    \end{macrocode}
%
% Define numeric style.
%    \begin{macrocode}
\DTMnewstyle
 {en-JE-numeric}% label
 {% date style
    \renewcommand*\DTMdisplaydate[4]{%
      \DTMifbool{en-JE}{showdayofmonth}%
      {%
        \number##3 % space intended
        \DTMenJEdatesep
      }%
      {}%
      \number##2 % space intended
      \DTMifbool{en-JE}{showyear}%
      {%
        \DTMenJEdatesep
        \number##1 % space intended
      }%
      {}%
    }%
    \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
 }%
 {% time style
    \renewcommand*\DTMdisplaytime[3]{%
      \number##1
      \DTMenJEtimesep\DTMtwodigits{##2}%
      \ifDTMshowseconds\DTMenJEtimesep\DTMtwodigits{##3}\fi
    }%
 }%
 {% zone style
   \DTMresetzones
   \DTMenJEzonemaps
   \renewcommand*{\DTMdisplayzone}[2]{%
     \DTMifbool{en-JE}{mapzone}%
     {\DTMusezonemapordefault{##1}{##2}}%
     {%
       \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
       \ifDTMshowzoneminutes\DTMenJEtimesep\DTMtwodigits{##2}\fi
     }%
   }%
 }%
 {% full style
   \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate
     \DTMdisplaydate{##1}{##2}{##3}{##4}%
     \DTMenJEdatetimesep
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone
     \DTMenJEtimezonesep
     \DTMdisplayzone{##8}{##9}%
    \fi
   }%
   \renewcommand*{\DTMDisplay}{\DTMdisplay}%
 }
%    \end{macrocode}
%
%\begin{macro}{\DTMenJEzonemaps}
% The time zone mappings are set through this command, which can be
% redefined if extra mappings are required or mappings need to be
% removed.
%    \begin{macrocode}
\newcommand*{\DTMenJEzonemaps}{%
  \DTMdefzonemap{00}{00}{GMT}%
  \DTMdefzonemap{01}{00}{BST}%
}
%    \end{macrocode}
%\end{macro}
%
% Switch style according to the \opt{useregional} setting.
%    \begin{macrocode}
\DTMifcaseregional
{}% do nothing
{\DTMsetstyle{en-JE}}%
{\DTMsetstyle{en-JE-numeric}}%
%    \end{macrocode}
%
% Redefine \cs{dateenglish} (or \cs{date}\meta{dialect}) to prevent
% \sty{babel} from resetting \cs{today}. (For this to work,
% \sty{babel} must already have been loaded if it's required.)
%    \begin{macrocode}
\ifcsundef{date\CurrentTrackedDialect}
{% do nothing
  \ifundef\dateenglish
  {%
  }%
  {%
    \def\dateenglish{%
      \DTMifcaseregional
      {}% do nothing
      {\DTMsetstyle{en-JE}}%
      {\DTMsetstyle{en-JE-numeric}}%
    }%
  }%
}%
{%
  \csdef{date\CurrentTrackedDialect}{%
    \DTMifcaseregional
    {}% do nothing
    {\DTMsetstyle{en-JE}}%
    {\DTMsetstyle{en-JE-numeric}}%
  }%
}%
%    \end{macrocode}
%\iffalse
%    \begin{macrocode}
%</datetime2-en-JE.ldf>
%    \end{macrocode}
%\fi
%\subsection{English (IM) Code (\texttt{datetime2-en-IM.ldf})}
%This file contains the \texttt{en-IM} style.
%\changes{1.0}{2015-03-24}{Initial release}
%\iffalse
%    \begin{macrocode}
%<*datetime2-en-IM.ldf>
%    \end{macrocode}
%\fi
%
% Identify this module.
%    \begin{macrocode}
\ProvidesDateTimeModule{en-IM}[2019/10/21 v1.05 (NLCT)]
%    \end{macrocode}
% Load base English module.
%    \begin{macrocode}
\RequireDateTimeModule{english-base}
%    \end{macrocode}
%
% Allow the user a way of configuring the "en-IM" and
% "en-IM-numeric" styles. This doesn't use the package wide separators such as
% \cs{dtm@datetimesep} in case other date formats are also required.
%
%\begin{macro}{\DTMenIMdowdaysep}
%\changes{1.04}{2016-03-09}{new}
% The separator between the day of week name and the day of month
% number for the text format.
%    \begin{macrocode}
\newcommand*{\DTMenIMdowdaysep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenIMdaymonthsep}
% The separator between the day and month for the text format.
%    \begin{macrocode}
\newcommand*{\DTMenIMdaymonthsep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenIMmonthyearsep}
% The separator between the month and year for the text format.
%    \begin{macrocode}
\newcommand*{\DTMenIMmonthyearsep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenIMdatetimesep}
% The separator between the date and time blocks in the full format
% (either text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMenIMdatetimesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenIMtimezonesep}
% The separator between the time and zone blocks in the full format
% (either text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMenIMtimezonesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenIMdatesep}
% The separator for the numeric date format.
%    \begin{macrocode}
\newcommand*{\DTMenIMdatesep}{/}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenIMtimesep}
% The separator for the numeric time format.
%    \begin{macrocode}
\newcommand*{\DTMenIMtimesep}{:}
%    \end{macrocode}
%\end{macro}
%
%Provide keys that can be used in \cs{DTMlangsetup} to set these
%separators.
%    \begin{macrocode}
\DTMdefkey{en-IM}{dowdaysep}{\renewcommand*{\DTMenIMdowdaysep}{#1}}
\DTMdefkey{en-IM}{daymonthsep}{\renewcommand*{\DTMenIMdaymonthsep}{#1}}
\DTMdefkey{en-IM}{monthyearsep}{\renewcommand*{\DTMenIMmonthyearsep}{#1}}
\DTMdefkey{en-IM}{datetimesep}{\renewcommand*{\DTMenIMdatetimesep}{#1}}
\DTMdefkey{en-IM}{timezonesep}{\renewcommand*{\DTMenIMtimezonesep}{#1}}
\DTMdefkey{en-IM}{datesep}{\renewcommand*{\DTMenIMdatesep}{#1}}
\DTMdefkey{en-IM}{timesep}{\renewcommand*{\DTMenIMtimesep}{#1}}
%    \end{macrocode}
%
% Define a boolean key that can switch between full and abbreviated
% formats for the month and day of week names in the text format.
%    \begin{macrocode}
\DTMdefboolkey{en-IM}{abbr}[true]{}
%    \end{macrocode}
% The default is the full name.
%    \begin{macrocode}
\DTMsetbool{en-IM}{abbr}{false}
%    \end{macrocode}
%
% Define a boolean key that determines if the time zone mappings
% should be used.
%    \begin{macrocode}
\DTMdefboolkey{en-IM}{mapzone}[true]{}
%    \end{macrocode}
% The default is to use mappings.
%    \begin{macrocode}
\DTMsetbool{en-IM}{mapzone}{true}
%    \end{macrocode}
%
% Define a boolean key that determines whether to show or hide the
% day of the month. (Called "showdayofmonth" instead of "showday" to
% avoid confusion with the day of the week.)
%    \begin{macrocode}
\DTMdefboolkey{en-IM}{showdayofmonth}[true]{}
%    \end{macrocode}
% The default is to show the day of the month.
%    \begin{macrocode}
\DTMsetbool{en-IM}{showdayofmonth}{true}
%    \end{macrocode}
%
% Define a boolean key that determines whether to show or hide the
% year.
%    \begin{macrocode}
\DTMdefboolkey{en-IM}{showyear}[true]{}
%    \end{macrocode}
% The default is to show the year.
%    \begin{macrocode}
\DTMsetbool{en-IM}{showyear}{true}
%    \end{macrocode}
%
%\begin{macro}{\DTMenIMfmtordsuffix}
% Define the ordinal suffix to be used by this style.
%    \begin{macrocode}
\newcommand*{\DTMenIMfmtordsuffix}[1]{#1}
%    \end{macrocode}
%\end{macro}
%
% Define a setting to change the ordinal suffix style.
%\changes{1.05}{2019-10-21}{renamed scratch variables}
%    \begin{macrocode}
\DTMdefchoicekey{en-IM}{ord}[\@dtm@val\@dtm@nr]{level,raise,omit,sc}{%
 \ifcase\@dtm@nr\relax
   \renewcommand*{\DTMenIMfmtordsuffix}[1]{##1}%
 \or
   \renewcommand*{\DTMenIMfmtordsuffix}[1]{%
    \DTMtexorpdfstring{\protect\textsuperscript{##1}}{##1}}%
 \or
   \renewcommand*{\DTMenIMfmtordsuffix}[1]{}%
 \or
   \renewcommand*{\DTMenIMfmtordsuffix}[1]{%
    \DTMtexorpdfstring{\protect\textsc{##1}}{##1}}%
 \fi
}
%    \end{macrocode}
%
% Define the "en-IM" style.
%    \begin{macrocode}
\DTMnewstyle
 {en-IM}% label
 {% date style
   \renewcommand*{\DTMenglishfmtordsuffix}{\DTMenIMfmtordsuffix}%
   \renewcommand*\DTMdisplaydate[4]{%
     \ifDTMshowdow
       \ifnum##4>-1 % space intended
        \DTMifbool{en-IM}{abbr}%
         {\DTMenglishshortweekdayname{##4}}%
         {\DTMenglishweekdayname{##4}}%
        \DTMenIMdowdaysep
       \fi
     \fi
     \DTMifbool{en-IM}{showdayofmonth}%
     {%
       \DTMenglishordinal{##3}%
       \DTMenIMdaymonthsep
     }%
     {}%
     \DTMifbool{en-IM}{abbr}%
     {\DTMenglishshortmonthname{##2}}%
     {\DTMenglishmonthname{##2}}%
     \DTMifbool{en-IM}{showyear}%
     {%
       \DTMenIMmonthyearsep\number##1 % space intended
     }%
     {}%
   }%
   \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
 }%
 {% time style
   \renewcommand*\DTMenglishtimesep{\DTMenIMtimesep}%
   \DTMsettimestyle{englishampm}%
 }%
 {% zone style
   \DTMresetzones
   \DTMenIMzonemaps
   \renewcommand*{\DTMdisplayzone}[2]{%
     \DTMifbool{en-IM}{mapzone}%
     {\DTMusezonemapordefault{##1}{##2}}%
     {%
       \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
       \ifDTMshowzoneminutes\DTMenIMtimesep\DTMtwodigits{##2}\fi
     }%
   }%
 }%
 {% full style
   \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate
     \DTMdisplaydate{##1}{##2}{##3}{##4}%
     \DTMenIMdatetimesep
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone
     \DTMenIMtimezonesep
     \DTMdisplayzone{##8}{##9}%
    \fi
   }%
   \renewcommand*{\DTMDisplay}{\DTMdisplay}%
 }%
%    \end{macrocode}
%
% Define numeric style.
%    \begin{macrocode}
\DTMnewstyle
 {en-IM-numeric}% label
 {% date style
    \renewcommand*\DTMdisplaydate[4]{%
      \DTMifbool{en-IM}{showdayofmonth}%
      {%
        \number##3 % space intended
        \DTMenIMdatesep
      }%
      {}%
      \number##2 % space intended
      \DTMifbool{en-IM}{showyear}%
      {%
        \DTMenIMdatesep
        \number##1 % space intended
      }%
      {}%
    }%
    \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
 }%
 {% time style
    \renewcommand*\DTMdisplaytime[3]{%
      \number##1
      \DTMenIMtimesep\DTMtwodigits{##2}%
      \ifDTMshowseconds\DTMenIMtimesep\DTMtwodigits{##3}\fi
    }%
 }%
 {% zone style
   \DTMresetzones
   \DTMenIMzonemaps
   \renewcommand*{\DTMdisplayzone}[2]{%
     \DTMifbool{en-IM}{mapzone}%
     {\DTMusezonemapordefault{##1}{##2}}%
     {%
       \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
       \ifDTMshowzoneminutes\DTMenIMtimesep\DTMtwodigits{##2}\fi
     }%
   }%
 }%
 {% full style
   \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate
     \DTMdisplaydate{##1}{##2}{##3}{##4}%
     \DTMenIMdatetimesep
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone
     \DTMenIMtimezonesep
     \DTMdisplayzone{##8}{##9}%
    \fi
   }%
   \renewcommand*{\DTMDisplay}{\DTMdisplay}%
 }
%    \end{macrocode}
%
%\begin{macro}{\DTMenIMzonemaps}
% The time zone mappings are set through this command, which can be
% redefined if extra mappings are required or mappings need to be
% removed.
%    \begin{macrocode}
\newcommand*{\DTMenIMzonemaps}{%
  \DTMdefzonemap{00}{00}{GMT}%
  \DTMdefzonemap{01}{00}{BST}%
}
%    \end{macrocode}
%\end{macro}
%
% Switch style according to the \opt{useregional} setting.
%    \begin{macrocode}
\DTMifcaseregional
{}% do nothing
{\DTMsetstyle{en-IM}}%
{\DTMsetstyle{en-IM-numeric}}%
%    \end{macrocode}
%
% Redefine \cs{dateenglish} (or \cs{date}\meta{dialect}) to prevent
% \sty{babel} from resetting \cs{today}. (For this to work,
% \sty{babel} must already have been loaded if it's required.)
%    \begin{macrocode}
\ifcsundef{date\CurrentTrackedDialect}
{% do nothing
  \ifundef\dateenglish
  {%
  }%
  {%
    \def\dateenglish{%
      \DTMifcaseregional
      {}% do nothing
      {\DTMsetstyle{en-IM}}%
      {\DTMsetstyle{en-IM-numeric}}%
    }%
  }%
}%
{%
  \csdef{date\CurrentTrackedDialect}{%
    \DTMifcaseregional
    {}% do nothing
    {\DTMsetstyle{en-IM}}%
    {\DTMsetstyle{en-IM-numeric}}%
  }%
}%
%    \end{macrocode}
%\iffalse
%    \begin{macrocode}
%</datetime2-en-IM.ldf>
%    \end{macrocode}
%\fi
%\subsection{English (MT) Code (\texttt{datetime2-en-MT.ldf})}
%This file contains the \texttt{en-MT} style.
%\changes{1.0}{2015-03-24}{Initial release}
%\iffalse
%    \begin{macrocode}
%<*datetime2-en-MT.ldf>
%    \end{macrocode}
%\fi
%
% Identify this module.
%    \begin{macrocode}
\ProvidesDateTimeModule{en-MT}[2019/10/21 v1.05 (NLCT)]
%    \end{macrocode}
% Load base English module.
%    \begin{macrocode}
\RequireDateTimeModule{english-base}
%    \end{macrocode}
%
% Allow the user a way of configuring the "en-MT" and
% "en-MT-numeric" styles. This doesn't use the package wide separators such as
% \cs{dtm@datetimesep} in case other date formats are also required.
%
%\begin{macro}{\DTMenMTdowdaysep}
%\changes{1.04}{2016-03-09}{new}
% The separator between the day of week name and the day of month
% number for the text format.
%    \begin{macrocode}
\newcommand*{\DTMenMTdowdaysep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenMTdaymonthsep}
% The separator between the day and month for the text format.
%    \begin{macrocode}
\newcommand*{\DTMenMTdaymonthsep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenMTmonthyearsep}
% The separator between the month and year for the text format.
%    \begin{macrocode}
\newcommand*{\DTMenMTmonthyearsep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenMTdatetimesep}
% The separator between the date and time blocks in the full format
% (either text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMenMTdatetimesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenMTtimezonesep}
% The separator between the time and zone blocks in the full format
% (either text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMenMTtimezonesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenMTdatesep}
% The separator for the numeric date format.
%    \begin{macrocode}
\newcommand*{\DTMenMTdatesep}{/}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenMTtimesep}
% The separator for the numeric time format.
%    \begin{macrocode}
\newcommand*{\DTMenMTtimesep}{:}
%    \end{macrocode}
%\end{macro}
%
%Provide keys that can be used in \cs{DTMlangsetup} to set these
%separators.
%    \begin{macrocode}
\DTMdefkey{en-MT}{dowdaysep}{\renewcommand*{\DTMenMTdowdaysep}{#1}}
\DTMdefkey{en-MT}{daymonthsep}{\renewcommand*{\DTMenMTdaymonthsep}{#1}}
\DTMdefkey{en-MT}{monthyearsep}{\renewcommand*{\DTMenMTmonthyearsep}{#1}}
\DTMdefkey{en-MT}{datetimesep}{\renewcommand*{\DTMenMTdatetimesep}{#1}}
\DTMdefkey{en-MT}{timezonesep}{\renewcommand*{\DTMenMTtimezonesep}{#1}}
\DTMdefkey{en-MT}{datesep}{\renewcommand*{\DTMenMTdatesep}{#1}}
\DTMdefkey{en-MT}{timesep}{\renewcommand*{\DTMenMTtimesep}{#1}}
%    \end{macrocode}
%
% Define a boolean key that can switch between full and abbreviated
% formats for the month and day of week names in the text format.
%    \begin{macrocode}
\DTMdefboolkey{en-MT}{abbr}[true]{}
%    \end{macrocode}
% The default is the full name.
%    \begin{macrocode}
\DTMsetbool{en-MT}{abbr}{false}
%    \end{macrocode}
%
% Define a boolean key that determines if the time zone mappings
% should be used.
%    \begin{macrocode}
\DTMdefboolkey{en-MT}{mapzone}[true]{}
%    \end{macrocode}
% The default is to use mappings.
%    \begin{macrocode}
\DTMsetbool{en-MT}{mapzone}{true}
%    \end{macrocode}
%
% Define a boolean key that determines whether to show or hide the
% day of the month. (Called "showdayofmonth" instead of "showday" to
% avoid confusion with the day of the week.)
%    \begin{macrocode}
\DTMdefboolkey{en-MT}{showdayofmonth}[true]{}
%    \end{macrocode}
% The default is to show the day of the month.
%    \begin{macrocode}
\DTMsetbool{en-MT}{showdayofmonth}{true}
%    \end{macrocode}
%
% Define a boolean key that determines whether to show or hide the
% year.
%    \begin{macrocode}
\DTMdefboolkey{en-MT}{showyear}[true]{}
%    \end{macrocode}
% The default is to show the year.
%    \begin{macrocode}
\DTMsetbool{en-MT}{showyear}{true}
%    \end{macrocode}
%
%\begin{macro}{\DTMenMTfmtordsuffix}
% Define the ordinal suffix to be used by this style.
%    \begin{macrocode}
\newcommand*{\DTMenMTfmtordsuffix}[1]{}
%    \end{macrocode}
%\end{macro}
%
% Define a setting to change the ordinal suffix style.
%\changes{1.05}{2019-10-21}{renamed scratch variables}
%    \begin{macrocode}
\DTMdefchoicekey{en-MT}{ord}[\@dtm@val\@dtm@nr]{level,raise,omit,sc}{%
 \ifcase\@dtm@nr\relax
   \renewcommand*{\DTMenMTfmtordsuffix}[1]{##1}%
 \or
   \renewcommand*{\DTMenMTfmtordsuffix}[1]{%
    \DTMtexorpdfstring{\protect\textsuperscript{##1}}{##1}}%
 \or
   \renewcommand*{\DTMenMTfmtordsuffix}[1]{}%
 \or
   \renewcommand*{\DTMenMTfmtordsuffix}[1]{%
    \DTMtexorpdfstring{\protect\textsc{##1}}{##1}}%
 \fi
}
%    \end{macrocode}
%
% Define the "en-MT" style.
%    \begin{macrocode}
\DTMnewstyle
 {en-MT}% label
 {% date style
   \renewcommand*{\DTMenglishfmtordsuffix}{\DTMenMTfmtordsuffix}%
   \renewcommand*\DTMdisplaydate[4]{%
     \ifDTMshowdow
       \ifnum##4>-1 % space intended
        \DTMifbool{en-MT}{abbr}%
         {\DTMenglishshortweekdayname{##4}}%
         {\DTMenglishweekdayname{##4}}%
        \DTMenMTdowdaysep
       \fi
     \fi
     \DTMifbool{en-MT}{showdayofmonth}%
     {%
       \DTMenglishordinal{##3}%
       \DTMenMTdaymonthsep
     }%
     {}%
     \DTMifbool{en-MT}{abbr}%
     {\DTMenglishshortmonthname{##2}}%
     {\DTMenglishmonthname{##2}}%
     \DTMifbool{en-MT}{showyear}%
     {%
       \DTMenMTmonthyearsep\number##1 % space intended
     }%
     {}%
   }%
   \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
 }%
 {% time style
   \renewcommand*\DTMenglishtimesep{\DTMenMTtimesep}%
   \DTMsettimestyle{englishampm}%
 }%
 {% zone style
   \DTMresetzones
   \DTMenMTzonemaps
   \renewcommand*{\DTMdisplayzone}[2]{%
     \DTMifbool{en-MT}{mapzone}%
     {\DTMusezonemapordefault{##1}{##2}}%
     {%
       \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
       \ifDTMshowzoneminutes\DTMenMTtimesep\DTMtwodigits{##2}\fi
     }%
   }%
 }%
 {% full style
   \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate
     \DTMdisplaydate{##1}{##2}{##3}{##4}%
     \DTMenMTdatetimesep
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone
     \DTMenMTtimezonesep
     \DTMdisplayzone{##8}{##9}%
    \fi
   }%
   \renewcommand*{\DTMDisplay}{\DTMdisplay}%
 }%
%    \end{macrocode}
%
% Define numeric style.
%    \begin{macrocode}
\DTMnewstyle
 {en-MT-numeric}% label
 {% date style
    \renewcommand*\DTMdisplaydate[4]{%
      \DTMifbool{en-MT}{showdayofmonth}%
      {%
        \number##3 % space intended
        \DTMenMTdatesep
      }%
      {}%
      \number##2 % space intended
      \DTMifbool{en-MT}{showyear}%
      {%
        \DTMenMTdatesep
        \number##1 % space intended
      }%
      {}%
    }%
    \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
 }%
 {% time style
    \renewcommand*\DTMdisplaytime[3]{%
      \number##1
      \DTMenMTtimesep\DTMtwodigits{##2}%
      \ifDTMshowseconds\DTMenMTtimesep\DTMtwodigits{##3}\fi
    }%
 }%
 {% zone style
   \DTMresetzones
   \DTMenMTzonemaps
   \renewcommand*{\DTMdisplayzone}[2]{%
     \DTMifbool{en-MT}{mapzone}%
     {\DTMusezonemapordefault{##1}{##2}}%
     {%
       \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
       \ifDTMshowzoneminutes\DTMenMTtimesep\DTMtwodigits{##2}\fi
     }%
   }%
 }%
 {% full style
   \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate
     \DTMdisplaydate{##1}{##2}{##3}{##4}%
     \DTMenMTdatetimesep
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone
     \DTMenMTtimezonesep
     \DTMdisplayzone{##8}{##9}%
    \fi
   }%
   \renewcommand*{\DTMDisplay}{\DTMdisplay}%
 }
%    \end{macrocode}
%
%\begin{macro}{\DTMenMTzonemaps}
% The time zone mappings are set through this command, which can be
% redefined if extra mappings are required or mappings need to be
% removed.
%    \begin{macrocode}
\newcommand*{\DTMenMTzonemaps}{%
  \DTMdefzonemap{02}{00}{CEST}%
  \DTMdefzonemap{01}{00}{CET}%
}
%    \end{macrocode}
%\end{macro}
%
% Switch style according to the \opt{useregional} setting.
%    \begin{macrocode}
\DTMifcaseregional
{}% do nothing
{\DTMsetstyle{en-MT}}%
{\DTMsetstyle{en-MT-numeric}}%
%    \end{macrocode}
%
% Redefine \cs{dateenglish} (or \cs{date}\meta{dialect}) to prevent
% \sty{babel} from resetting \cs{today}. (For this to work,
% \sty{babel} must already have been loaded if it's required.)
%    \begin{macrocode}
\ifcsundef{date\CurrentTrackedDialect}
{% do nothing
  \ifundef\dateenglish
  {%
  }%
  {%
    \def\dateenglish{%
      \DTMifcaseregional
      {}% do nothing
      {\DTMsetstyle{en-MT}}%
      {\DTMsetstyle{en-MT-numeric}}%
    }%
  }%
}%
{%
  \csdef{date\CurrentTrackedDialect}{%
    \DTMifcaseregional
    {}% do nothing
    {\DTMsetstyle{en-MT}}%
    {\DTMsetstyle{en-MT-numeric}}%
  }%
}%
%    \end{macrocode}
%
%\iffalse
%    \begin{macrocode}
%</datetime2-en-MT.ldf>
%    \end{macrocode}
%\fi
%\subsection{English (IE) Code (\texttt{datetime2-en-IE.ldf})}
%This file contains the \texttt{en-IE} style.
%\changes{1.0}{2015-03-24}{Initial release}
%\iffalse
%    \begin{macrocode}
%<*datetime2-en-IE.ldf>
%    \end{macrocode}
%\fi
%
% Identify this module.
%    \begin{macrocode}
\ProvidesDateTimeModule{en-IE}[2019/10/21 v1.05 (NLCT)]
%    \end{macrocode}
% Load base English module.
%    \begin{macrocode}
\RequireDateTimeModule{english-base}
%    \end{macrocode}
%
% Allow the user a way of configuring the "en-IE" and
% "en-IE-numeric" styles. This doesn't use the package wide separators such as
% \cs{dtm@datetimesep} in case other date formats are also required.
%
%\begin{macro}{\DTMenIEdowdaysep}
%\changes{1.04}{2016-03-09}{new}
% The separator between the day and month for the text format.
%    \begin{macrocode}
\newcommand*{\DTMenIEdowdaysep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenIEdaymonthsep}
% The separator between the day and month for the text format.
%    \begin{macrocode}
\newcommand*{\DTMenIEdaymonthsep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenIEmonthyearsep}
% The separator between the month and year for the text format.
%    \begin{macrocode}
\newcommand*{\DTMenIEmonthyearsep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenIEdatetimesep}
% The separator between the date and time blocks in the full format
% (either text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMenIEdatetimesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenIEtimezonesep}
% The separator between the time and zone blocks in the full format
% (either text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMenIEtimezonesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenIEdatesep}
% The separator for the numeric date format.
%    \begin{macrocode}
\newcommand*{\DTMenIEdatesep}{/}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMenIEtimesep}
% The separator for the numeric time format.
%    \begin{macrocode}
\newcommand*{\DTMenIEtimesep}{:}
%    \end{macrocode}
%\end{macro}
%
%Provide keys that can be used in \cs{DTMlangsetup} to set these
%separators.
%    \begin{macrocode}
\DTMdefkey{en-IE}{dowdaysep}{\renewcommand*{\DTMenIEdowdaysep}{#1}}
\DTMdefkey{en-IE}{daymonthsep}{\renewcommand*{\DTMenIEdaymonthsep}{#1}}
\DTMdefkey{en-IE}{monthyearsep}{\renewcommand*{\DTMenIEmonthyearsep}{#1}}
\DTMdefkey{en-IE}{datetimesep}{\renewcommand*{\DTMenIEdatetimesep}{#1}}
\DTMdefkey{en-IE}{timezonesep}{\renewcommand*{\DTMenIEtimezonesep}{#1}}
\DTMdefkey{en-IE}{datesep}{\renewcommand*{\DTMenIEdatesep}{#1}}
\DTMdefkey{en-IE}{timesep}{\renewcommand*{\DTMenIEtimesep}{#1}}
%    \end{macrocode}
%
% Define a boolean key that can switch between full and abbreviated
% formats for the month and day of week names in the text format.
%    \begin{macrocode}
\DTMdefboolkey{en-IE}{abbr}[true]{}
%    \end{macrocode}
% The default is the full name.
%    \begin{macrocode}
\DTMsetbool{en-IE}{abbr}{false}
%    \end{macrocode}
%
% Define a boolean key that determines if the time zone mappings
% should be used.
%    \begin{macrocode}
\DTMdefboolkey{en-IE}{mapzone}[true]{}
%    \end{macrocode}
% The default is to use mappings.
%    \begin{macrocode}
\DTMsetbool{en-IE}{mapzone}{true}
%    \end{macrocode}
%
% Define a boolean key that determines whether to show or hide the
% day of the month. (Called "showdayofmonth" instead of "showday" to
% avoid confusion with the day of the week.)
%    \begin{macrocode}
\DTMdefboolkey{en-IE}{showdayofmonth}[true]{}
%    \end{macrocode}
% The default is to show the day of the month.
%    \begin{macrocode}
\DTMsetbool{en-IE}{showdayofmonth}{true}
%    \end{macrocode}
%
% Define a boolean key that determines whether to show or hide the
% year.
%    \begin{macrocode}
\DTMdefboolkey{en-IE}{showyear}[true]{}
%    \end{macrocode}
% The default is to show the year.
%    \begin{macrocode}
\DTMsetbool{en-IE}{showyear}{true}
%    \end{macrocode}
%
%\begin{macro}{\DTMenIEfmtordsuffix}
% Define the ordinal suffix to be used by this style.
%    \begin{macrocode}
\newcommand*{\DTMenIEfmtordsuffix}[1]{#1}
%    \end{macrocode}
%\end{macro}
%
% Define a setting to change the ordinal suffix style.
%\changes{1.05}{2019-10-21}{renamed scratch variables}
%    \begin{macrocode}
\DTMdefchoicekey{en-IE}{ord}[\@dtm@val\@dtm@nr]{level,raise,omit,sc}{%
 \ifcase\@dtm@nr\relax
   \renewcommand*{\DTMenIEfmtordsuffix}[1]{##1}%
 \or
   \renewcommand*{\DTMenIEfmtordsuffix}[1]{%
    \DTMtexorpdfstring{\protect\textsuperscript{##1}}{##1}}%
 \or
   \renewcommand*{\DTMenIEfmtordsuffix}[1]{}%
 \or
   \renewcommand*{\DTMenIEfmtordsuffix}[1]{%
    \DTMtexorpdfstring{\protect\textsc{##1}}{##1}}%
 \fi
}
%    \end{macrocode}
%
% Define the "en-IE" style.
%    \begin{macrocode}
\DTMnewstyle
 {en-IE}% label
 {% date style
   \renewcommand*{\DTMenglishfmtordsuffix}{\DTMenIEfmtordsuffix}%
   \renewcommand*\DTMdisplaydate[4]{%
     \ifDTMshowdow
       \ifnum##4>-1 % space intended
        \DTMifbool{en-IE}{abbr}%
         {\DTMenglishshortweekdayname{##4}}%
         {\DTMenglishweekdayname{##4}}%
        \DTMenIEdowdaysep
       \fi
     \fi
     \DTMifbool{en-IE}{showdayofmonth}%
     {%
       \DTMenglishordinal{##3}%
       \DTMenIEdaymonthsep
     }%
     {}%
     \DTMifbool{en-IE}{abbr}%
     {\DTMenglishshortmonthname{##2}}%
     {\DTMenglishmonthname{##2}}%
     \DTMifbool{en-IE}{showyear}%
     {%
       \DTMenIEmonthyearsep\number##1 % space intended
     }%
     {}%
   }%
   \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
 }%
 {% time style
   \renewcommand*\DTMenglishtimesep{\DTMenIEtimesep}%
   \DTMsettimestyle{englishampm}%
 }%
 {% zone style
   \DTMresetzones
   \DTMenIEzonemaps
   \renewcommand*{\DTMdisplayzone}[2]{%
     \DTMifbool{en-IE}{mapzone}%
     {\DTMusezonemapordefault{##1}{##2}}%
     {%
       \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
       \ifDTMshowzoneminutes\DTMenIEtimesep\DTMtwodigits{##2}\fi
     }%
   }%
 }%
 {% full style
   \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate
     \DTMdisplaydate{##1}{##2}{##3}{##4}%
     \DTMenIEdatetimesep
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone
     \DTMenIEtimezonesep
     \DTMdisplayzone{##8}{##9}%
    \fi
   }%
   \renewcommand*{\DTMDisplay}{\DTMdisplay}%
 }%
%    \end{macrocode}
%
% Define numeric style.
%    \begin{macrocode}
\DTMnewstyle
 {en-IE-numeric}% label
 {% date style
    \renewcommand*\DTMdisplaydate[4]{%
      \DTMifbool{en-IE}{showdayofmonth}%
      {%
        \number##3 % space intended
        \DTMenIEdatesep
      }%
      {}%
      \number##2 % space intended
      \DTMifbool{en-IE}{showyear}%
      {%
        \DTMenIEdatesep
        \number##1 % space intended
      }%
      {}%
    }%
    \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
 }%
 {% time style
    \renewcommand*\DTMdisplaytime[3]{%
      \number##1
      \DTMenIEtimesep\DTMtwodigits{##2}%
      \ifDTMshowseconds\DTMenIEtimesep\DTMtwodigits{##3}\fi
    }%
 }%
 {% zone style
   \DTMresetzones
   \DTMenIEzonemaps
   \renewcommand*{\DTMdisplayzone}[2]{%
     \DTMifbool{en-IE}{mapzone}%
     {\DTMusezonemapordefault{##1}{##2}}%
     {%
       \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
       \ifDTMshowzoneminutes\DTMenIEtimesep\DTMtwodigits{##2}\fi
     }%
   }%
 }%
 {% full style
   \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate
     \DTMdisplaydate{##1}{##2}{##3}{##4}%
     \DTMenIEdatetimesep
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone
     \DTMenIEtimezonesep
     \DTMdisplayzone{##8}{##9}%
    \fi
   }%
   \renewcommand*{\DTMDisplay}{\DTMdisplay}%
 }
%    \end{macrocode}
%
%\begin{macro}{\DTMenIEzonemaps}
% The time zone mappings are set through this command, which can be
% redefined if extra mappings are required or mappings need to be
% removed.
%    \begin{macrocode}
\newcommand*{\DTMenIEzonemaps}{%
  \DTMdefzonemap{00}{00}{GMT}%
  \DTMdefzonemap{01}{00}{IST}%
}
%    \end{macrocode}
%\end{macro}
%
% Switch style according to the \opt{useregional} setting.
%    \begin{macrocode}
\DTMifcaseregional
{}% do nothing
{\DTMsetstyle{en-IE}}%
{\DTMsetstyle{en-IE-numeric}}%
%    \end{macrocode}
%
% Redefine \cs{dateenglish} (or \cs{date}\meta{dialect}) to prevent
% \sty{babel} from resetting \cs{today}. (For this to work,
% \sty{babel} must already have been loaded if it's required.)
%    \begin{macrocode}
\ifcsundef{date\CurrentTrackedDialect}
{% do nothing
  \ifundef\dateenglish
  {%
  }%
  {%
    \def\dateenglish{%
      \DTMifcaseregional
      {}% do nothing
      {\DTMsetstyle{en-IE}}%
      {\DTMsetstyle{en-IE-numeric}}%
    }%
  }%
}%
{%
  \csdef{date\CurrentTrackedDialect}{%
    \DTMifcaseregional
    {}% do nothing
    {\DTMsetstyle{en-IE}}%
    {\DTMsetstyle{en-IE-numeric}}%
  }%
}%
%    \end{macrocode}
%
%\iffalse
%    \begin{macrocode}
%</datetime2-en-IE.ldf>
%    \end{macrocode}
%\fi
%\Finale
\endinput
