texlive[74393] Master: datatool-regions (2mar25)
commits+karl at tug.org
commits+karl at tug.org
Sun Mar 2 22:37:13 CET 2025
Revision: 74393
https://tug.org/svn/texlive?view=revision&revision=74393
Author: karl
Date: 2025-03-02 22:37:12 +0100 (Sun, 02 Mar 2025)
Log Message:
-----------
datatool-regions (2mar25)
Modified Paths:
--------------
trunk/Master/tlpkg/bin/tlpkg-ctan-check
trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/datatool-regions/
trunk/Master/texmf-dist/doc/latex/datatool-regions/DEPENDS.txt
trunk/Master/texmf-dist/doc/latex/datatool-regions/README.md
trunk/Master/texmf-dist/doc/latex/datatool-regions/datatool-regions.pdf
trunk/Master/texmf-dist/source/latex/datatool-regions/
trunk/Master/texmf-dist/source/latex/datatool-regions/datatool-regions.dtx
trunk/Master/texmf-dist/source/latex/datatool-regions/datatool-regions.ins
trunk/Master/texmf-dist/tex/latex/datatool-regions/
trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-AU.ldf
trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-BE.ldf
trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-CA.ldf
trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-FK.ldf
trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-GB.ldf
trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-GG.ldf
trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-GI.ldf
trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-IE.ldf
trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-IM.ldf
trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-JE.ldf
trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-NZ.ldf
trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-US.ldf
trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-ZA.ldf
trunk/Master/tlpkg/tlpsrc/datatool-regions.tlpsrc
Added: trunk/Master/texmf-dist/doc/latex/datatool-regions/DEPENDS.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/datatool-regions/DEPENDS.txt (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/datatool-regions/DEPENDS.txt 2025-03-02 21:37:12 UTC (rev 74393)
@@ -0,0 +1 @@
+datatool
Property changes on: trunk/Master/texmf-dist/doc/latex/datatool-regions/DEPENDS.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/datatool-regions/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/datatool-regions/README.md (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/datatool-regions/README.md 2025-03-02 21:37:12 UTC (rev 74393)
@@ -0,0 +1,83 @@
+# Region (Numeric) Support for datatool v3.0+ (datatool-regions)
+
+Version 1.0 (2025-03-01)
+
+Author: Nicola L. C. Talbot [dickimaw-books.com](https://www.dickimaw-books.com/)
+
+Licence: LPPL
+
+Home Page: https://github.com/nlct/datatool-regions
+
+Required Packages:
+[datatool](https://ctan.org/pkg/datatool) (3.0+),
+[tracklang](https://ctan.org/pkg/tracklang) (1.6.4+)
+
+
+The `datatool-regions` bundle provides the language-independent
+region ldf files for the `datatool` package (v3.0+).
+The `*.ldf` files should all be placed on TeX's path.
+
+These files don't require any explicit loading. They will
+automatically be input by `datatool-base.sty` (or relevant
+supplementary package) if they are found and required by the
+`tracklang` localisation settings. See the `datatool` v3.0+
+and `tracklang` user manuals for further details.
+
+The region files deal with defining (if applicable) the currency
+symbol and switching to the region's currency in the region's hook.
+Region files may additionally (if not dependent on the language) set
+the number group and decimal characters, and provide functions for
+parsing numeric dates and times.
+
+Note that `datatool-base.sty` deals with appending the region's hook to
+the applicable language captions hook, if available.
+
+The language support is distributed separately. Any setting that
+depends on _both_ language and region should be supplied with the
+applicable language bundle. This may occur for regions with multiple
+official languages, where the number formatting or date/time parsing
+depends on the language within the region. For example, `datatool-english`
+provides `datatool-en-CA.ldf` and `datatool-en-ZA.ldf` in addition
+to `datatool-english.ldf`.
+
+If a pre-3.0 version of `datatool` is installed, these ldf files
+will be ignored.
+
+Example:
+
+ \documentclass{article}
+ \usepackage[locales={en-GB}]{datatool-base}% v3.0
+ \begin{document}
+ Currency: \DTLdecimaltocurrency{12345.67}{\price}\price.
+
+ \DTLmul\result{\price}{-0.5}\result.
+ Data type: \DTLgetDataTypeName{\DTLdatumtype{\result}}.
+ Numeric value: \DTLdatumvalue{\result}.
+ \end{document}
+
+If `datatool-regions` is correctly installed, the result will be:
+
+ > Currency: £12,345.67.
+ > −£6,172.84. Data type: currency. Numeric value: -6172.835.
+
+In most cases the language and region are not inter-connected.
+This means that you would get the same result (in terms of the
+formatting and parsing of the numbers and currency) for the above with
+`locales={cy-GB}`, `locales={gd-GB}`, `locales={ga-GB}`,
+`locales={sco-GB}`, or simply `locales={GB}`.
+
+The source code is on GitHub at
+[github.com/nlct/datatool-regions](https://github.com/nlct/datatool-regions).
+If you want to add new region files, you can use the Perl script
+`src/createregion.pl` in the GitHub repository. It's an
+interactive command line script that doesn't take any arguments
+and will create a region ldf file based on your responses.
+You can then add the new ldf via a pull request.
+
+See also:
+
+ - [`datatool-english` (GitHub)](https://github.com/nlct/datatool-english)
+ - [Localisation with datatool v3.0+](https://www.dickimaw-books.com/latex/tracklang/datatool-locale.shtml)
+
+This material is subject to the LaTeX Project Public License.
+See http://www.ctan.org/license/lppl1.3 for the details of that license.
Property changes on: trunk/Master/texmf-dist/doc/latex/datatool-regions/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/datatool-regions/datatool-regions.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/datatool-regions/datatool-regions.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/datatool-regions/datatool-regions.pdf 2025-03-02 21:34:35 UTC (rev 74392)
+++ trunk/Master/texmf-dist/doc/latex/datatool-regions/datatool-regions.pdf 2025-03-02 21:37:12 UTC (rev 74393)
Property changes on: trunk/Master/texmf-dist/doc/latex/datatool-regions/datatool-regions.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/datatool-regions/datatool-regions.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/datatool-regions/datatool-regions.dtx (rev 0)
+++ trunk/Master/texmf-dist/source/latex/datatool-regions/datatool-regions.dtx 2025-03-02 21:37:12 UTC (rev 74393)
@@ -0,0 +1,9908 @@
+%\iffalse
+% datatool-regions.dtx generated using makedtx version 1.2 (c) Nicola Talbot
+% Command line args:
+% -author "Nicola Talbot"
+% -src "(datatool-[A-Z]{2}\.ldf)\Z=>\1"
+% -doc "datatool-regions.tex"
+% -section "chapter"
+% datatool-regions
+% Created on 2025/3/1 23:13
+%\fi
+%\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) 2025 Nicola Talbot, all rights reserved.
+% \fi
+% \iffalse
+%<*driver>
+% arara: lualatex
+% arara: makeindex
+% arara: lualatex
+\listfiles
+\documentclass[titlepage=false]{scrreport}
+\usepackage{doc}
+
+\usepackage{fontspec}
+\usepackage{tcolorbox}
+\usepackage{siunitx}
+\usepackage[left=2.5cm,right=2.5cm]{geometry}
+
+\usepackage
+ [
+ locales=
+ {
+ en-AU,
+ en-BE,
+ en-CA,
+ en-FK,
+ en-GB,
+ en-GG,
+ en-GI,
+ en-IE,
+ en-IM,
+ en-JE,
+ en-NZ,
+ en-US,
+ en-ZA
+ },
+ verbose
+ ]
+ {datatool-base}
+
+\setromanfont{Noto Serif}
+\setsansfont{Noto Sans}
+\setmonofont{Noto Sans Mono}
+
+\CheckSum{0}
+
+\newcommand*{\sty}[1]{\textsf{#1}}
+\newcommand*{\file}[1]{\texorpdfstring{\nolinkurl{#1}}{#1}}
+\newcommand*{\ldf}[1]{\file{datatool-#1.ldf}}
+\newcommand*{\csmeta}[3]{\texttt{\cs{#1}}\meta{#2}\texttt{#3}}
+\newcommand*{\filemeta}[3]{%
+ \texorpdfstring
+ {\nolinkurl{#1}\meta{#2}\nolinkurl{#3}}%
+ {#1<#2>#3}%
+}
+\newcommand*{\filemetameta}[5]{%
+ \texorpdfstring
+ {\nolinkurl{#1}\meta{#2}\nolinkurl{#3}\meta{#4}\nolinkurl{#5}}%
+ {#1<#2>#3<#4>#5}%
+}
+\newcommand*{\opt}[1]{\textsf{#1}}
+\newcommand*{\qt}[1]{“#1”}
+\newcommand*{\setbaseopt}[1]{%
+ \cs{DTLsetup}\allowbreak
+ \texttt{\brackets{\allowbreak#1}}%
+}
+\newcommand*{\setlocaleopts}[1]{%
+ \cs{DTLsetLocaleOptions}\allowbreak
+ \texttt{\brackets{\strong{#1}}}\allowbreak
+ \marg{key=val list}%
+}
+
+\newcommand*{\setlocaleopt}[2]{%
+ \cs{DTLsetLocaleOptions}\allowbreak
+ \texttt{\brackets{#1}\allowbreak\brackets{\allowbreak#2}}%
+}
+
+\definecolor{defbackground}{rgb}{1,1,0.75}
+\newtcolorbox{definition}{colback=defbackground}
+\newtcolorbox{important}{colback=red!5!white,colframe=red}
+
+\tcbuselibrary{documentation}
+\tcbset{verbatim ignore percent}
+
+\RecordChanges
+\PageIndex
+
+\appto\MacroFont{\footnotesize}
+
+\title{Region (Numeric) Support for \sty{datatool} v3.0+ Package}
+\author{Nicola L. C. Talbot}
+\date{2025-03-01 version 1.0}
+
+\begin{document}
+\DocInput{datatool-regions.dtx}
+\end{document}
+%</driver>
+%\fi
+%\maketitle
+%
+%\begin{abstract}
+%This is the region (numeric) support for the \sty{datatool} package (version
+%3.0+). The supplied \file{ldf} files need to be installed in
+%addition to \sty{datatool}. To ensure language support, you will
+%also need to install the applicable language module (for example,
+%\sty{datatool-english}).
+%\end{abstract}
+%
+%\tableofcontents
+%
+%\chapter{Introduction}
+%\label{sec:intro}
+%
+%This bundle provides language-independent region support files for
+%\sty{datatool} v3.0+. The files simply need to be installed on \TeX's path.
+%(They will be ignored if a pre-3.0 version of \sty{datatool} is installed.)
+%The \sty{datatool-base} package (which is automatically loaded by
+%\sty{datatool}) uses \sty{tracklang}'s interface for detecting
+%localisation settings and finding the appropriate files.
+%If you use \sty{babel} or \sty{polyglossia}, make sure that you
+%specify the document dialects before the first package to load
+%\sty{tracklang}.
+%
+%\begin{important}
+%If the chosen document language does not have an associated region,
+%no region support will be provided.
+%\end{important}
+%
+%For example:
+%\begin{dispListing}
+%\usepackage[british]{babel}
+%\usepackage{datatool-base}
+%\end{dispListing}
+%In this case, \opt{british} is associated with region \qt{GB} so
+%\sty{datatool-base} will load \file{datatool-GB.ldf} if it's on
+%\TeX's path.
+%
+%Alternatively, if you are not using a language package, simply use
+%the \opt{locales} option. For example:
+%\begin{dispListing}
+%\usepackage[locales={en-GB}]{datatool-base}
+%\end{dispListing}
+%
+%The \sty{tracklang} interface doesn't allow the language to be
+%omitted, but \sty{datatool-base}'s \opt{locales} option will
+%check for any item in the list that simply consists of two uppercase
+%letters. If found, the region will be added to any tracked dialects
+%that don't have a region set. If no dialects have been tracked,
+%the region will be tracked with the language set to
+%\opt{und} (undetermined). For example:
+%\begin{dispListing}
+%\documentclass{article}
+%\usepackage[locales={GB}]{datatool-base}
+%\end{dispListing}
+%This is equivalent to:
+%\begin{dispListing}
+%\usepackage[locales={und-GB}]{datatool-base}
+%\end{dispListing}
+%(since no language has been specified). Whereas
+%\begin{dispListing}
+%\usepackage[afrikaans,english]{babel}
+%\usepackage[locales={ZA}]{datatool-base}
+%\end{dispListing}
+%will add the region \opt{ZA} to \opt{afrikaans} and \opt{english}
+%dialects.
+%
+%If the language already has a region, or if there are multiple
+%regions for a particular language, then you will need to
+%include the language in the tag. For example:
+%\begin{dispListing}
+%\usepackage[locales={en-GB,en-IE}]{datatool-base}
+%\end{dispListing}
+%
+%\begin{important}
+%Bear in mind that if \sty{tracklang} can't determine the
+%applicable dialect label for the captions hook, the settings may not
+%be applied when the language changes in multilingual documents.
+%In this case, you can either load \sty{tracklang} before
+%\sty{datatool-base} and set up the appropriate mappings or
+%just add the applicable \texttt{\cs{DTL}\meta{tag}{LocaleHook}}
+%command to the relevant captions hook.
+%\end{important}
+%
+%Any option that can be passed to \sty{datatool-base} can also be
+%passed to \sty{datatool} but if \sty{datatool-base} has already been
+%loaded, it will be too late to use the \opt{locales} option.
+%For example:
+%\begin{dispListing}
+%\usepackage[locales={en-GB}]{datatool}
+%\end{dispListing}
+%But not:
+%\begin{dispListing*}{title={Incorrect!},colframe=red}
+%\usepackage{datatool-base}
+%\usepackage[locales={en-GB}]{datatool}
+%\end{dispListing*}
+%
+%If another package that also loads \sty{tracklang} is loaded first,
+%then \sty{datatool-base} can pick up the settings from that. For
+%example:
+%\begin{dispListing}
+%\usepackage[en-GB]{datetime2}
+%\usepackage{datatool}
+%\end{dispListing}
+%
+%Supplementary packages provided with \sty{datatool} can also have
+%the locales provided. For example:
+%\begin{dispListing}
+%\usepackage[locales={en-GB}]{datagidx}
+%\end{dispListing}
+%As with \sty{datatool}, these supplementary packages internally load
+%\sty{datatool-base} so if that has already been loaded, then the
+%localisation support should already have been set.
+%
+%\section{Non-Region Specific Settings}
+%
+%Some settings are not specific to regions, such as
+%\opt{currency-symbol-style}. These should be set in \cs{DTLsetup}.
+%All settings relating to numbers and currency are set within the
+%\opt{numeric} option and all settings relating to dates and times
+%are set within the \opt{datetime} option. These settings are
+%described in the \sty{datatool} user guide.
+%
+%For example:
+%\begin{dispListing}
+%\DTLsetup{
+% numeric = {
+% region-currency-prefix = smallcaps ,
+% currency-symbol-style = symbol
+% },
+% datetime = {
+% parse = auto-reformat
+% }
+%}
+%\end{dispListing}
+%
+%Note that scientific notation isn't governed by regional styles, but
+%the value can be encapsulated with \cs{si} (if
+%\sty{siunitx} has been loaded) with the \opt{auto-reformat} numeric option.
+%\begin{dispExample}
+%\DTLsetup{numeric={auto-reformat}}
+%\DTLparse{\result}{1.5e+3}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%\end{dispExample}
+%
+%\chapter{Supported Regions}
+%
+%Only a limited number of regions are currently supported.
+%
+%\section{Region \qt{AU}}
+%\DTLenLocaleHook
+%\DTLAULocaleHook
+%
+%The \file{datatool-AU.ldf} file provides support for region \qt{AU}
+%(Australia). This defines the \qt{AUD} currency and sets it as
+%the default currency. The default number group character is a
+%comma, and the default decimal character is a dot.
+%
+%If there's no caption hook and you have multiple locales, you will
+%need to set both the language and region hooks. For example, this
+%document has:
+%\begin{dispListing}
+%\DTLenLocaleHook
+%\DTLAULocaleHook
+%\end{dispListing}
+%
+%\begin{dispExample*}{title={Default Numeric Styles}}
+%\DTLdecimaltolocale{12345}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLdecimaltolocale{12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLdecimaltocurrency{-12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLmul\result{\result}{0.5}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%\end{dispExample*}
+%Remember that date-time parsing needs to be enabled, if required.
+%\begin{dispExample*}{title={Default Date-Time Styles}}
+%\DTLsetup{datetime={parse}}
+%\DTLparse\result{28/2/2025 15:45 AEDT}
+%String: \result.
+%Data type: \DTLgetDataTypeName{\DTLdatumtype{\result}}.
+%Numeric value: \DTLdatumvalue{\result}.
+%
+%\ExplSyntaxOn
+%\datatool_extract_timestamp:NN \result \l_tmpa_tl
+%Time-stamp: ~ \l_tmpa_tl
+%\ExplSyntaxOff
+%\end{dispExample*}
+%
+%
+%Options may be set with \setlocaleopts{AU}. Available options are
+%listed below.
+%
+%\begin{docKey}[AU]{currency-symbol-prefix}{=\meta{boolean}}{initially \opt{false}}
+%If true, shows the region prefix before the currency symbol if
+%the \opt{numeric} setting \opt{currency-symbol-style} is not set to \qt{iso}.
+%The prefix font may be changed to smallcaps or smaller with
+%\setbaseopt{ numeric = \brackets{ region-currency-prefix = \meta{value} } }
+%where \meta{value} is \opt{smallcaps} or \opt{smaller}.
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{numeric={region-currency-prefix=smallcaps}}
+%\DTLsetLocaleOptions{AU}{currency-symbol-prefix}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%
+%\begin{docKey}[AU]{currency-symbol-position}{=\meta{value}}{initially \opt{before}}
+%Adjusts the formatting currency style. If \docValue{before}, the
+%currency symbol is placed before the value. If \docValue{after}, the
+%currency symbol is placed after the value.
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{numeric={currency-symbol-style=iso}}
+%\DTLsetLocaleOptions{AU}{currency-symbol-position=after}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%\begin{docKey}[AU]{currency-symbol-sep}{=\meta{value}}{initially \opt{none}}
+%Sets the separator to use between the currency symbol (not code) and the value.
+%Permitted values: \docValue{none} (no space), \docValue{thin-space}
+%(a thin space), \docValue{space} (a normal space), or
+%\docValue{nbsp} (a non-breaking space).
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetLocaleOptions{AU}{currency-symbol-sep=thin-space}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%\begin{docKey}[AU]{number-style}{=\meta{setting}}{initially \opt{official}}
+%Sets the number group and decimal characters. The value may be one
+%of: \docValue{official} (comma number group and decimal point), or
+%\docValue{unofficial} (thin space number group and decimal point).
+%In the case of \docValue{unofficial}, a normal space may also be used
+%when parsing.
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{numeric={auto-reformat}}
+%\DTLsetLocaleOptions{AU}{number-style=unofficial}
+%\DTLdecimaltocurrency{12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLparse{\result}{\$12 345.678}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%\end{dispExample}
+%
+%The remaining options relate to dates and times, which are still
+%experimental. You need to enable date and time parsing with
+%\setbaseopt{ datetime = \brackets{parse} }.
+%
+%\begin{docKey}[AU]{date-style}{=\meta{style}}{initially \opt{mdyyyy}}
+%Sets the current date style. The value may be one of:
+%\docValue{dmyyyy} (day month year), \docValue{mdyyyy} (month day year),
+%\docValue{yyyymd} (year month day),
+%\docValue{dmyy} (day month 2-digit year),
+%\docValue{mdyy} (month day 2-digit year), or
+%\docValue{yymd} (2-digit year month day).
+%\end{docKey}
+%
+%\begin{docKey}[AU]{date-variant}{=\meta{style}}{initially \opt{slash}}
+%Sets the current numeric date separator.
+%Allowed values: \docValue{slash} (\code{/}), \docValue{hyphen}
+%(\code{-}), \docValue{dot} (\code{.}) or
+%\docValue{dialect} (if the language supports it).
+%\end{docKey}
+%
+%\begin{docKey}[AU]{time-variant}{=\meta{style}}{initially \opt{colon}}
+%Sets the current numeric time separator.
+%Allowed values: \docValue{colon} (\code{:}), \docValue{dot} (\code{.}) or
+%\docValue{dialect} (if the language supports it),
+%\docValue{dialect-colon} (if the language supports it), or
+%\docValue{dialect-dot} (if the language supports it).
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{datetime={parse}}
+%\DTLsetLocaleOptions{AU}{
+% date-style=mdyyyy,
+% date-variant = dialect,
+% time-variant = dot
+%}
+%\DTLparse\result{February 28, 2025 3.45pm AEDT}
+%String: \result.
+%Data type: \DTLgetDataTypeName{\DTLdatumtype{\result}}.
+%Numeric value: \DTLdatumvalue{\result}.
+%
+%\ExplSyntaxOn
+%\datatool_extract_timestamp:NN \result \l_tmpa_tl
+%Time-stamp: ~ \l_tmpa_tl
+%\ExplSyntaxOff
+%\end{dispExample}
+%
+%\begin{docCommand}{datatoolAUSetNumberChars}{}
+%Hook to switch to AU number group and decimal characters.
+%\end{docCommand}
+%
+%\begin{docCommand}{datatoolAUcurrencyfmt}{}
+%Used to format the AUD currency. This supports the currency symbol
+%prefix.
+%\end{docCommand}
+%
+%\begin{docCommand}{DTLAULocaleHook}{}
+%Hook to switch to AU settings. This may be added to the captions
+%hook by \sty{datatool-base}, depending on the settings. Otherwise
+%it can be explicitly used to switch to this region.
+%\end{docCommand}
+%
+%\section{Region \qt{BE}}
+%\DTLenLocaleHook
+%\DTLBELocaleHook
+%
+%The \file{datatool-BE.ldf} file provides support for region \qt{BE}
+%(Belgium). This sets \qt{EUR} as the default currency, but number
+%formatting depends on the language. If no command called
+%\csmeta{datatool}{lang}{BESetNumberChars} is defined (the applicable
+%language module would need to provide
+%\filemeta{datatool-}{lang}{-BE.ldf} that defines this), this will default to a dot
+%number group separator and a decimal comma.
+%
+%For example, a French module would need to include the file
+%\file{datatool-fr-BE.ldf} which defines
+%\cs{datatoolfrBESetNumberChars}.
+%(You can use \file{datatool-en-ZA.ldf} provided with
+%\sty{datatool-english} as an example.)
+%
+%If there's no caption hook and you have multiple locales, you will
+%need to set the region hook. For example, this document has:
+%\begin{dispListing}
+%\DTLBELocaleHook
+%\end{dispListing}
+%
+%\begin{dispExample*}{title={Default Styles}}
+%\DTLdecimaltolocale{12345}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLdecimaltolocale{12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLdecimaltocurrency{-12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLmul\result{\result}{0,5}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%\end{dispExample*}
+%Remember that date-time parsing needs to be enabled, if required.
+%\begin{dispExample*}{title={Default Date-Time Styles}}
+%\DTLsetup{datetime={parse}}
+%\DTLparse\result{28.02.2025 15:45 CET}
+%String: \result.
+%Data type: \DTLgetDataTypeName{\DTLdatumtype{\result}}.
+%Numeric value: \DTLdatumvalue{\result}.
+%
+%\ExplSyntaxOn
+%\datatool_extract_timestamp:NN \result \l_tmpa_tl
+%Time-stamp: ~ \l_tmpa_tl
+%\ExplSyntaxOff
+%\end{dispExample*}
+%
+%Options may be set with \setlocaleopts{BE}. Available options are
+%listed below.
+%
+%\begin{docKey}[BE]{currency-symbol-position}{=\meta{value}}{initially \opt{after}}
+%Adjusts the formatting currency style. If \docValue{before}, the
+%currency symbol is placed before the value. If \docValue{after}, the
+%currency symbol is placed after the value.
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{numeric={currency-symbol-style=iso}}
+%\DTLsetLocaleOptions{BE}{currency-symbol-position=before}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%\begin{docKey}[BE]{currency-symbol-sep}{=\meta{value}}{initially \opt{none}}
+%Sets the separator to use between the currency symbol (not code) and the value.
+%Permitted values: \docValue{none} (no space), \docValue{thin-space}
+%(a thin space), \docValue{space} (a normal space), or
+%\docValue{nbsp} (a non-breaking space).
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetLocaleOptions{BE}{currency-symbol-sep=thin-space}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%\begin{docKey}[BE]{number-style}{=\meta{style}}{initially \opt{dialect}}
+%Sets the number group and decimal characters. The value may be one
+%of: \docValue{default} (dot number group and decimal comma),
+%\docValue{dialect} (attempt to use the number style for
+%the module \meta{lang}-BE, if it's defined, where \meta{lang} is the
+%current language tag, or fallback on \docValue{default}), or
+%\docValue{thinspace} (thin space number group and decimal point).
+%In the case of \docValue{thinspace}, a normal space may also be used
+%when parsing.
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetLocaleOptions{BE}{number-style=thinspace}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%The remaining options relate to dates and times, which are still
+%experimental. You need to enable date and time parsing with
+%\setbaseopt{ datetime = \brackets{parse} }.
+%
+%\begin{docKey}[BE]{date-style}{=\meta{style}}{initially \opt{dmyyyy}}
+%Sets the current date style. The value may be one of:
+%\docValue{dmyyyy} (day month year), \docValue{mdyyyy} (month day year),
+%\docValue{yyyymd} (year month day),
+%\docValue{dmyy} (day month 2-digit year),
+%\docValue{mdyy} (month day 2-digit year), or
+%\docValue{yymd} (2-digit year month day).
+%\end{docKey}
+%
+%\begin{docKey}[BE]{date-variant}{=\meta{style}}{initially \opt{dot}}
+%Sets the current numeric date separator.
+%Allowed values: \docValue{slash} (\code{/}), \docValue{hyphen}
+%(\code{-}), \docValue{dot} (\code{.}) or
+%\docValue{dialect} (if the language supports it).
+%\end{docKey}
+%
+%\begin{docKey}[BE]{time-variant}{=\meta{style}}{initially \opt{colon}}
+%Sets the current numeric time separator.
+%Allowed values: \docValue{colon} (\code{:}), \docValue{dot} (\code{.}) or
+%\docValue{dialect} (if the language supports it),
+%\docValue{dialect-colon} (if the language supports it), or
+%\docValue{dialect-dot} (if the language supports it).
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{datetime={parse}}
+%\DTLsetLocaleOptions{BE}{
+% date-style=yyyymd,
+% date-variant = hyphen
+%}
+%\DTLparse\result{2025-06-01 15:45 CEST}
+%String: \result.
+%Data type: \DTLgetDataTypeName{\DTLdatumtype{\result}}.
+%Numeric value: \DTLdatumvalue{\result}.
+%
+%\ExplSyntaxOn
+%\datatool_extract_timestamp:NN \result \l_tmpa_tl
+%Time-stamp: ~ \l_tmpa_tl
+%\ExplSyntaxOff
+%\end{dispExample}
+%\begin{docCommand}{datatoolBESetNumberChars}{}
+%Hook to switch to BE number group and decimal characters.
+%\end{docCommand}
+%
+%\begin{docCommand}{datatoolBESetCurrency}{}
+%Hook to switch to the EUR currency, rounding to 2 decimal places,
+%and redefines \cs{DTLdefaultEURcurrencyfmt} to reflect the
+%\opt{currency-symbol-position} setting.
+%\end{docCommand}
+%
+%\begin{docCommand}{DTLBELocaleHook}{}
+%Hook to switch to BE settings. This may be added to the captions
+%hook by \sty{datatool-base}, depending on the settings. Otherwise
+%it can be explicitly used to switch to this region.
+%\end{docCommand}
+%
+%\section{Region \qt{CA}}
+%\DTLenLocaleHook
+%\DTLenCALocaleHook
+%\DTLCALocaleHook
+%
+%The \file{datatool-CA.ldf} file provides support for region \qt{CA}
+%(Canada). This supplies the currency (CAD) but number formatting
+%depends on the language, so this requires specific language \&
+%region files, which should be provided by the applicable language
+%module. For example, \sty{datatool-english} provides
+%\file{datatool-en-CA.ldf}.
+%
+%If there's no caption hook and you have multiple locales, you will
+%need to set both the language and region hooks. For example, this
+%document has:
+%\begin{dispListing}
+%\DTLenLocaleHook
+%\DTLenCALocaleHook
+%\DTLCALocaleHook
+%\end{dispListing}
+%
+%\begin{dispExample*}{title={Default Numeric Styles (with English)}}
+%\DTLdecimaltolocale{12345}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLdecimaltolocale{12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLdecimaltocurrency{-12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLmul\result{\result}{0.5}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%\end{dispExample*}
+%Remember that date-time parsing needs to be enabled, if required.
+%\begin{dispExample*}{title={Default Date-Time Styles}}
+%\DTLsetup{datetime={parse}}
+%\DTLparse\result{28/2/2025 15:45 PST}
+%String: \result.
+%Data type: \DTLgetDataTypeName{\DTLdatumtype{\result}}.
+%Numeric value: \DTLdatumvalue{\result}.
+%
+%\ExplSyntaxOn
+%\datatool_extract_timestamp:NN \result \l_tmpa_tl
+%Time-stamp: ~ \l_tmpa_tl
+%\ExplSyntaxOff
+%\end{dispExample*}
+%
+%
+%Options may be set with \setlocaleopts{CA}. Available options are
+%listed below.
+%
+%\begin{docKey}[CA]{currency-symbol-prefix}{=\meta{boolean}}{initially \opt{false}}
+%If true, shows the region prefix before the currency symbol if
+%the \opt{numeric} setting \opt{currency-symbol-style} is not set to \qt{iso}.
+%The prefix font may be changed to smallcaps or smaller with
+%the base \opt{numeric} option \opt{region-currency-prefix} setting.
+%\end{docKey}
+%
+%For example:
+%\begin{dispExample}
+%\DTLsetup{numeric={region-currency-prefix=smallcaps}}
+%\DTLsetLocaleOptions{CA}{currency-symbol-prefix}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%\begin{docKey}[CA]{currency-symbol-position}{=\meta{value}}{initially \opt{before}}
+%Adjusts the formatting currency style. If \docValue{before}, the
+%currency symbol is placed before the value. If \docValue{after}, the
+%currency symbol is placed after the value.
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{numeric={currency-symbol-style=iso}}
+%\DTLsetLocaleOptions{CA}{currency-symbol-position=after}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%\begin{docKey}[CA]{currency-symbol-sep}{=\meta{value}}{initially \opt{none}}
+%Sets the separator to use between the currency symbol (not code) and the value.
+%Permitted values: \docValue{none} (no space), \docValue{thin-space}
+%(a thin space), \docValue{space} (a normal space), or
+%\docValue{nbsp} (a non-breaking space).
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetLocaleOptions{CA}{currency-symbol-sep=thin-space}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%\begin{docKey}[CA]{number-style}{=\meta{style}}{}
+%This option will attempt to set \opt{number-style}=\meta{style} for
+%the module \meta{lang}-CA, if it's defined. Where \meta{lang} is the
+%current language tag. For example, if the current language tag is
+%\qt{en}, then this will be equivalent to
+%\setlocaleopt{en-CA}{number-style=\meta{style}}.
+%\end{docKey}
+%
+%For example, if \ldf{en-CA} has been loaded and the current locale
+%is en-GB:
+%\begin{dispExample}
+%\DTLsetLocaleOptions{CA}{number-style=unofficial}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%The remaining options relate to dates and times, which are still
+%experimental. You need to enable date and time parsing with
+%\setbaseopt{ datetime = \brackets{parse} }.
+%
+%\begin{docKey}[CA]{date-style}{=\meta{style}}{initially \opt{yyyymd}}
+%Sets the current date style. The value may be one of:
+%\docValue{dmyyyy} (day month year), \docValue{mdyyyy} (month day year),
+%\docValue{yyyymd} (year month day),
+%\docValue{dmyy} (day month 2-digit year),
+%\docValue{mdyy} (month day 2-digit year), or
+%\docValue{yymd} (2-digit year month day).
+%\end{docKey}
+%
+%\begin{docKey}[CA]{date-variant}{=\meta{style}}{initially \opt{hyphen}}
+%Sets the current numeric date separator.
+%Allowed values: \docValue{slash} (\code{/}), \docValue{hyphen}
+%(\code{-}), \docValue{dot} (\code{.}) or
+%\docValue{dialect} (if the language supports it).
+%\end{docKey}
+%
+%\begin{docKey}[CA]{time-variant}{=\meta{style}}{initially \opt{colon}}
+%Sets the current numeric time separator.
+%Allowed values: \docValue{colon} (\code{:}), \docValue{dot} (\code{.}) or
+%\docValue{dialect} (if the language supports it),
+%\docValue{dialect-colon} (if the language supports it), or
+%\docValue{dialect-dot} (if the language supports it).
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{datetime={parse}}
+%\DTLsetLocaleOptions{CA}{
+% date-style=dmyyyy,
+% date-variant = dialect,
+% time-variant = dot
+%}
+%\DTLparse\result{Fri 28th Feb 2025 3.45pm PST}
+%String: \result.
+%Data type: \DTLgetDataTypeName{\DTLdatumtype{\result}}.
+%Numeric value: \DTLdatumvalue{\result}.
+%
+%\ExplSyntaxOn
+%\datatool_extract_timestamp:NN \result \l_tmpa_tl
+%Time-stamp: ~ \l_tmpa_tl
+%\ExplSyntaxOff
+%\end{dispExample}
+%
+%\begin{docCommand}{datatoolCASetNumberChars}{}
+%Hook to switch to CA number group and decimal characters but
+%requires language support to be enabled as well otherwise it will
+%simply trigger a warning.
+%\end{docCommand}
+%
+%\begin{docCommand}{datatoolCAcurrencyfmt}{}
+%Used to format the CAD currency. This supports the currency symbol
+%prefix.
+%\end{docCommand}
+%
+%\begin{docCommand}{DTLCALocaleHook}{}
+%Hook to switch to CA settings. This may be added to the captions
+%hook by \sty{datatool-base}, depending on the settings. Otherwise
+%it can be explicitly used to switch to this region.
+%\end{docCommand}
+%
+%\section{Region \qt{FK}}
+%\DTLenLocaleHook
+%\DTLFKLocaleHook
+%
+%The \file{datatool-FK.ldf} file provides support for region \qt{FK}
+%(Falkland Islands). This defines the \qt{FKP} currency and sets it as
+%the default currency. The default number group character is a
+%comma, and the default decimal character is a dot.
+%
+%If there's no caption hook and you have multiple locales, you will
+%need to set both the language and region hooks. For example, this
+%document has:
+%\begin{dispListing}
+%\DTLenLocaleHook
+%\DTLFKLocaleHook
+%\end{dispListing}
+%
+%\begin{dispExample*}{title={Default Numeric Styles}}
+%\DTLdecimaltolocale{12345}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLdecimaltolocale{12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLdecimaltocurrency{-12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLmul\result{\result}{0.5}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%\end{dispExample*}
+%Remember that date-time parsing needs to be enabled, if required.
+%\begin{dispExample*}{title={Default Date-Time Styles}}
+%\DTLsetup{datetime={parse}}
+%\DTLparse\result{28/2/2025 15:45 PST}
+%String: \result.
+%Data type: \DTLgetDataTypeName{\DTLdatumtype{\result}}.
+%Numeric value: \DTLdatumvalue{\result}.
+%
+%\ExplSyntaxOn
+%\datatool_extract_timestamp:NN \result \l_tmpa_tl
+%Time-stamp: ~ \l_tmpa_tl
+%\ExplSyntaxOff
+%\end{dispExample*}
+%
+%Options may be set with \setlocaleopts{FK}. Available options are
+%listed below.
+%
+%\begin{docKey}[FK]{currency-symbol-prefix}{=\meta{boolean}}{initially \opt{false}}
+%If true, shows the region prefix before the currency symbol if
+%the \opt{numeric} setting \opt{currency-symbol-style} is not set to \qt{iso}.
+%The prefix font may be changed to smallcaps or smaller with
+%\setbaseopt{ numeric = \brackets{ region-currency-prefix = \meta{value} } }
+%where \meta{value} is \opt{smallcaps} or \opt{smaller}.
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{numeric={region-currency-prefix=smallcaps}}
+%\DTLsetLocaleOptions{FK}{currency-symbol-prefix}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%
+%\begin{docKey}[FK]{currency-symbol-position}{=\meta{value}}{initially \opt{before}}
+%Adjusts the formatting currency style. If \docValue{before}, the
+%currency symbol is placed before the value. If \docValue{after}, the
+%currency symbol is placed after the value.
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{numeric={currency-symbol-style=iso}}
+%\DTLsetLocaleOptions{FK}{currency-symbol-position=after}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%\begin{docKey}[FK]{currency-symbol-sep}{=\meta{value}}{initially \opt{none}}
+%Sets the separator to use between the currency symbol (not code) and the value.
+%Permitted values: \docValue{none} (no space), \docValue{thin-space}
+%(a thin space), \docValue{space} (a normal space), or
+%\docValue{nbsp} (a non-breaking space).
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetLocaleOptions{FK}{currency-symbol-sep=thin-space}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%\begin{docKey}[FK]{number-style}{=\meta{setting}}{initially \opt{official}}
+%Sets the number group and decimal characters. The value may be one
+%of: \docValue{official} (comma number group and decimal point) or
+%\docValue{unofficial} (thin space number group and decimal point).
+%In the case of \docValue{unofficial}, a normal space may also be used
+%when parsing.
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{numeric={auto-reformat}}
+%\DTLsetLocaleOptions{FK}{number-style=unofficial}
+%\DTLdecimaltocurrency{12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLparse{\result}{£12 345.678}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%\end{dispExample}
+%
+%The remaining options relate to dates and times, which are still
+%experimental. You need to enable date and time parsing with
+%\setbaseopt{ datetime = \brackets{parse} }.
+%
+%\begin{docKey}[FK]{date-style}{=\meta{style}}{initially \opt{dmyyyy}}
+%Sets the current date style. The value may be one of:
+%\docValue{dmyyyy} (day month year), \docValue{mdyyyy} (month day year),
+%\docValue{yyyymd} (year month day),
+%\docValue{dmyy} (day month 2-digit year),
+%\docValue{mdyy} (month day 2-digit year), or
+%\docValue{yymd} (2-digit year month day).
+%\end{docKey}
+%
+%\begin{docKey}[FK]{date-variant}{=\meta{style}}{initially \opt{slash}}
+%Sets the current numeric date separator.
+%Allowed values: \docValue{slash} (\code{/}), \docValue{hyphen}
+%(\code{-}), \docValue{dot} (\code{.}) or
+%\docValue{dialect} (if the language supports it).
+%\end{docKey}
+%
+%\begin{docKey}[FK]{time-variant}{=\meta{style}}{initially \opt{colon}}
+%Sets the current numeric time separator.
+%Allowed values: \docValue{colon} (\code{:}), \docValue{dot} (\code{.}) or
+%\docValue{dialect} (if the language supports it),
+%\docValue{dialect-colon} (if the language supports it), or
+%\docValue{dialect-dot} (if the language supports it).
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{datetime={parse}}
+%\DTLsetLocaleOptions{FK}{
+% date-style=dmyyyy,
+% date-variant = dialect,
+% time-variant = dot
+%}
+%\DTLparse\result{Fri 28th Feb 2025 3.45pm FKST}
+%String: \result.
+%Data type: \DTLgetDataTypeName{\DTLdatumtype{\result}}.
+%Numeric value: \DTLdatumvalue{\result}.
+%
+%\ExplSyntaxOn
+%\datatool_extract_timestamp:NN \result \l_tmpa_tl
+%Time-stamp: ~ \l_tmpa_tl
+%\ExplSyntaxOff
+%\end{dispExample}
+%
+%\begin{docCommand}{datatoolFKSetNumberChars}{}
+%Hook to switch to FK number group and decimal characters.
+%\end{docCommand}
+%
+%\begin{docCommand}{datatoolFKcurrencyfmt}{}
+%Used to format the FKP currency. This supports the currency symbol
+%prefix.
+%\end{docCommand}
+%
+%\begin{docCommand}{DTLFKLocaleHook}{}
+%Hook to switch to FK settings. This may be added to the captions
+%hook by \sty{datatool-base}, depending on the settings. Otherwise
+%it can be explicitly used to switch to this region.
+%\end{docCommand}
+%
+%\section{Region \qt{GB}}
+%\DTLenLocaleHook
+%\DTLGBLocaleHook
+%
+%The \file{datatool-GB.ldf} file provides support for region \qt{GB}
+%(United Kingdom). This defines the \qt{GBP} currency and sets it as
+%the default currency. The default number group character is a
+%comma, and the default decimal character is a dot.
+%
+%If there's no caption hook and you have multiple locales, you will
+%need to set both the language and region hooks. For example, this
+%document has:
+%\begin{dispListing}
+%\DTLenLocaleHook
+%\DTLGBLocaleHook
+%\end{dispListing}
+%
+%\begin{dispExample*}{title={Default Numeric Styles}}
+%\DTLdecimaltolocale{12345}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLdecimaltolocale{12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLdecimaltocurrency{-12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLmul\result{\result}{0.5}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%\end{dispExample*}
+%Remember that date-time parsing needs to be enabled, if required.
+%\begin{dispExample*}{title={Default Date-Time Styles}}
+%\DTLsetup{datetime={parse}}
+%\DTLparse\result{28/2/2025 15:45 GMT}
+%String: \result.
+%Data type: \DTLgetDataTypeName{\DTLdatumtype{\result}}.
+%Numeric value: \DTLdatumvalue{\result}.
+%
+%\ExplSyntaxOn
+%\datatool_extract_timestamp:NN \result \l_tmpa_tl
+%Time-stamp: ~ \l_tmpa_tl
+%\ExplSyntaxOff
+%\end{dispExample*}
+%
+%Options may be set with \setlocaleopts{GB}. Available options are
+%listed below.
+%
+%\begin{docKey}[GB]{currency-symbol-prefix}{=\meta{boolean}}{initially \opt{false}}
+%If true, shows the region prefix before the currency symbol if
+%the \opt{numeric} setting \opt{currency-symbol-style} is not set to \qt{iso}.
+%The prefix font may be changed to smallcaps or smaller with
+%\setbaseopt{ numeric = \brackets{ region-currency-prefix = \meta{value} } }
+%where \meta{value} is \opt{smallcaps} or \opt{smaller}.
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{numeric={region-currency-prefix=smallcaps}}
+%\DTLsetLocaleOptions{GB}{currency-symbol-prefix}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%
+%\begin{docKey}[GB]{currency-symbol-position}{=\meta{value}}{initially \opt{before}}
+%Adjusts the formatting currency style. If \docValue{before}, the
+%currency symbol is placed before the value. If \docValue{after}, the
+%currency symbol is placed after the value.
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{numeric={currency-symbol-style=iso}}
+%\DTLsetLocaleOptions{GB}{currency-symbol-position=after}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%\begin{docKey}[GB]{currency-symbol-sep}{=\meta{value}}{initially \opt{none}}
+%Sets the separator to use between the currency symbol (not code) and the value.
+%Permitted values: \docValue{none} (no space), \docValue{thin-space}
+%(a thin space), \docValue{space} (a normal space), or
+%\docValue{nbsp} (a non-breaking space).
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetLocaleOptions{GB}{currency-symbol-sep=thin-space}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%\begin{docKey}[GB]{number-style}{=\meta{setting}}{initially \opt{official}}
+%Sets the number group and decimal characters. The value may be one
+%of: \docValue{official} (comma number group and decimal point),
+%\docValue{education} (thin space number group and decimal point), or
+%\docValue{old} (comma number group and mid dot decimal).
+%In the case of \docValue{education}, a normal space may also be used
+%when parsing.
+%In the case of \docValue{old}, a normal dot may also be used
+%when parsing.
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{numeric={auto-reformat}}
+%\DTLsetLocaleOptions{GB}{number-style=education}
+%\DTLdecimaltocurrency{12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLparse{\result}{£12 345.678}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLsetLocaleOptions{GB}{number-style=old}
+%\DTLdecimaltocurrency{12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLparse{\result}{£12,345.678}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%\end{dispExample}
+%
+%The remaining options relate to dates and times, which are still
+%experimental. You need to enable date and time parsing with
+%\setbaseopt{ datetime = \brackets{parse} }.
+%
+%\begin{docKey}[GB]{date-style}{=\meta{style}}{initially \opt{dmyyyy}}
+%Sets the current date style. The value may be one of:
+%\docValue{dmyyyy} (day month year), \docValue{mdyyyy} (month day year),
+%\docValue{yyyymd} (year month day),
+%\docValue{dmyy} (day month 2-digit year),
+%\docValue{mdyy} (month day 2-digit year), or
+%\docValue{yymd} (2-digit year month day).
+%\end{docKey}
+%
+%\begin{docKey}[GB]{date-variant}{=\meta{style}}{initially \opt{slash}}
+%Sets the current numeric date separator.
+%Allowed values: \docValue{slash} (\code{/}), \docValue{hyphen}
+%(\code{-}), \docValue{dot} (\code{.}) or
+%\docValue{dialect} (if the language supports it).
+%\end{docKey}
+%
+%\begin{docKey}[GB]{time-variant}{=\meta{style}}{initially \opt{colon}}
+%Sets the current numeric time separator.
+%Allowed values: \docValue{colon} (\code{:}), \docValue{dot} (\code{.}) or
+%\docValue{dialect} (if the language supports it),
+%\docValue{dialect-colon} (if the language supports it), or
+%\docValue{dialect-dot} (if the language supports it).
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{datetime={parse}}
+%\DTLsetLocaleOptions{GB}{
+% date-style=dmyyyy,
+% date-variant = dialect,
+% time-variant = dot
+%}
+%\DTLparse\result{Fri 28th Feb 2025 3.45pm GMT}
+%String: \result.
+%Data type: \DTLgetDataTypeName{\DTLdatumtype{\result}}.
+%Numeric value: \DTLdatumvalue{\result}.
+%
+%\ExplSyntaxOn
+%\datatool_extract_timestamp:NN \result \l_tmpa_tl
+%Time-stamp: ~ \l_tmpa_tl
+%\ExplSyntaxOff
+%\end{dispExample}
+%
+%\begin{docCommand}{datatoolGBSetNumberChars}{}
+%Hook to switch to GB number group and decimal characters.
+%\end{docCommand}
+%
+%\begin{docCommand}{datatoolGBcurrencyfmt}{}
+%Used to format the GBP currency. This supports the currency symbol
+%prefix.
+%\end{docCommand}
+%
+%\begin{docCommand}{DTLGBLocaleHook}{}
+%Hook to switch to GB settings. This may be added to the captions
+%hook by \sty{datatool-base}, depending on the settings. Otherwise
+%it can be explicitly used to switch to this region.
+%\end{docCommand}
+%
+%\section{Region \qt{GG}}
+%\DTLenLocaleHook
+%\DTLGGLocaleHook
+%
+%The \file{datatool-GG.ldf} file provides support for region \qt{GG}
+%(Guernsey). This defines the \qt{GGP} currency and sets it as
+%the default currency. The default number group character is a
+%comma, and the default decimal character is a dot.
+%
+%If there's no caption hook and you have multiple locales, you will
+%need to set both the language and region hooks. For example, this
+%document has:
+%\begin{dispListing}
+%\DTLenLocaleHook
+%\DTLGGLocaleHook
+%\end{dispListing}
+%
+%\begin{dispExample*}{title={Default Numeric Styles}}
+%\DTLdecimaltolocale{12345}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLdecimaltolocale{12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLdecimaltocurrency{-12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLmul\result{\result}{0.5}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%\end{dispExample*}
+%Remember that date-time parsing needs to be enabled, if required.
+%\begin{dispExample*}{title={Default Date-Time Styles}}
+%\DTLsetup{datetime={parse}}
+%\DTLparse\result{28/2/2025 15:45 GMT}
+%String: \result.
+%Data type: \DTLgetDataTypeName{\DTLdatumtype{\result}}.
+%Numeric value: \DTLdatumvalue{\result}.
+%
+%\ExplSyntaxOn
+%\datatool_extract_timestamp:NN \result \l_tmpa_tl
+%Time-stamp: ~ \l_tmpa_tl
+%\ExplSyntaxOff
+%\end{dispExample*}
+%
+%Options may be set with \setlocaleopts{GG}. Available options are
+%listed below.
+%
+%\begin{docKey}[GG]{currency-symbol-prefix}{=\meta{boolean}}{initially \opt{false}}
+%If true, shows the region prefix before the currency symbol if
+%the \opt{numeric} setting \opt{currency-symbol-style} is not set to \qt{iso}.
+%The prefix font may be changed to smallcaps or smaller with
+%\setbaseopt{ numeric = \brackets{ region-currency-prefix = \meta{value} } }
+%where \meta{value} is \opt{smallcaps} or \opt{smaller}.
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{numeric={region-currency-prefix=smallcaps}}
+%\DTLsetLocaleOptions{GG}{currency-symbol-prefix}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%
+%\begin{docKey}[GG]{currency-symbol-position}{=\meta{value}}{initially \opt{before}}
+%Adjusts the formatting currency style. If \docValue{before}, the
+%currency symbol is placed before the value. If \docValue{after}, the
+%currency symbol is placed after the value.
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{numeric={currency-symbol-style=iso}}
+%\DTLsetLocaleOptions{GG}{currency-symbol-position=after}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%\begin{docKey}[GG]{currency-symbol-sep}{=\meta{value}}{initially \opt{none}}
+%Sets the separator to use between the currency symbol (not code) and the value.
+%Permitted values: \docValue{none} (no space), \docValue{thin-space}
+%(a thin space), \docValue{space} (a normal space), or
+%\docValue{nbsp} (a non-breaking space).
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetLocaleOptions{GG}{currency-symbol-sep=thin-space}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%\begin{docKey}[GG]{number-style}{=\meta{setting}}{initially \opt{official}}
+%Sets the number group and decimal characters. The value may be one
+%of: \docValue{official} (comma number group and decimal point) or
+%\docValue{unofficial} (thin space number group and decimal point).
+%In the case of \docValue{unofficial}, a normal space may also be used
+%when parsing.
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{numeric={auto-reformat}}
+%\DTLsetLocaleOptions{GG}{number-style=unofficial}
+%\DTLdecimaltocurrency{12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLparse{\result}{£12 345.678}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%\end{dispExample}
+%
+%The remaining options relate to dates and times, which are still
+%experimental. You need to enable date and time parsing with
+%\setbaseopt{ datetime = \brackets{parse} }.
+%
+%\begin{docKey}[GG]{date-style}{=\meta{style}}{initially \opt{dmyyyy}}
+%Sets the current date style. The value may be one of:
+%\docValue{dmyyyy} (day month year), \docValue{mdyyyy} (month day year),
+%\docValue{yyyymd} (year month day),
+%\docValue{dmyy} (day month 2-digit year),
+%\docValue{mdyy} (month day 2-digit year), or
+%\docValue{yymd} (2-digit year month day).
+%\end{docKey}
+%
+%\begin{docKey}[GG]{date-variant}{=\meta{style}}{initially \opt{slash}}
+%Sets the current numeric date separator.
+%Allowed values: \docValue{slash} (\code{/}), \docValue{hyphen}
+%(\code{-}), \docValue{dot} (\code{.}) or
+%\docValue{dialect} (if the language supports it).
+%\end{docKey}
+%
+%\begin{docKey}[GG]{time-variant}{=\meta{style}}{initially \opt{colon}}
+%Sets the current numeric time separator.
+%Allowed values: \docValue{colon} (\code{:}), \docValue{dot} (\code{.}) or
+%\docValue{dialect} (if the language supports it),
+%\docValue{dialect-colon} (if the language supports it), or
+%\docValue{dialect-dot} (if the language supports it).
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{datetime={parse}}
+%\DTLsetLocaleOptions{GG}{
+% date-style=dmyyyy,
+% date-variant = dialect,
+% time-variant = dot
+%}
+%\DTLparse\result{Fri 28th Feb 2025 3.45pm GMT}
+%String: \result.
+%Data type: \DTLgetDataTypeName{\DTLdatumtype{\result}}.
+%Numeric value: \DTLdatumvalue{\result}.
+%
+%\ExplSyntaxOn
+%\datatool_extract_timestamp:NN \result \l_tmpa_tl
+%Time-stamp: ~ \l_tmpa_tl
+%\ExplSyntaxOff
+%\end{dispExample}
+%
+%\begin{docCommand}{datatoolGGSetNumberChars}{}
+%Hook to switch to GG number group and decimal characters.
+%\end{docCommand}
+%
+%\begin{docCommand}{datatoolGGcurrencyfmt}{}
+%Used to format the GGP currency. This supports the currency symbol
+%prefix.
+%\end{docCommand}
+%
+%\begin{docCommand}{DTLGGLocaleHook}{}
+%Hook to switch to GG settings. This may be added to the captions
+%hook by \sty{datatool-base}, depending on the settings. Otherwise
+%it can be explicitly used to switch to this region.
+%\end{docCommand}
+%
+%\section{Region \qt{GI}}
+%\DTLenLocaleHook
+%\DTLGILocaleHook
+%
+%The \file{datatool-GI.ldf} file provides support for region \qt{GI}
+%(Gibraltar). This defines the \qt{GIP} currency and sets it as
+%the default currency. The default number group character is a
+%comma, and the default decimal character is a dot.
+%
+%If there's no caption hook and you have multiple locales, you will
+%need to set both the language and region hooks. For example, this
+%document has:
+%\begin{dispListing}
+%\DTLenLocaleHook
+%\DTLGILocaleHook
+%\end{dispListing}
+%
+%\begin{dispExample*}{title={Default Numeric Styles}}
+%\DTLdecimaltolocale{12345}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLdecimaltolocale{12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLdecimaltocurrency{-12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLmul\result{\result}{0.5}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%\end{dispExample*}
+%Remember that date-time parsing needs to be enabled, if required.
+%\begin{dispExample*}{title={Default Date-Time Styles}}
+%\DTLsetup{datetime={parse}}
+%\DTLparse\result{28/2/2025 15:45 GMT}
+%String: \result.
+%Data type: \DTLgetDataTypeName{\DTLdatumtype{\result}}.
+%Numeric value: \DTLdatumvalue{\result}.
+%
+%\ExplSyntaxOn
+%\datatool_extract_timestamp:NN \result \l_tmpa_tl
+%Time-stamp: ~ \l_tmpa_tl
+%\ExplSyntaxOff
+%\end{dispExample*}
+%
+%Options may be set with \setlocaleopts{GI}. Available options are
+%listed below.
+%
+%\begin{docKey}[GI]{currency-symbol-prefix}{=\meta{boolean}}{initially \opt{false}}
+%If true, shows the region prefix before the currency symbol if
+%the \opt{numeric} setting \opt{currency-symbol-style} is not set to \qt{iso}.
+%The prefix font may be changed to smallcaps or smaller with
+%\setbaseopt{ numeric = \brackets{ region-currency-prefix = \meta{value} } }
+%where \meta{value} is \opt{smallcaps} or \opt{smaller}.
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{numeric={region-currency-prefix=smallcaps}}
+%\DTLsetLocaleOptions{GI}{currency-symbol-prefix}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%
+%\begin{docKey}[GI]{currency-symbol-position}{=\meta{value}}{initially \opt{before}}
+%Adjusts the formatting currency style. If \docValue{before}, the
+%currency symbol is placed before the value. If \docValue{after}, the
+%currency symbol is placed after the value.
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{numeric={currency-symbol-style=iso}}
+%\DTLsetLocaleOptions{GI}{currency-symbol-position=after}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%\begin{docKey}[GI]{currency-symbol-sep}{=\meta{value}}{initially \opt{none}}
+%Sets the separator to use between the currency symbol (not code) and the value.
+%Permitted values: \docValue{none} (no space), \docValue{thin-space}
+%(a thin space), \docValue{space} (a normal space), or
+%\docValue{nbsp} (a non-breaking space).
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetLocaleOptions{GI}{currency-symbol-sep=thin-space}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%\begin{docKey}[GI]{number-style}{=\meta{setting}}{initially \opt{official}}
+%Sets the number group and decimal characters. The value may be one
+%of: \docValue{official} (comma number group and decimal point) or
+%\docValue{unofficial} (thin space number group and decimal point).
+%In the case of \docValue{unofficial}, a normal space may also be used
+%when parsing.
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{numeric={auto-reformat}}
+%\DTLsetLocaleOptions{GI}{number-style=unofficial}
+%\DTLdecimaltocurrency{12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLparse{\result}{£12 345.678}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%\end{dispExample}
+%
+%The remaining options relate to dates and times, which are still
+%experimental. You need to enable date and time parsing with
+%\setbaseopt{ datetime = \brackets{parse} }.
+%
+%\begin{docKey}[GI]{date-style}{=\meta{style}}{initially \opt{dmyyyy}}
+%Sets the current date style. The value may be one of:
+%\docValue{dmyyyy} (day month year), \docValue{mdyyyy} (month day year),
+%\docValue{yyyymd} (year month day),
+%\docValue{dmyy} (day month 2-digit year),
+%\docValue{mdyy} (month day 2-digit year), or
+%\docValue{yymd} (2-digit year month day).
+%\end{docKey}
+%
+%\begin{docKey}[GI]{date-variant}{=\meta{style}}{initially \opt{slash}}
+%Sets the current numeric date separator.
+%Allowed values: \docValue{slash} (\code{/}), \docValue{hyphen}
+%(\code{-}), \docValue{dot} (\code{.}) or
+%\docValue{dialect} (if the language supports it).
+%\end{docKey}
+%
+%\begin{docKey}[GI]{time-variant}{=\meta{style}}{initially \opt{colon}}
+%Sets the current numeric time separator.
+%Allowed values: \docValue{colon} (\code{:}), \docValue{dot} (\code{.}) or
+%\docValue{dialect} (if the language supports it),
+%\docValue{dialect-colon} (if the language supports it), or
+%\docValue{dialect-dot} (if the language supports it).
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{datetime={parse}}
+%\DTLsetLocaleOptions{GI}{
+% date-style=dmyyyy,
+% date-variant = dialect,
+% time-variant = dot
+%}
+%\DTLparse\result{Fri 28th Feb 2025 3.45pm GMT}
+%String: \result.
+%Data type: \DTLgetDataTypeName{\DTLdatumtype{\result}}.
+%Numeric value: \DTLdatumvalue{\result}.
+%
+%\ExplSyntaxOn
+%\datatool_extract_timestamp:NN \result \l_tmpa_tl
+%Time-stamp: ~ \l_tmpa_tl
+%\ExplSyntaxOff
+%\end{dispExample}
+%
+%\begin{docCommand}{datatoolGISetNumberChars}{}
+%Hook to switch to GI number group and decimal characters.
+%\end{docCommand}
+%
+%\begin{docCommand}{datatoolGIcurrencyfmt}{}
+%Used to format the GIP currency. This supports the currency symbol
+%prefix.
+%\end{docCommand}
+%
+%\begin{docCommand}{DTLGILocaleHook}{}
+%Hook to switch to GI settings. This may be added to the captions
+%hook by \sty{datatool-base}, depending on the settings. Otherwise
+%it can be explicitly used to switch to this region.
+%\end{docCommand}
+%
+%\section{Region \qt{IE}}
+%\DTLenLocaleHook
+%\DTLIELocaleHook
+%
+%The \file{datatool-IE.ldf} file provides support for region \qt{IE}
+%(Republic of Ireland). This sets \qt{EUR} as the default currency.
+%
+%If there's no caption hook and you have multiple locales, you will
+%need to set both the language and region hooks. For example, this
+%document has:
+%\begin{dispListing}
+%\DTLenLocaleHook
+%\DTLIELocaleHook
+%\end{dispListing}
+%
+%\begin{dispExample*}{title={Default Numeric Styles}}
+%\DTLdecimaltolocale{12345}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLdecimaltolocale{12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLdecimaltocurrency{-12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLmul\result{\result}{0.5}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%\end{dispExample*}
+%Remember that date-time parsing needs to be enabled, if required.
+%\begin{dispExample*}{title={Default Date-Time Styles}}
+%\DTLsetup{datetime={parse}}
+%\DTLparse\result{1/6/2025 15:45 IST}
+%String: \result.
+%Data type: \DTLgetDataTypeName{\DTLdatumtype{\result}}.
+%Numeric value: \DTLdatumvalue{\result}.
+%
+%\ExplSyntaxOn
+%\datatool_extract_timestamp:NN \result \l_tmpa_tl
+%Time-stamp: ~ \l_tmpa_tl
+%\ExplSyntaxOff
+%\end{dispExample*}
+%
+%
+%Options may be set with \setlocaleopts{IE}. Available options are
+%listed below.
+%
+%\begin{docKey}[IE]{currency-symbol-position}{=\meta{value}}{initially \opt{before}}
+%Adjusts the formatting currency style. If \docValue{before}, the
+%currency symbol is placed before the value. If \docValue{after}, the
+%currency symbol is placed after the value.
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{numeric={currency-symbol-style=iso}}
+%\DTLsetLocaleOptions{IE}{currency-symbol-position=after}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%\begin{docKey}[IE]{currency-symbol-sep}{=\meta{value}}{initially \opt{none}}
+%Sets the separator to use between the currency symbol (not code) and the value.
+%Permitted values: \docValue{none} (no space), \docValue{thin-space}
+%(a thin space), \docValue{space} (a normal space), or
+%\docValue{nbsp} (a non-breaking space).
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetLocaleOptions{IE}{currency-symbol-sep=thin-space}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%\begin{docKey}[IE]{number-style}{=\meta{setting}}{initially \opt{official}}
+%Sets the number group and decimal characters. The value may be one
+%of: \docValue{official} (comma number group and decimal point) or
+%\docValue{unofficial} (thin space number group and decimal point).
+%In the case of \docValue{unofficial}, a normal space may also be used
+%when parsing.
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{numeric={auto-reformat}}
+%\DTLsetLocaleOptions{IE}{number-style=unofficial}
+%\DTLdecimaltocurrency{12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLparse{\result}{\texteuro 12 345.678}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%\end{dispExample}
+%
+%The remaining options relate to dates and times, which are still
+%experimental. You need to enable date and time parsing with
+%\setbaseopt{ datetime = \brackets{ parse } }.
+%
+%\begin{docKey}[IE]{date-style}{=\meta{style}}{initially \opt{dmyyyy}}
+%Sets the current date style. The value may be one of:
+%\docValue{dmyyyy} (day month year), \docValue{mdyyyy} (month day year),
+%\docValue{yyyymd} (year month day),
+%\docValue{dmyy} (day month 2-digit year),
+%\docValue{mdyy} (month day 2-digit year), or
+%\docValue{yymd} (2-digit year month day).
+%\end{docKey}
+%
+%\begin{docKey}[IE]{date-variant}{=\meta{style}}{initially \opt{slash}}
+%Sets the current numeric date separator.
+%Allowed values: \docValue{slash} (\code{/}), \docValue{hyphen}
+%(\code{-}), \docValue{dot} (\code{.}) or
+%\docValue{dialect} (if the language supports it).
+%\end{docKey}
+%
+%\begin{docKey}[IE]{time-variant}{=\meta{style}}{initially \opt{colon}}
+%Sets the current numeric time separator.
+%Allowed values: \docValue{colon} (\code{:}), \docValue{dot} (\code{.}) or
+%\docValue{dialect} (if the language supports it),
+%\docValue{dialect-colon} (if the language supports it), or
+%\docValue{dialect-dot} (if the language supports it).
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{datetime={parse}}
+%\DTLsetLocaleOptions{IE}{
+% date-style=dmyyyy,
+% date-variant = dialect,
+% time-variant = dot
+%}
+%\DTLparse\result{1st June 2025 3.45pm IST}
+%String: \result.
+%Data type: \DTLgetDataTypeName{\DTLdatumtype{\result}}.
+%Numeric value: \DTLdatumvalue{\result}.
+%
+%\ExplSyntaxOn
+%\datatool_extract_timestamp:NN \result \l_tmpa_tl
+%Time-stamp: ~ \l_tmpa_tl
+%\ExplSyntaxOff
+%\end{dispExample}
+%
+%\begin{docCommand}{datatoolIESetNumberChars}{}
+%Hook to switch to IE number group and decimal characters.
+%\end{docCommand}
+%
+%\begin{docCommand}{datatoolIESetCurrency}{}
+%Hook to switch to the EUR currency, rounding to 2 decimal places,
+%and redefines \cs{DTLdefaultEURcurrencyfmt} to reflect the
+%\opt{currency-symbol-position} setting.
+%\end{docCommand}
+%
+%\begin{docCommand}{DTLIELocaleHook}{}
+%Hook to switch to IE settings. This may be added to the captions
+%hook by \sty{datatool-base}, depending on the settings. Otherwise
+%it can be explicitly used to switch to this region.
+%\end{docCommand}
+%
+%\section{Region \qt{IM}}
+%\DTLenLocaleHook
+%\DTLIMLocaleHook
+%
+%The \file{datatool-IM.ldf} file provides support for region \qt{IM}
+%(Isle of Man). This defines the \qt{IMP} currency and sets it as
+%the default currency. The default number group character is a
+%comma, and the default decimal character is a dot.
+%
+%If there's no caption hook and you have multiple locales, you will
+%need to set both the language and region hooks. For example, this
+%document has:
+%\begin{dispListing}
+%\DTLenLocaleHook
+%\DTLIMLocaleHook
+%\end{dispListing}
+%
+%\begin{dispExample*}{title={Default Numeric Styles}}
+%\DTLdecimaltolocale{12345}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLdecimaltolocale{12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLdecimaltocurrency{-12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLmul\result{\result}{0.5}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%\end{dispExample*}
+%Remember that date-time parsing needs to be enabled, if required.
+%\begin{dispExample*}{title={Default Date-Time Styles}}
+%\DTLsetup{datetime={parse}}
+%\DTLparse\result{28/2/2025 15:45 GMT}
+%String: \result.
+%Data type: \DTLgetDataTypeName{\DTLdatumtype{\result}}.
+%Numeric value: \DTLdatumvalue{\result}.
+%
+%\ExplSyntaxOn
+%\datatool_extract_timestamp:NN \result \l_tmpa_tl
+%Time-stamp: ~ \l_tmpa_tl
+%\ExplSyntaxOff
+%\end{dispExample*}
+%
+%Options may be set with \setlocaleopts{IM}. Available options are
+%listed below.
+%
+%\begin{docKey}[IM]{currency-symbol-prefix}{=\meta{boolean}}{initially \opt{false}}
+%If true, shows the region prefix before the currency symbol if
+%the \opt{numeric} setting \opt{currency-symbol-style} is not set to \qt{iso}.
+%The prefix font may be changed to smallcaps or smaller with
+%\setbaseopt{ numeric = \brackets{ region-currency-prefix = \meta{value} } }
+%where \meta{value} is \opt{smallcaps} or \opt{smaller}.
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{numeric={region-currency-prefix=smallcaps}}
+%\DTLsetLocaleOptions{IM}{currency-symbol-prefix}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%
+%\begin{docKey}[IM]{currency-symbol-position}{=\meta{value}}{initially \opt{before}}
+%Adjusts the formatting currency style. If \docValue{before}, the
+%currency symbol is placed before the value. If \docValue{after}, the
+%currency symbol is placed after the value.
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{numeric={currency-symbol-style=iso}}
+%\DTLsetLocaleOptions{IM}{currency-symbol-position=after}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%\begin{docKey}[IM]{currency-symbol-sep}{=\meta{value}}{initially \opt{none}}
+%Sets the separator to use between the currency symbol (not code) and the value.
+%Permitted values: \docValue{none} (no space), \docValue{thin-space}
+%(a thin space), \docValue{space} (a normal space), or
+%\docValue{nbsp} (a non-breaking space).
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetLocaleOptions{IM}{currency-symbol-sep=thin-space}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%\begin{docKey}[IM]{number-style}{=\meta{setting}}{initially \opt{official}}
+%Sets the number group and decimal characters. The value may be one
+%of: \docValue{official} (comma number group and decimal point) or
+%\docValue{unofficial} (thin space number group and decimal point).
+%In the case of \docValue{unofficial}, a normal space may also be used
+%when parsing.
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{numeric={auto-reformat}}
+%\DTLsetLocaleOptions{IM}{number-style=unofficial}
+%\DTLdecimaltocurrency{12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLparse{\result}{£12 345.678}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%\end{dispExample}
+%
+%The remaining options relate to dates and times, which are still
+%experimental. You need to enable date and time parsing with
+%\setbaseopt{ datetime = \brackets{parse} }.
+%
+%\begin{docKey}[IM]{date-style}{=\meta{style}}{initially \opt{dmyyyy}}
+%Sets the current date style. The value may be one of:
+%\docValue{dmyyyy} (day month year), \docValue{mdyyyy} (month day year),
+%\docValue{yyyymd} (year month day),
+%\docValue{dmyy} (day month 2-digit year),
+%\docValue{mdyy} (month day 2-digit year), or
+%\docValue{yymd} (2-digit year month day).
+%\end{docKey}
+%
+%\begin{docKey}[IM]{date-variant}{=\meta{style}}{initially \opt{slash}}
+%Sets the current numeric date separator.
+%Allowed values: \docValue{slash} (\code{/}), \docValue{hyphen}
+%(\code{-}), \docValue{dot} (\code{.}) or
+%\docValue{dialect} (if the language supports it).
+%\end{docKey}
+%
+%\begin{docKey}[IM]{time-variant}{=\meta{style}}{initially \opt{colon}}
+%Sets the current numeric time separator.
+%Allowed values: \docValue{colon} (\code{:}), \docValue{dot} (\code{.}) or
+%\docValue{dialect} (if the language supports it),
+%\docValue{dialect-colon} (if the language supports it), or
+%\docValue{dialect-dot} (if the language supports it).
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{datetime={parse}}
+%\DTLsetLocaleOptions{IM}{
+% date-style=dmyyyy,
+% date-variant = dialect,
+% time-variant = dot
+%}
+%\DTLparse\result{Fri 28th Feb 2025 3.45pm GMT}
+%String: \result.
+%Data type: \DTLgetDataTypeName{\DTLdatumtype{\result}}.
+%Numeric value: \DTLdatumvalue{\result}.
+%
+%\ExplSyntaxOn
+%\datatool_extract_timestamp:NN \result \l_tmpa_tl
+%Time-stamp: ~ \l_tmpa_tl
+%\ExplSyntaxOff
+%\end{dispExample}
+%
+%\begin{docCommand}{datatoolIMSetNumberChars}{}
+%Hook to switch to IM number group and decimal characters.
+%\end{docCommand}
+%
+%\begin{docCommand}{datatoolIMcurrencyfmt}{}
+%Used to format the IMP currency. This supports the currency symbol
+%prefix.
+%\end{docCommand}
+%
+%\begin{docCommand}{DTLIMLocaleHook}{}
+%Hook to switch to IM settings. This may be added to the captions
+%hook by \sty{datatool-base}, depending on the settings. Otherwise
+%it can be explicitly used to switch to this region.
+%\end{docCommand}
+%
+%\section{Region \qt{JE}}
+%\DTLenLocaleHook
+%\DTLJELocaleHook
+%
+%The \file{datatool-JE.ldf} file provides support for region \qt{JE}
+%(Jersey). This defines the \qt{JEP} currency and sets it as
+%the default currency. The default number group character is a
+%comma, and the default decimal character is a dot.
+%
+%If there's no caption hook and you have multiple locales, you will
+%need to set both the language and region hooks. For example, this
+%document has:
+%\begin{dispListing}
+%\DTLenLocaleHook
+%\DTLJELocaleHook
+%\end{dispListing}
+%
+%\begin{dispExample*}{title={Default Numeric Styles}}
+%\DTLdecimaltolocale{12345}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLdecimaltolocale{12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLdecimaltocurrency{-12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLmul\result{\result}{0.5}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%\end{dispExample*}
+%Remember that date-time parsing needs to be enabled, if required.
+%\begin{dispExample*}{title={Default Date-Time Styles}}
+%\DTLsetup{datetime={parse}}
+%\DTLparse\result{28/2/2025 15:45 GMT}
+%String: \result.
+%Data type: \DTLgetDataTypeName{\DTLdatumtype{\result}}.
+%Numeric value: \DTLdatumvalue{\result}.
+%
+%\ExplSyntaxOn
+%\datatool_extract_timestamp:NN \result \l_tmpa_tl
+%Time-stamp: ~ \l_tmpa_tl
+%\ExplSyntaxOff
+%\end{dispExample*}
+%
+%
+%Options may be set with \setlocaleopts{JE}. Available options are
+%listed below.
+%
+%\begin{docKey}[JE]{currency-symbol-prefix}{=\meta{boolean}}{initially \opt{false}}
+%If true, shows the region prefix before the currency symbol if
+%the \opt{numeric} setting \opt{currency-symbol-style} is not set to \qt{iso}.
+%The prefix font may be changed to smallcaps or smaller with
+%\setbaseopt{ numeric = \brackets{ region-currency-prefix = \meta{value} } }
+%where \meta{value} is \opt{smallcaps} or \opt{smaller}.
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{numeric={region-currency-prefix=smallcaps}}
+%\DTLsetLocaleOptions{JE}{currency-symbol-prefix}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%
+%\begin{docKey}[JE]{currency-symbol-position}{=\meta{value}}{initially \opt{before}}
+%Adjusts the formatting currency style. If \docValue{before}, the
+%currency symbol is placed before the value. If \docValue{after}, the
+%currency symbol is placed after the value.
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{numeric={currency-symbol-style=iso}}
+%\DTLsetLocaleOptions{JE}{currency-symbol-position=after}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%\begin{docKey}[JE]{currency-symbol-sep}{=\meta{value}}{initially \opt{none}}
+%Sets the separator to use between the currency symbol (not code) and the value.
+%Permitted values: \docValue{none} (no space), \docValue{thin-space}
+%(a thin space), \docValue{space} (a normal space), or
+%\docValue{nbsp} (a non-breaking space).
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetLocaleOptions{JE}{currency-symbol-sep=thin-space}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%\begin{docKey}[JE]{number-style}{=\meta{setting}}{initially \opt{official}}
+%Sets the number group and decimal characters. The value may be one
+%of: \docValue{official} (comma number group and decimal point) or
+%\docValue{unofficial} (thin space number group and decimal point).
+%In the case of \docValue{unofficial}, a normal space may also be used
+%when parsing.
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{numeric={auto-reformat}}
+%\DTLsetLocaleOptions{JE}{number-style=unofficial}
+%\DTLdecimaltocurrency{12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLparse{\result}{£12 345.678}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%\end{dispExample}
+%
+%The remaining options relate to dates and times, which are still
+%experimental. You need to enable date and time parsing with
+%\setbaseopt{ datetime = \brackets{parse} }.
+%
+%\begin{docKey}[JE]{date-style}{=\meta{style}}{initially \opt{dmyyyy}}
+%Sets the current date style. The value may be one of:
+%\docValue{dmyyyy} (day month year), \docValue{mdyyyy} (month day year),
+%\docValue{yyyymd} (year month day),
+%\docValue{dmyy} (day month 2-digit year),
+%\docValue{mdyy} (month day 2-digit year), or
+%\docValue{yymd} (2-digit year month day).
+%\end{docKey}
+%
+%\begin{docKey}[JE]{date-variant}{=\meta{style}}{initially \opt{slash}}
+%Sets the current numeric date separator.
+%Allowed values: \docValue{slash} (\code{/}), \docValue{hyphen}
+%(\code{-}), \docValue{dot} (\code{.}) or
+%\docValue{dialect} (if the language supports it).
+%\end{docKey}
+%
+%\begin{docKey}[JE]{time-variant}{=\meta{style}}{initially \opt{colon}}
+%Sets the current numeric time separator.
+%Allowed values: \docValue{colon} (\code{:}), \docValue{dot} (\code{.}) or
+%\docValue{dialect} (if the language supports it),
+%\docValue{dialect-colon} (if the language supports it), or
+%\docValue{dialect-dot} (if the language supports it).
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{datetime={parse}}
+%\DTLsetLocaleOptions{JE}{
+% date-style=dmyyyy,
+% date-variant = dialect,
+% time-variant = dot
+%}
+%\DTLparse\result{Fri 28th Feb 2025 3.45pm GMT}
+%String: \result.
+%Data type: \DTLgetDataTypeName{\DTLdatumtype{\result}}.
+%Numeric value: \DTLdatumvalue{\result}.
+%
+%\ExplSyntaxOn
+%\datatool_extract_timestamp:NN \result \l_tmpa_tl
+%Time-stamp: ~ \l_tmpa_tl
+%\ExplSyntaxOff
+%\end{dispExample}
+%
+%\begin{docCommand}{datatoolJESetNumberChars}{}
+%Hook to switch to JE number group and decimal characters.
+%\end{docCommand}
+%
+%\begin{docCommand}{datatoolJEcurrencyfmt}{}
+%Used to format the JEP currency. This supports the currency symbol
+%prefix.
+%\end{docCommand}
+%
+%\begin{docCommand}{DTLJELocaleHook}{}
+%Hook to switch to JE settings. This may be added to the captions
+%hook by \sty{datatool-base}, depending on the settings. Otherwise
+%it can be explicitly used to switch to this region.
+%\end{docCommand}
+%
+%\section{Region \qt{NZ}}
+%\DTLenLocaleHook
+%\DTLNZLocaleHook
+%
+%The \file{datatool-NZ.ldf} file provides support for region \qt{NZ}
+%(New Zealand). This defines the \qt{NZD} currency and sets it as
+%the default currency. The default number group character is a
+%comma, and the default decimal character is a dot.
+%
+%If there's no caption hook and you have multiple locales, you will
+%need to set both the language and region hooks. For example, this
+%document has:
+%\begin{dispListing}
+%\DTLenLocaleHook
+%\DTLNZLocaleHook
+%\end{dispListing}
+%
+%\begin{dispExample*}{title={Default Numeric Styles}}
+%\DTLdecimaltolocale{12345}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLdecimaltolocale{12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLdecimaltocurrency{-12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLmul\result{\result}{0.5}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%\end{dispExample*}
+%Remember that date-time parsing needs to be enabled, if required.
+%\begin{dispExample*}{title={Default Date-Time Styles}}
+%\DTLsetup{datetime={parse}}
+%\DTLparse\result{28/2/2025 15:45 NZDT}
+%String: \result.
+%Data type: \DTLgetDataTypeName{\DTLdatumtype{\result}}.
+%Numeric value: \DTLdatumvalue{\result}.
+%
+%\ExplSyntaxOn
+%\datatool_extract_timestamp:NN \result \l_tmpa_tl
+%Time-stamp: ~ \l_tmpa_tl
+%\ExplSyntaxOff
+%\end{dispExample*}
+%
+%
+%Options may be set with \setlocaleopts{NZ}. Available options are
+%listed below.
+%
+%\begin{docKey}[NZ]{currency-symbol-prefix}{=\meta{boolean}}{initially \opt{false}}
+%If true, shows the region prefix before the currency symbol if
+%the \opt{numeric} setting \opt{currency-symbol-style} is not set to \qt{iso}.
+%The prefix font may be changed to smallcaps or smaller with
+%\setbaseopt{ numeric = \brackets{ region-currency-prefix = \meta{value} } }
+%where \meta{value} is \opt{smallcaps} or \opt{smaller}.
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{numeric={region-currency-prefix=smallcaps}}
+%\DTLsetLocaleOptions{NZ}{currency-symbol-prefix}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%
+%\begin{docKey}[NZ]{currency-symbol-position}{=\meta{value}}{initially \opt{before}}
+%Adjusts the formatting currency style. If \docValue{before}, the
+%currency symbol is placed before the value. If \docValue{after}, the
+%currency symbol is placed after the value.
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{numeric={currency-symbol-style=iso}}
+%\DTLsetLocaleOptions{NZ}{currency-symbol-position=after}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%\begin{docKey}[NZ]{currency-symbol-sep}{=\meta{value}}{initially \opt{none}}
+%Sets the separator to use between the currency symbol (not code) and the value.
+%Permitted values: \docValue{none} (no space), \docValue{thin-space}
+%(a thin space), \docValue{space} (a normal space), or
+%\docValue{nbsp} (a non-breaking space).
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetLocaleOptions{NZ}{currency-symbol-sep=thin-space}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%\begin{docKey}[NZ]{number-style}{=\meta{setting}}{initially \opt{official}}
+%Sets the number group and decimal characters. The value may be one
+%of: \docValue{official} (comma number group and decimal point), or
+%\docValue{unofficial} (thin space number group and decimal point).
+%In the case of \docValue{unofficial}, a normal space may also be used
+%when parsing.
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{numeric={auto-reformat}}
+%\DTLsetLocaleOptions{NZ}{number-style=unofficial}
+%\DTLdecimaltocurrency{12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLparse{\result}{\$12 345.678}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%\end{dispExample}
+%
+%The remaining options relate to dates and times, which are still
+%experimental. You need to enable date and time parsing with
+%\setbaseopt{ datetime = \brackets{parse} }.
+%
+%\begin{docKey}[NZ]{date-style}{=\meta{style}}{initially \opt{mdyyyy}}
+%Sets the current date style. The value may be one of:
+%\docValue{dmyyyy} (day month year), \docValue{mdyyyy} (month day year),
+%\docValue{yyyymd} (year month day),
+%\docValue{dmyy} (day month 2-digit year),
+%\docValue{mdyy} (month day 2-digit year), or
+%\docValue{yymd} (2-digit year month day).
+%\end{docKey}
+%
+%\begin{docKey}[NZ]{date-variant}{=\meta{style}}{initially \opt{slash}}
+%Sets the current numeric date separator.
+%Allowed values: \docValue{slash} (\code{/}), \docValue{hyphen}
+%(\code{-}), \docValue{dot} (\code{.}) or
+%\docValue{dialect} (if the language supports it).
+%\end{docKey}
+%
+%\begin{docKey}[NZ]{time-variant}{=\meta{style}}{initially \opt{colon}}
+%Sets the current numeric time separator.
+%Allowed values: \docValue{colon} (\code{:}), \docValue{dot} (\code{.}) or
+%\docValue{dialect} (if the language supports it),
+%\docValue{dialect-colon} (if the language supports it), or
+%\docValue{dialect-dot} (if the language supports it).
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{datetime={parse}}
+%\DTLsetLocaleOptions{NZ}{
+% date-style=mdyyyy,
+% date-variant = dialect,
+% time-variant = dot
+%}
+%\DTLparse\result{February 28, 2025 3.45pm AEDT}
+%String: \result.
+%Data type: \DTLgetDataTypeName{\DTLdatumtype{\result}}.
+%Numeric value: \DTLdatumvalue{\result}.
+%
+%\ExplSyntaxOn
+%\datatool_extract_timestamp:NN \result \l_tmpa_tl
+%Time-stamp: ~ \l_tmpa_tl
+%\ExplSyntaxOff
+%\end{dispExample}
+%
+%\begin{docCommand}{datatoolNZSetNumberChars}{}
+%Hook to switch to NZ number group and decimal characters.
+%\end{docCommand}
+%
+%\begin{docCommand}{datatoolNZcurrencyfmt}{}
+%Used to format the NZD currency. This supports the currency symbol
+%prefix.
+%\end{docCommand}
+%
+%\begin{docCommand}{DTLNZLocaleHook}{}
+%Hook to switch to NZ settings. This may be added to the captions
+%hook by \sty{datatool-base}, depending on the settings. Otherwise
+%it can be explicitly used to switch to this region.
+%\end{docCommand}
+%
+%\section{Region \qt{US}}
+%\DTLenLocaleHook
+%\DTLUSLocaleHook
+%
+%The \file{datatool-US.ldf} file provides support for region \qt{US}
+%(United States). This defines the \qt{USD} currency and sets it as
+%the default currency. The default number group character is a
+%comma, and the default decimal character is a dot.
+%
+%If there's no caption hook and you have multiple locales, you will
+%need to set both the language and region hooks. For example, this
+%document has:
+%\begin{dispListing}
+%\DTLenLocaleHook
+%\DTLUSLocaleHook
+%\end{dispListing}
+%
+%\begin{dispExample*}{title={Default Styles}}
+%\DTLdecimaltolocale{12345}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLdecimaltolocale{12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLdecimaltocurrency{-12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLmul\result{\result}{0.5}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%\end{dispExample*}
+%Remember that date-time parsing needs to be enabled, if required.
+%\begin{dispExample*}{title={Default Date-Time Styles}}
+%\DTLsetup{datetime={parse}}
+%\DTLparse\result{2/28/2025 15:45 PST}
+%String: \result.
+%Data type: \DTLgetDataTypeName{\DTLdatumtype{\result}}.
+%Numeric value: \DTLdatumvalue{\result}.
+%
+%\ExplSyntaxOn
+%\datatool_extract_timestamp:NN \result \l_tmpa_tl
+%Time-stamp: ~ \l_tmpa_tl
+%\ExplSyntaxOff
+%\end{dispExample*}
+%
+%Options may be set with \setlocaleopts{US}. Available options are
+%listed below.
+%
+%\begin{docKey}[US]{currency-symbol-prefix}{=\meta{boolean}}{initially \opt{false}}
+%If true, shows the region prefix before the currency symbol if
+%the \opt{numeric} setting \opt{currency-symbol-style} is not set to \qt{iso}.
+%The prefix font may be changed to smallcaps or smaller with
+%\setbaseopt{ numeric = \brackets{ region-currency-prefix = \meta{value} } }
+%where \meta{value} is \opt{smallcaps} or \opt{smaller}.
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{numeric={region-currency-prefix=smallcaps}}
+%\DTLsetLocaleOptions{US}{currency-symbol-prefix}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%
+%\begin{docKey}[US]{currency-symbol-position}{=\meta{value}}{initially \opt{before}}
+%Adjusts the formatting currency style. If \docValue{before}, the
+%currency symbol is placed before the value. If \docValue{after}, the
+%currency symbol is placed after the value.
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{numeric={currency-symbol-style=iso}}
+%\DTLsetLocaleOptions{US}{currency-symbol-position=after}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%\begin{docKey}[US]{currency-symbol-sep}{=\meta{value}}{initially \opt{none}}
+%Sets the separator to use between the currency symbol (not code) and the value.
+%Permitted values: \docValue{none} (no space), \docValue{thin-space}
+%(a thin space), \docValue{space} (a normal space), or
+%\docValue{nbsp} (a non-breaking space).
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetLocaleOptions{US}{currency-symbol-sep=thin-space}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%\begin{docKey}[US]{number-style}{=\meta{setting}}{initially \opt{official}}
+%Sets the number group and decimal characters. The value may be one
+%of: \docValue{official} (comma number group and decimal point), or
+%\docValue{unofficial} (thin space number group and decimal point).
+%In the case of \docValue{unofficial}, a normal space may also be used
+%when parsing.
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{numeric={auto-reformat}}
+%\DTLsetLocaleOptions{US}{number-style=unofficial}
+%\DTLdecimaltocurrency{12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLparse{\result}{\$12 345.678}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%\end{dispExample}
+%
+%The remaining options relate to dates and times, which are still
+%experimental. You need to enable date and time parsing with
+%\setbaseopt{ datetime = \brackets{parse} }.
+%
+%\begin{docKey}[US]{date-style}{=\meta{style}}{initially \opt{mdyyyy}}
+%Sets the current date style. The value may be one of:
+%\docValue{dmyyyy} (day month year), \docValue{mdyyyy} (month day year),
+%\docValue{yyyymd} (year month day),
+%\docValue{dmyy} (day month 2-digit year),
+%\docValue{mdyy} (month day 2-digit year), or
+%\docValue{yymd} (2-digit year month day).
+%\end{docKey}
+%
+%\begin{docKey}[US]{date-variant}{=\meta{style}}{initially \opt{slash}}
+%Sets the current numeric date separator.
+%Allowed values: \docValue{slash} (\code{/}), \docValue{hyphen}
+%(\code{-}), \docValue{dot} (\code{.}) or
+%\docValue{dialect} (if the language supports it).
+%\end{docKey}
+%
+%\begin{docKey}[US]{time-variant}{=\meta{style}}{initially \opt{colon}}
+%Sets the current numeric time separator.
+%Allowed values: \docValue{colon} (\code{:}), \docValue{dot} (\code{.}) or
+%\docValue{dialect} (if the language supports it),
+%\docValue{dialect-colon} (if the language supports it), or
+%\docValue{dialect-dot} (if the language supports it).
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{datetime={parse}}
+%\DTLsetLocaleOptions{US}{
+% date-style=mdyyyy,
+% date-variant = dialect,
+% time-variant = dot
+%}
+%\DTLparse\result{February 28, 2025 3.45pm EST}
+%String: \result.
+%Data type: \DTLgetDataTypeName{\DTLdatumtype{\result}}.
+%Numeric value: \DTLdatumvalue{\result}.
+%
+%\ExplSyntaxOn
+%\datatool_extract_timestamp:NN \result \l_tmpa_tl
+%Time-stamp: ~ \l_tmpa_tl
+%\ExplSyntaxOff
+%\end{dispExample}
+%
+%\begin{docCommand}{datatoolUSSetNumberChars}{}
+%Hook to switch to US number group and decimal characters.
+%\end{docCommand}
+%
+%\begin{docCommand}{datatoolUScurrencyfmt}{}
+%Used to format the USD currency. This supports the currency symbol
+%prefix.
+%\end{docCommand}
+%
+%\begin{docCommand}{DTLUSLocaleHook}{}
+%Hook to switch to US settings. This may be added to the captions
+%hook by \sty{datatool-base}, depending on the settings. Otherwise
+%it can be explicitly used to switch to this region.
+%\end{docCommand}
+%
+%\section{Region \qt{ZA}}
+%\DTLenLocaleHook
+%\DTLenZALocaleHook
+%\DTLZALocaleHook
+%
+%The \file{datatool-ZA.ldf} file provides support for region \qt{ZA}
+%(South Africa). This supplies the currency (ZAR) but number formatting
+%depends on the language, so this requires specific language \&
+%region files, which should be provided by the applicable language
+%module. For example, \sty{datatool-english} provides
+%\file{datatool-en-ZA.ldf}.
+%
+%If there's no caption hook and you have multiple locales, you will
+%need to set both the language and region hooks. For example, this
+%document has:
+%\begin{dispListing}
+%\DTLenLocaleHook
+%\DTLenZALocaleHook
+%\DTLZALocaleHook
+%\end{dispListing}
+%
+%\begin{dispExample*}{title={Default Styles (with English)}}
+%\DTLdecimaltolocale{12345}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLdecimaltolocale{12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLdecimaltocurrency{-12345.678}{\result}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%
+%\DTLmul\result{\result}{0,5}\result.
+%(Value: \DTLdatumvalue{\result}.)
+%\end{dispExample*}
+%Remember that date-time parsing needs to be enabled, if required.
+%\begin{dispExample*}{title={Default Date-Time Styles}}
+%\DTLsetup{datetime={parse}}
+%\DTLparse\result{2025-2-28 15:45 SAST}
+%String: \result.
+%Data type: \DTLgetDataTypeName{\DTLdatumtype{\result}}.
+%Numeric value: \DTLdatumvalue{\result}.
+%
+%\ExplSyntaxOn
+%\datatool_extract_timestamp:NN \result \l_tmpa_tl
+%Time-stamp: ~ \l_tmpa_tl
+%\ExplSyntaxOff
+%\end{dispExample*}
+%
+%Options may be set with \setlocaleopts{ZA}. Available options are
+%listed below.
+%
+%\begin{docKey}[ZA]{currency-symbol-position}{=\meta{value}}{initially \opt{before}}
+%Adjusts the formatting currency style. If \docValue{before}, the
+%currency symbol is placed before the value. If \docValue{after}, the
+%currency symbol is placed after the value.
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{numeric={currency-symbol-style=iso}}
+%\DTLsetLocaleOptions{ZA}{currency-symbol-position=after}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%\begin{docKey}[ZA]{currency-symbol-sep}{=\meta{value}}{initially \opt{none}}
+%Sets the separator to use between the currency symbol (not code) and the value.
+%Permitted values: \docValue{none} (no space), \docValue{thin-space}
+%(a thin space), \docValue{space} (a normal space), or
+%\docValue{nbsp} (a non-breaking space).
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetLocaleOptions{ZA}{currency-symbol-sep=thin-space}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%\begin{docKey}[ZA]{number-style}{=\meta{style}}{initially \opt{official}}
+%Sets the number group and decimal characters. The value may be one
+%of: \docValue{official} (dot number group and decimal comma) or
+%\docValue{dialect} (attempt to use the number style for
+%the module \meta{lang}-ZA, if it's defined, where \meta{lang} is the
+%current language tag).
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetLocaleOptions{ZA}{number-style=official}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%Or if \ldf{en-ZA} has been loaded and the current language is
+%English:
+%\begin{dispExample}
+%\DTLsetLocaleOptions{ZA}{number-style=dialect}
+%\DTLdecimaltocurrency{12345.678}{\result}\result
+%\end{dispExample}
+%
+%The remaining options relate to dates and times, which are still
+%experimental. You need to enable date and time parsing with
+%\setbaseopt{ datetime = \brackets{parse} }.
+%
+%\begin{docKey}[ZA]{date-style}{=\meta{style}}{initially \opt{yyyymd}}
+%Sets the current date style. The value may be one of:
+%\docValue{dmyyyy} (day month year), \docValue{mdyyyy} (month day year),
+%\docValue{yyyymd} (year month day),
+%\docValue{dmyy} (day month 2-digit year),
+%\docValue{mdyy} (month day 2-digit year), or
+%\docValue{yymd} (2-digit year month day).
+%\end{docKey}
+%
+%\begin{docKey}[ZA]{date-variant}{=\meta{style}}{initially \opt{hyphen}}
+%Sets the current numeric date separator.
+%Allowed values: \docValue{slash} (\code{/}), \docValue{hyphen}
+%(\code{-}), \docValue{dot} (\code{.}) or
+%\docValue{dialect} (if the language supports it).
+%\end{docKey}
+%
+%\begin{docKey}[ZA]{time-variant}{=\meta{style}}{initially \opt{colon}}
+%Sets the current numeric time separator.
+%Allowed values: \docValue{colon} (\code{:}), \docValue{dot} (\code{.}) or
+%\docValue{dialect} (if the language supports it),
+%\docValue{dialect-colon} (if the language supports it), or
+%\docValue{dialect-dot} (if the language supports it).
+%\end{docKey}
+%
+%\begin{dispExample}
+%\DTLsetup{datetime={parse}}
+%\DTLsetLocaleOptions{ZA}{
+% date-style=mdyyyy,
+% date-variant = dialect,
+% time-variant = dot
+%}
+%\DTLparse\result{June 1, 2025 3.45pm SAST}
+%String: \result.
+%Data type: \DTLgetDataTypeName{\DTLdatumtype{\result}}.
+%Numeric value: \DTLdatumvalue{\result}.
+%
+%\ExplSyntaxOn
+%\datatool_extract_timestamp:NN \result \l_tmpa_tl
+%Time-stamp: ~ \l_tmpa_tl
+%\ExplSyntaxOff
+%\end{dispExample}
+%\begin{docCommand}{datatoolZASetNumberChars}{}
+%Hook to switch to ZA number group and decimal characters.
+%\end{docCommand}
+%
+%\begin{docCommand}{datatoolZAcurrencyfmt}{}
+%Used to format the ZAR currency.
+%\end{docCommand}
+%
+%\begin{docCommand}{DTLZALocaleHook}{}
+%Hook to switch to ZA settings. This may be added to the captions
+%hook by \sty{datatool-base}, depending on the settings. Otherwise
+%it can be explicitly used to switch to this region.
+%\end{docCommand}
+%
+%\StopEventually{%
+% \PrintChanges
+% \PrintIndex
+%}
+%
+%
+%\chapter{The Code}
+%\iffalse
+% \begin{macrocode}
+%<*datatool-AU.ldf>
+% \end{macrocode}
+%\fi
+%\section{datatool-AU.ldf}\label{sec:datatool-AU}
+% Support for region AU.
+% \begin{macrocode}
+\TrackLangProvidesResource{AU}[2025/03/01 v1.0]
+% \end{macrocode}
+% Switch on \LaTeX3 syntax:
+% \begin{macrocode}
+\ExplSyntaxOn
+% \end{macrocode}
+%
+%\subsection{Numbers and Currency}
+%Set the number group and decimal symbols for this region.
+% \begin{macrocode}
+\cs_new:Nn \datatool_AU_set_numberchars_official:
+ {
+ \datatool_set_numberchars:nn { , } { . }
+ }
+% \end{macrocode}
+%Unofficial style.
+% \begin{macrocode}
+\cs_new:Nn \datatool_AU_set_numberchars_unofficial:
+ {
+ \datatool_set_thinspace_group_decimal_char:n { . }
+ }
+% \end{macrocode}
+%Hook to set the number group and decimal characters for the region:
+% \begin{macrocode}
+\newcommand \datatoolAUSetNumberChars
+ {
+ \bool_if:NT \l_datatool_region_set_numberchars_bool
+ {
+ \datatool_AU_set_numberchars_official:
+ }
+ }
+% \end{macrocode}
+%How to format the position of the currency symbol in relation to the value.
+% \begin{macrocode}
+\cs_new:Nn \datatool_AU_currency_position:nn
+ {
+ \dtlcurrprefixfmt { #1 } { #2 }
+ }
+% \end{macrocode}
+%Separator between currency symbol and value.
+% \begin{macrocode}
+\tl_new:N \l_datatool_AU_sym_sep_tl
+% \end{macrocode}
+% Set the currency format for this region.
+% \begin{macrocode}
+\newcommand \datatoolAUcurrencyfmt [ 2 ]
+ {
+ \datatool_AU_currency_position:nn
+ {
+ \datatoolAUsymbolprefix { AU }
+ #1
+ }
+ { #2 }
+ }
+% \end{macrocode}
+%Prefix for symbol, if required.
+% \begin{macrocode}
+\newcommand \datatoolAUsymbolprefix [ 1 ] { }
+% \end{macrocode}
+% Define the currency symbols for this region.
+% \begin{macrocode}
+\datatool_def_currency:nnnV
+ { \datatoolAUcurrencyfmt }
+ { AUD }
+ { \$ }
+ \c_dollar_str
+% \end{macrocode}
+% Register the currency code with this region:
+% \begin{macrocode}
+\datatool_register_regional_currency_code:nn { AU } { AUD }
+% \end{macrocode}
+% Provide a command to set the currency for this region (for use
+% with any hook used when the locale changes).
+% NB this should do nothing with
+% \verb|\DTLsetup{region-currency=false}|
+% \begin{macrocode}
+\newcommand \datatoolAUSetCurrency
+ {
+ \bool_if:NT \l_datatool_region_set_currency_bool
+ {
+ \DTLsetdefaultcurrency { AUD }
+% \end{macrocode}
+%Number of digits that \cs{DTLdecimaltocurrency} should round to:
+% \begin{macrocode}
+ \renewcommand \DTLCurrentLocaleCurrencyDP { 2 }
+% \end{macrocode}
+%Separator between symbol and value:
+% \begin{macrocode}
+ \renewcommand \dtlcurrfmtsymsep { \l_datatool_AU_sym_sep_tl }
+ }
+ }
+% \end{macrocode}
+%
+%\subsection{Date and Time Parsing}
+% This defaults to day/month/year but may be changed with \cs{DTLsetLocaleOptions}. For example:
+%\begin{dispListing}
+%\DTLsetLocaleOptions{AU}{date-style=dmyyyy, date-variant=slash}
+%\end{dispListing}
+%An appropriate language file will need to also be installed to
+%parse dates containing month names or day of week names.
+%
+%Provide a way to configure parsing style.
+% \begin{macrocode}
+\tl_new:N \l__datatool_AU_datevariant_tl
+\tl_set:Nn \l__datatool_AU_datevariant_tl { slash }
+% \end{macrocode}
+%NB These token lists are used to form command names. The following is not
+%a format string.
+% \begin{macrocode}
+\tl_new:N \l__datatool_AU_datestyle_tl
+\tl_set:Nn \l__datatool_AU_datestyle_tl { ddmmyyyy }
+\tl_new:N \l__datatool_AU_timevariant_tl
+\tl_set:Nn \l__datatool_AU_timevariant_tl { colon }
+% \end{macrocode}
+%
+%Each parsing command defined below has final \marg{true} and \marg{false}
+%arguments (\code{TF}). These are used if parsing was successful (true) or if
+%parsing failed (false). The internal commands used by
+%\sty{datatool-base} have no need for solo branches (only \code{T} or only
+%\code{F}) so these commands are simply defined with \verb|\cs_new:Nn|
+%not as conditionals.
+%
+%\subsubsection{Time Stamp Parsing}
+%Use command
+%\begin{definition}
+%\cs{datatool\_}\meta{date-style}\verb|_hhmmss_tz_parse_timestamp:nnNnTF|
+%\end{definition}
+%with date regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{date-variant}\verb|_|\meta{date-style}\verb|_date_regex|
+%\end{definition}
+%and time regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{time-variant}\verb|_hhmmss_time_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_AU_parse_timestamp:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_AU_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_AU_datevariant_tl
+ _
+ \l__datatool_AU_datestyle_tl
+ _date_regex
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_AU_timevariant_tl
+ _hhmmss_time_regex
+ }
+ {
+ \use:c
+ {
+ datatool_
+ \l__datatool_AU_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_AU_datevariant_tl
+ _
+ \l__datatool_AU_datestyle_tl
+ _date_regex
+ }
+ {
+ c_datatool_
+ \l__datatool_AU_timevariant_tl
+ _hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_AU_timevariant_tl
+ { datatool-AU }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_AU_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_AU_timevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_AU_datevariant_tl
+ { datatool-AU }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_AU_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_AU_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_AU_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-AU }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_AU_datestyle_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%
+%\subsubsection{Date Parsing}
+%Use command \cs{datatool\_}\meta{style}\verb|_parse_date:NNnTF|
+%with regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{variant}\verb|_anchored_|\meta{style}\verb|_date_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_AU_parse_date:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_AU_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_AU_datevariant_tl
+ _anchored_
+ \l__datatool_AU_datestyle_tl
+ _date_regex
+ }
+ {
+ \exp_args:cc
+ {
+ datatool_
+ \l__datatool_AU_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_AU_datevariant_tl
+ _anchored_
+ \l__datatool_AU_datestyle_tl
+ _date_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_AU_datevariant_tl
+ { datatool-AU }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_AU_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_AU_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_AU_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-AU }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_AU_datestyle_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%
+%\subsubsection{Time Parsing}
+%Use command \cs{datatool\_}\meta{style}\verb|_parse_time:NNnTF|
+%with regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{variant}\verb|_anchored_|\meta{style}\verb|_time_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_AU_parse_time:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_AU_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ {
+ \datatool_hhmmss_parse_time:cNnTF
+ {
+ c_datatool_
+ \l__datatool_AU_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_AU_timevariant_tl
+ { datatool-AU }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_AU_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_AU_timevariant_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%
+%\subsubsection{Time Zone Mappings}
+%Define time zone mapping command for this region:
+% \begin{macrocode}
+\cs_new:Nn \datatool_AU_get_timezone_map:n
+ {
+ \datatool_region_get_timezone_map:n { AU / #1 }
+ }
+% \end{macrocode}
+%Define time zone IDs for this region (one-way map from ID to offset):
+% \begin{macrocode}
+\datatool_region_set_timezone_map:nn { AU / ACST } { +09:30 }
+\datatool_region_set_timezone_map:nn { AU / ACDT } { +10:30 }
+\datatool_region_set_timezone_map:nn { AU / ACWST } { +08:45 }
+\datatool_region_set_timezone_map:nn { AU / ACWDT } { +09:00 }
+\datatool_region_set_timezone_map:nn { AU / AEST } { +10:00 }
+\datatool_region_set_timezone_map:nn { AU / AEDT } { +11:00 }
+\datatool_region_set_timezone_map:nn { AU / CXT } { +07:00 }
+\datatool_region_set_timezone_map:nn { AU / NFT } { +11:00 }
+\datatool_region_set_timezone_map:nn { AU / NFDT } { +12:00 }
+\datatool_region_set_timezone_map:nn { AU / LHST } { +10:30 }
+\datatool_region_set_timezone_map:nn { AU / LHDT } { +11:00 }
+\datatool_region_set_timezone_map:nn { AU / CCT } { +06:30 }
+% \end{macrocode}
+%
+%\subsection{Options}
+%Define options for this region:
+% \begin{macrocode}
+\datatool_locale_define_keys:nn { AU }
+ {
+ number-style .choices:nn =
+ { official, unofficial }
+ {
+ \exp_args:NNe \renewcommand
+ \datatoolAUSetNumberChars
+ {
+ \exp_not:N \bool_if:NT
+ \exp_not:N \l_datatool_region_set_numberchars_bool
+ {
+ \exp_not:c { datatool_AU_set_numberchars_ \l_keys_choice_tl : }
+ }
+ }
+ \tl_if_eq:NnT \l_datatool_current_region_tl { AU }
+ {
+ \datatoolAUSetNumberChars
+ }
+ } ,
+% \end{macrocode}
+% Currency symbol before or after value:
+% \begin{macrocode}
+ currency-symbol-position .choice: ,
+ currency-symbol-position / before .code:n =
+ {
+ \cs_set_eq:NN \datatool_AU_currency_position:nn \dtlcurrprefixfmt
+ } ,
+ currency-symbol-position / after .code:n =
+ {
+ \cs_set_eq:NN \datatool_AU_currency_position:nn \dtlcurrsuffixfmt
+ } ,
+% \end{macrocode}
+% Should the currency symbol be prefixed with the region code:
+% \begin{macrocode}
+ currency-symbol-prefix .choice: ,
+ currency-symbol-prefix / false .code:n =
+ {
+ \cs_set_eq:NN \datatoolAUsymbolprefix \use_none:n
+ } ,
+ currency-symbol-prefix / true .code:n =
+ {
+ \cs_set_eq:NN
+ \datatoolAUsymbolprefix
+ \datatool_currency_symbol_region_prefix:n
+ } ,
+ currency-symbol-prefix .default:n = { true } ,
+% \end{macrocode}
+% Separator between currency symbol (not code) and value:
+% \begin{macrocode}
+ currency-symbol-sep .choice: ,
+ currency-symbol-sep / none .code:n =
+ {
+ \tl_clear:N \l_datatool_AU_sym_sep_tl
+ } ,
+ currency-symbol-sep / thin-space .code:n =
+ {
+ \tl_set:Nn \l_datatool_AU_sym_sep_tl { \, }
+ } ,
+ currency-symbol-sep / space .code:n =
+ {
+ \tl_set:Nn \l_datatool_AU_sym_sep_tl { ~ }
+ } ,
+ currency-symbol-sep / nbsp .code:n =
+ {
+ \tl_set:Nn \l_datatool_AU_sym_sep_tl { \nobreakspace }
+ } ,
+ currency-symbol-sep . initial:n = { none } ,
+% \end{macrocode}
+% Date and time styles:
+% \begin{macrocode}
+ date-style .choice: ,
+ date-style / dmyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_AU_datestyle_tl { ddmmyyyy }
+ } ,
+ date-style / mdyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_AU_datestyle_tl { mmddyyyy }
+ } ,
+ date-style / yyyymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_AU_datestyle_tl { yyyymmdd }
+ } ,
+ date-style / dmyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_AU_datestyle_tl { ddmmyy }
+ } ,
+ date-style / mdyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_AU_datestyle_tl { mmddyy }
+ } ,
+ date-style / yymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_AU_datestyle_tl { yymmdd }
+ } ,
+ date-variant .choice: ,
+ date-variant / slash .code:n =
+ {
+ \tl_set:Nn \l__datatool_AU_datevariant_tl { slash }
+ } ,
+ date-variant / hyphen .code:n =
+ {
+ \tl_set:Nn \l__datatool_AU_datevariant_tl { hyphen }
+ } ,
+ date-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_AU_datevariant_tl { dot }
+ } ,
+ date-variant / dialect .code:n =
+ {
+ \tl_set:Nn \l__datatool_AU_datevariant_tl
+ { \l_datatool_current_language_tl }
+ } ,
+ time-variant .choice: ,
+ time-variant / colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_AU_timevariant_tl { colon }
+ } ,
+ time-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_AU_timevariant_tl { dot }
+ } ,
+ time-variant / dialect .code:n =
+ {
+ \tl_if_eq:NnTF \l__datatool_AU_timevariant_tl { dot }
+ {
+ \tl_set:Nn \l__datatool_AU_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ }
+ {
+ \tl_if_in:NnF
+ \l__datatool_AU_timevariant_tl
+ { \l_datatool_current_language_tl }
+ {
+ \tl_set:Nn \l__datatool_AU_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ }
+ }
+ } ,
+ time-variant / dialect-colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_AU_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ } ,
+ time-variant / dialect-dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_AU_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ } ,
+ }
+% \end{macrocode}
+%
+%\subsection{Hooks}
+%Command to update temporal parsing commands for this region:
+% \begin{macrocode}
+\newcommand \datatoolAUSetTemporalParsers
+ {
+ \renewcommand \DTLCurrentLocaleParseTimeStamp
+ { \datatool_AU_parse_timestamp:NnTF }
+ \renewcommand \DTLCurrentLocaleParseDate
+ { \datatool_AU_parse_date:NnTF }
+ \renewcommand \DTLCurrentLocaleParseTime
+ { \datatool_AU_parse_time:NnTF }
+ \let
+ \DTLCurrentLocaleGetTimeZoneMap
+ \datatool_AU_get_timezone_map:n
+ }
+% \end{macrocode}
+%Set temporal formatting commands for this region. Currently this
+%just resets to the default, but may change in future.
+%Note that the defaults test if the applicable \sty{datetime2}
+%command is available and will fallback on ISO if not defined.
+%Bear in mind that the default style for \sty{datetime2} is
+%\texttt{iso} so there won't be a noticeable difference unless the
+%\sty{datetime2} regional setting is on.
+% \begin{macrocode}
+\newcommand \datatoolAUSetTemporalFormatters
+ {
+ \let
+ \DTLCurrentLocaleFormatDate
+ \datatool_default_date_fmt:nnnn
+ \let
+ \DTLCurrentLocaleFormatTime
+ \datatool_default_time_fmt:nnn
+ \let
+ \DTLCurrentLocaleFormatTimeZone
+ \datatool_default_timezone_fmt:nn
+ \let
+ \DTLCurrentLocaleFormatTimeStampNoZone
+ \datatool_default_timestamp_fmt:nnnnnnn
+ \let
+ \DTLCurrentLocaleFormatTimeStampWithZone
+ \datatool_default_timestamp_fmt:nnnnnnnnn
+ \renewcommand \DTLCurrentLocaleTimeStampFmtSep { ~ }
+ }
+% \end{macrocode}
+%
+%
+%Command to update currency and temporal parsing commands for this region:
+% \begin{macrocode}
+\newcommand \DTLAULocaleHook
+ {
+ \datatoolAUSetNumberChars
+ \datatoolAUSetCurrency
+ \datatoolAUSetTemporalParsers
+ \datatoolAUSetTemporalFormatters
+% \end{macrocode}
+%Allow language files to reference the region:
+% \begin{macrocode}
+ \tl_set:Nn \l_datatool_current_region_tl { AU }
+ }
+% \end{macrocode}
+%
+% Finished with \LaTeX3 syntax.
+% \begin{macrocode}
+\ExplSyntaxOff
+% \end{macrocode}
+%Note that the hook is added to the captions by \sty{datatool-base}
+%not by the region file.
+%\iffalse
+% \begin{macrocode}
+%</datatool-AU.ldf>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+%<*datatool-BE.ldf>
+% \end{macrocode}
+%\fi
+%\section{datatool-BE.ldf}\label{sec:code:datatool-BE}
+% Support for region BE.
+% \begin{macrocode}
+\TrackLangProvidesResource{BE}[2025/03/01 v1.0]
+% \end{macrocode}
+% Switch on \LaTeX3 syntax:
+% \begin{macrocode}
+\ExplSyntaxOn
+% \end{macrocode}
+%
+%\subsection{Numbers and Currency}
+%Default style is to use dot separator and decimal dot.
+%If a French language module is developed, it will need to
+%provide a file called \file{datatool-fr-BE.ldf} which
+%should define a command called
+%\cs{datatoolfrBESetNumberChars} to set the
+%number group separator to a space.
+%(See \file{datatool-en-ZA.ldf} provided with \sty{datatool-english}
+%as an example.)
+% \begin{macrocode}
+\cs_new:Nn \datatool_BE_set_numberchars_default:
+ {
+ \DTLsetnumberchars { . } { , }
+ }
+% \end{macrocode}
+%Thin-space style.
+% \begin{macrocode}
+\cs_new:Nn \datatool_BE_set_numberchars_thinspace:
+ {
+ \datatool_set_thinspace_group_decimal_char:n { . }
+ }
+% \end{macrocode}
+%Check if the dialect has provided a style. If so, use that,
+%otherwise use the default.
+% \begin{macrocode}
+\cs_new:Nn \datatool_BE_set_numberchars_dialect:
+ {
+ \tl_if_empty:NTF \l_datatool_current_language_tl
+ {
+ \datatool_BE_set_numberchars_default:
+ }
+ {
+ \cs_if_exist_use:cF
+ { datatool \l_datatool_current_language_tl BESetNumberChars }
+ {
+ \datatool_BE_set_numberchars_default:
+ }
+ }
+ }
+% \end{macrocode}
+%Hook to set the number group and decimal characters for the region:
+% \begin{macrocode}
+\newcommand \datatoolBESetNumberChars
+ {
+ \bool_if:NT \l_datatool_region_set_numberchars_bool
+ {
+ \datatool_BE_set_numberchars_dialect:
+ }
+ }
+% \end{macrocode}
+% The EUR currency is already defined by \sty{datatool-base}, but we
+% need to register the currency code with this region:
+% \begin{macrocode}
+\datatool_register_regional_currency_code:nn { BE } { EUR }
+% \end{macrocode}
+%How to format the position of the currency symbol in relation to the value.
+% \begin{macrocode}
+\cs_new:Nn \datatool_BE_currency_position:nn
+ {
+ \dtlcurrsuffixfmt { #1 } { #2 }
+ }
+% \end{macrocode}
+%Separator between currency symbol and value.
+% \begin{macrocode}
+\tl_new:N \l_datatool_BE_sym_sep_tl
+% \end{macrocode}
+%
+% Provide a command to set the currency for this region (for use
+% with any hook used when the locale changes).
+% \begin{macrocode}
+\newcommand \datatoolBESetCurrency
+ {
+ \bool_if:NT \l_datatool_region_set_currency_bool
+ {
+ \DTLsetdefaultcurrency { EUR }
+% \end{macrocode}
+%Number of digits that \cs{DTLdecimaltocurrency} should round to:
+% \begin{macrocode}
+ \renewcommand \DTLCurrentLocaleCurrencyDP { 2 }
+% \end{macrocode}
+%Update EUR format to reflect current region style:
+% \begin{macrocode}
+ \renewcommand \DTLdefaultEURcurrencyfmt
+ { \datatool_BE_currency_position:nn }
+% \end{macrocode}
+%Separator between symbol and value:
+% \begin{macrocode}
+ \renewcommand \dtlcurrfmtsymsep { \l_datatool_BE_sym_sep_tl }
+ }
+ }
+% \end{macrocode}
+%
+%\subsection{Date and Time Parsing}
+% Date parsing is more complicated as there seems to be a confusing
+% mixture of ISO, day/month/year and month/day/year formats.
+% The default is year-month-day but may be changed with
+% \cs{DTLsetLocaleOptions}. For example:
+%\begin{dispListing}
+%\DTLsetLocaleOptions{BE}{date-style=dmyyyy, date-variant=slash}
+%\end{dispListing}
+%An appropriate language file will need to also be installed to
+%parse dates containing month names or day of week names.
+%
+% \begin{macrocode}
+\tl_new:N \l__datatool_BE_datevariant_tl
+\tl_set:Nn \l__datatool_BE_datevariant_tl { dot }
+% \end{macrocode}
+%NB These token lists are used to form command names. The following is not
+%a format string.
+% \begin{macrocode}
+\tl_new:N \l__datatool_BE_datestyle_tl
+\tl_set:Nn \l__datatool_BE_datestyle_tl { ddmmyyyy }
+\tl_new:N \l__datatool_BE_timevariant_tl
+\tl_set:Nn \l__datatool_BE_timevariant_tl { colon }
+% \end{macrocode}
+%
+%Each parsing command defined below has final \marg{true} and \marg{false}
+%arguments (\code{TF}). These are used if parsing was successful (true) or if
+%parsing failed (false). The internal commands used by
+%\sty{datatool-base} have no need for solo branches (only \code{T} or only
+%\code{F}) so these commands are simply defined with \verb|\cs_new:Nn|
+%not as conditionals.
+%
+%\subsubsection{Time Stamp Parsing}
+%Use command
+%\begin{definition}
+%\cs{datatool\_}\meta{date-style}\verb|_hhmmss_tz_parse_timestamp:nnNnTF|
+%\end{definition}
+%with date regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{date-variant}\verb|_|\meta{date-style}\verb|_date_regex|
+%\end{definition}
+%and time regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{time-variant}\verb|_hhmmss_time_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_BE_parse_timestamp:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_BE_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_BE_datevariant_tl
+ _
+ \l__datatool_BE_datestyle_tl
+ _date_regex
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_BE_timevariant_tl
+ _hhmmss_time_regex
+ }
+ {
+ \use:c
+ {
+ datatool_
+ \l__datatool_BE_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_BE_datevariant_tl
+ _
+ \l__datatool_BE_datestyle_tl
+ _date_regex
+ }
+ {
+ c_datatool_
+ \l__datatool_BE_timevariant_tl
+ _hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-BE }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_BE_timevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-BE }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_BE_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_BE_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-BE }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_BE_datestyle_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%
+%\subsubsection{Date Parsing}
+%Use command \cs{datatool\_}\meta{style}\verb|_parse_date:NNnTF|
+%with regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{variant}\verb|_anchored_|\meta{style}\verb|_date_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_BE_parse_date:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_BE_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_BE_datevariant_tl
+ _anchored_
+ \l__datatool_BE_datestyle_tl
+ _date_regex
+ }
+ {
+ \exp_args:cc
+ {
+ datatool_
+ \l__datatool_BE_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_BE_datevariant_tl
+ _anchored_
+ \l__datatool_BE_datestyle_tl
+ _date_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-BE }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_BE_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_BE_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-BE }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_BE_datestyle_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%
+%\subsubsection{Time Parsing}
+%Use command \cs{datatool\_}\meta{style}\verb|_parse_time:NNnTF|
+%with regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{variant}\verb|_anchored_|\meta{style}\verb|_time_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_BE_parse_time:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_BE_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ {
+ \datatool_hhmmss_parse_time:cNnTF
+ {
+ c_datatool_
+ \l__datatool_BE_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-BE }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_BE_timevariant_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%
+%\subsubsection{Time Zone Mapping}
+%Define time zone mapping command for this region:
+% \begin{macrocode}
+\cs_new:Nn \datatool_BE_get_timezone_map:n
+ {
+ \datatool_region_get_timezone_map:n { BE / #1 }
+ }
+% \end{macrocode}
+%Define time zone IDs for this region (one-way map from ID to offset):
+% \begin{macrocode}
+\datatool_region_set_timezone_map:nn { BE / WEST } { +01:00 }
+\datatool_region_set_timezone_map:nn { BE / WET } { +00:00 }
+\datatool_region_set_timezone_map:nn { BE / EEST } { +03:00 }
+\datatool_region_set_timezone_map:nn { BE / EET } { +02:00 }
+\datatool_region_set_timezone_map:nn { BE / CEST } { +02:00 }
+\datatool_region_set_timezone_map:nn { BE / CET } { +01:00 }
+\datatool_region_set_timezone_map:nn { BE / GMT } { +00:00 }
+% \end{macrocode}
+%
+%\subsection{Options}
+%Define options for this region:
+% \begin{macrocode}
+\datatool_locale_define_keys:nn { BE }
+ {
+ number-style .choices:nn =
+ { default , dialect , thinspace }
+ {
+ \exp_args:NNe \renewcommand
+ \datatoolBESetNumberChars
+ {
+ \exp_not:N \bool_if:NT
+ \exp_not:N \l_datatool_region_set_numberchars_bool
+ {
+ \exp_not:c { datatool_BE_set_numberchars_ \l_keys_choice_tl : }
+ }
+ }
+ \tl_if_eq:NnT \l_datatool_current_region_tl { BE }
+ {
+ \datatoolBESetNumberChars
+ }
+ } ,
+% \end{macrocode}
+% Currency symbol before or after value:
+% \begin{macrocode}
+ currency-symbol-position .choice: ,
+ currency-symbol-position / before .code:n =
+ {
+ \cs_set_eq:NN \datatool_BE_currency_position:nn \dtlcurrprefixfmt
+ } ,
+ currency-symbol-position / after .code:n =
+ {
+ \cs_set_eq:NN \datatool_BE_currency_position:nn \dtlcurrsuffixfmt
+ } ,
+% \end{macrocode}
+% Separator between currency symbol (not code) and value:
+% \begin{macrocode}
+ currency-symbol-sep .choice: ,
+ currency-symbol-sep / none .code:n =
+ {
+ \tl_clear:N \l_datatool_BE_sym_sep_tl
+ } ,
+ currency-symbol-sep / thin-space .code:n =
+ {
+ \tl_set:Nn \l_datatool_BE_sym_sep_tl { \, }
+ } ,
+ currency-symbol-sep / space .code:n =
+ {
+ \tl_set:Nn \l_datatool_BE_sym_sep_tl { ~ }
+ } ,
+ currency-symbol-sep / nbsp .code:n =
+ {
+ \tl_set:Nn \l_datatool_BE_sym_sep_tl { \nobreakspace }
+ } ,
+ currency-symbol-sep .initial:n = { none } ,
+% \end{macrocode}
+% Date and time styles:
+% \begin{macrocode}
+ date-style .choice: ,
+ date-style / dmyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_BE_datestyle_tl { ddmmyyyy }
+ } ,
+ date-style / mdyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_BE_datestyle_tl { mmddyyyy }
+ } ,
+ date-style / yyyymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_BE_datestyle_tl { yyyymmdd }
+ } ,
+ date-style / dmyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_BE_datestyle_tl { ddmmyy }
+ } ,
+ date-style / mdyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_BE_datestyle_tl { mmddyy }
+ } ,
+ date-style / yymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_BE_datestyle_tl { yymmdd }
+ } ,
+ date-variant .choice: ,
+ date-variant / slash .code:n =
+ {
+ \tl_set:Nn \l__datatool_BE_datevariant_tl { slash }
+ } ,
+ date-variant / hyphen .code:n =
+ {
+ \tl_set:Nn \l__datatool_BE_datevariant_tl { hyphen }
+ } ,
+ date-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_BE_datevariant_tl { dot }
+ } ,
+ date-variant / dialect .code:n =
+ {
+ \tl_set:Nn \l__datatool_BE_datevariant_tl
+ { \l_datatool_current_language_tl }
+ } ,
+ time-variant .choice: ,
+ time-variant / colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_BE_timevariant_tl { colon }
+ } ,
+ time-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_BE_timevariant_tl { dot }
+ } ,
+ time-variant / dialect .code:n =
+ {
+ \tl_if_eq:NnTF \l__datatool_BE_timevariant_tl { dot }
+ {
+ \tl_set:Nn \l__datatool_BE_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ }
+ {
+ \tl_if_in:NnF
+ \l__datatool_BE_timevariant_tl
+ { \l_datatool_current_language_tl }
+ {
+ \tl_set:Nn \l__datatool_BE_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ }
+ }
+ } ,
+ time-variant / dialect-colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_BE_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ } ,
+ time-variant / dialect-dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_BE_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ } ,
+ }
+% \end{macrocode}
+%
+%\subsection{Hooks}
+%Command to update temporal parsing commands for this region:
+% \begin{macrocode}
+\newcommand \datatoolBESetTemporalParsers
+ {
+ \renewcommand \DTLCurrentLocaleParseTimeStamp
+ { \datatool_BE_parse_timestamp:NnTF }
+ \renewcommand \DTLCurrentLocaleParseDate
+ { \datatool_BE_parse_date:NnTF }
+ \renewcommand \DTLCurrentLocaleParseTime
+ { \datatool_BE_parse_time:NnTF }
+ \let
+ \DTLCurrentLocaleGetTimeZoneMap
+ \datatool_BE_get_timezone_map:n
+ }
+% \end{macrocode}
+%Set temporal formatting commands for this region. Currently this
+%just resets to the default, but may change in future.
+%Note that the defaults test if the applicable \sty{datetime2}
+%command is available and will fallback on ISO if not defined.
+%Bear in mind that the default style for \sty{datetime2} is
+%\texttt{iso} so there won't be a noticeable difference unless the
+%\sty{datetime2} regional setting is on.
+% \begin{macrocode}
+\newcommand \datatoolBESetTemporalFormatters
+ {
+ \let
+ \DTLCurrentLocaleFormatDate
+ \datatool_default_date_fmt:nnnn
+ \let
+ \DTLCurrentLocaleFormatTime
+ \datatool_default_time_fmt:nnn
+ \let
+ \DTLCurrentLocaleFormatTimeZone
+ \datatool_default_timezone_fmt:nn
+ \let
+ \DTLCurrentLocaleFormatTimeStampNoZone
+ \datatool_default_timestamp_fmt:nnnnnnn
+ \let
+ \DTLCurrentLocaleFormatTimeStampWithZone
+ \datatool_default_timestamp_fmt:nnnnnnnnn
+ \renewcommand \DTLCurrentLocaleTimeStampFmtSep { ~ }
+ }
+% \end{macrocode}
+%Command to update currency and temporal parsing commands for this region:
+% \begin{macrocode}
+\newcommand \DTLBELocaleHook
+ {
+ \datatoolBESetNumberChars
+ \datatoolBESetCurrency
+ \datatoolBESetTemporalParsers
+ \datatoolBESetTemporalFormatters
+% \end{macrocode}
+%Allow language files to reference the region:
+% \begin{macrocode}
+ \tl_set:Nn \l_datatool_current_region_tl { BE }
+ }
+% \end{macrocode}
+%
+% Finished with \LaTeX3 syntax.
+% \begin{macrocode}
+\ExplSyntaxOff
+% \end{macrocode}
+%Note that the hook is added to the captions by \sty{datatool-base}
+%not by the region file.
+%\iffalse
+% \begin{macrocode}
+%</datatool-BE.ldf>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+%<*datatool-CA.ldf>
+% \end{macrocode}
+%\fi
+%\section{datatool-CA.ldf}\label{sec:code:datatool-CA}
+% Support for region CA.
+% \begin{macrocode}
+\TrackLangProvidesResource{CA}[2025/03/01 v1.0]
+% \end{macrocode}
+% Switch on \LaTeX3 syntax:
+% \begin{macrocode}
+\ExplSyntaxOn
+% \end{macrocode}
+%
+%\subsection{Numbers and Currency}
+% NB the number group and decimal symbols for this region should be
+% set in the files \file{datatool-en-CA.ldf} and
+% \file{datatool-fr-CA.ldf} as they depend on both the language
+% and region. Those files should be included in the applicable
+% \sty{datatool} language module. For example,
+% \file{datatool-en-CA.ldf} is provided with
+% \file{datatool-english}.
+% However, a region hook is still needed to support
+%\verb|\DTLsetup{numeric={region-number-chars}}| although it's not
+%added to the language hook:
+% \begin{macrocode}
+\newcommand \datatoolCASetNumberChars
+ {
+ \bool_if:NT \l_datatool_region_set_numberchars_bool
+ {
+ \tl_if_empty:NTF \l_datatool_current_language_tl
+ {
+ \datatool_locale_warn:nn { datatool-CA }
+ {
+ No ~ current ~ language: ~ can't ~ set ~
+ number ~ group ~ and ~ decimal ~ characters
+ }
+ }
+ {
+ \cs_if_exist_use:cF
+ { datatool \l_datatool_current_language_tl CASetNumberChars }
+ {
+ \datatool_locale_warn:nn { datatool-CA }
+ {
+ No ~ support ~ for ~ locale ~
+ ` \l_datatool_current_language_tl - CA': ~ can't ~ set ~
+ number ~ group ~ and ~ decimal ~ characters
+ }
+ }
+ }
+ }
+ }
+% \end{macrocode}
+%How to format the position of the currency symbol in relation to the value.
+% \begin{macrocode}
+\cs_new:Nn \datatool_CA_currency_position:nn
+ {
+ \dtlcurrprefixfmt { #1 } { #2 }
+ }
+% \end{macrocode}
+%Separator between currency symbol and value.
+% \begin{macrocode}
+\tl_new:N \l_datatool_CA_sym_sep_tl
+% \end{macrocode}
+% Set the currency format for this region.
+% \begin{macrocode}
+\newcommand \datatoolCAcurrencyfmt [ 2 ]
+ {
+ \datatool_CA_currency_position:nn
+ {
+ \datatoolCAsymbolprefix { CA }
+ #1
+ }
+ { #2 }
+ }
+% \end{macrocode}
+%Prefix for symbol, if required.
+% \begin{macrocode}
+\newcommand \datatoolCAsymbolprefix [ 1 ] { }
+% \end{macrocode}
+% Define the currency symbols for this region.
+% \begin{macrocode}
+\datatool_def_currency:nnnV
+ { \datatoolCAcurrencyfmt }
+ { CAD }
+ { \$ }
+ \c_dollar_str
+% \end{macrocode}
+%Register the currency code with this region:
+% \begin{macrocode}
+\datatool_register_regional_currency_code:nn { CA } { CAD }
+% \end{macrocode}
+% Provide a command to set the currency for this region (for use
+% with any hook used when the locale changes).
+% NB this should do nothing with
+% \verb|\DTLsetup{region-currency=false}|
+% \begin{macrocode}
+\newcommand \datatoolCASetCurrency
+ {
+ \bool_if:NT \l_datatool_region_set_currency_bool
+ {
+ \DTLsetdefaultcurrency { CAD }
+% \end{macrocode}
+%Number of digits that \cs{DTLdecimaltocurrency} should round to:
+% \begin{macrocode}
+ \renewcommand \DTLCurrentLocaleCurrencyDP { 2 }
+% \end{macrocode}
+%Separator between symbol and value:
+% \begin{macrocode}
+ \renewcommand \dtlcurrfmtsymsep { \l_datatool_CA_sym_sep_tl }
+ }
+ }
+% \end{macrocode}
+%\subsection{Date and Time Parsing}
+% Date parsing is more complicated as there seems to be a confusing
+% mixture of ISO, day/month/year and month/day/year formats.
+% This defaults to year-month-day and should be changed as
+% appropriate using \cs{DTLsetLocaleOptions}. For example:
+%\begin{dispListing}
+%\DTLsetLocaleOptions{CA}{date-style=dmyyyy, date-variant=slash}
+%\end{dispListing}
+%An appropriate language file will need to also be installed to
+%parse dates containing month names or day of week names.
+%
+% Provide a way to configure parsing style.
+% \begin{macrocode}
+\tl_new:N \l__datatool_CA_datevariant_tl
+\tl_set:Nn \l__datatool_CA_datevariant_tl { hyphen }
+% \end{macrocode}
+%NB These token lists are used to form command names. The following is not
+%a format string.
+% \begin{macrocode}
+\tl_new:N \l__datatool_CA_datestyle_tl
+\tl_set:Nn \l__datatool_CA_datestyle_tl { yyyymmdd }
+\tl_new:N \l__datatool_CA_timevariant_tl
+\tl_set:Nn \l__datatool_CA_timevariant_tl { colon }
+% \end{macrocode}
+%
+%Each parsing command defined below has final \marg{true} and \marg{false}
+%arguments (\code{TF}). These are used if parsing was successful (true) or if
+%parsing failed (false). The internal commands used by
+%\sty{datatool-base} have no need for solo branches (only \code{T} or only
+%\code{F}) so these commands are simply defined with \verb|\cs_new:Nn|
+%not as conditionals.
+%
+%\subsubsection{Time Stamp Parsing}
+%Use command
+%\begin{definition}
+%\cs{datatool\_}\meta{date-style}\verb|_hhmmss_tz_parse_timestamp:nnNnTF|
+%\end{definition}
+%with date regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{date-variant}\verb|_|\meta{date-style}\verb|_date_regex|
+%\end{definition}
+%and time regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{time-variant}\verb|_hhmmss_time_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_CA_parse_timestamp:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_CA_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_CA_datevariant_tl
+ _
+ \l__datatool_CA_datestyle_tl
+ _date_regex
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_CA_timevariant_tl
+ _hhmmss_time_regex
+ }
+ {
+ \use:c
+ {
+ datatool_
+ \l__datatool_CA_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_CA_datevariant_tl
+ _
+ \l__datatool_CA_datestyle_tl
+ _date_regex
+ }
+ {
+ c_datatool_
+ \l__datatool_CA_timevariant_tl
+ _hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-CA }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_CA_timevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-CA }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_CA_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_CA_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-CA }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_CA_datestyle_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%\subsubsection{Date Parsing}
+%Use command \cs{datatool\_}\meta{style}\verb|_parse_date:NNnTF|
+%with regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{variant}\verb|_anchored_|\meta{style}\verb|_date_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_CA_parse_date:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_CA_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_CA_datevariant_tl
+ _anchored_
+ \l__datatool_CA_datestyle_tl
+ _date_regex
+ }
+ {
+ \exp_args:cc
+ {
+ datatool_
+ \l__datatool_CA_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_CA_datevariant_tl
+ _anchored_
+ \l__datatool_CA_datestyle_tl
+ _date_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-CA }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_CA_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_CA_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-CA }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_CA_datestyle_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%\subsubsection{Time Parsing}
+%Use command \cs{datatool\_}\meta{style}\verb|_parse_time:NNnTF|
+%with regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{variant}\verb|_anchored_|\meta{style}\verb|_time_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_CA_parse_time:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_CA_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ {
+ \datatool_hhmmss_parse_time:cNnTF
+ {
+ c_datatool_
+ \l__datatool_CA_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-CA }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_CA_timevariant_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%\subsubsection{Time Zone Mappings}
+%Define time zone mapping command for this region:
+% \begin{macrocode}
+\cs_new:Nn \datatool_CA_get_timezone_map:n
+ {
+ \datatool_region_get_timezone_map:n { CA / #1 }
+ }
+% \end{macrocode}
+%Define time zone IDs for this region (one-way map from ID to offset):
+% \begin{macrocode}
+\datatool_region_set_timezone_map:nn { CA / NDT } { -02:30 }
+\datatool_region_set_timezone_map:nn { CA / NST } { -03:30 }
+\datatool_region_set_timezone_map:nn { CA / AST } { -04:00 }
+\datatool_region_set_timezone_map:nn { CA / ADT } { -03:00 }
+\datatool_region_set_timezone_map:nn { CA / EST } { -05:00 }
+\datatool_region_set_timezone_map:nn { CA / EDT } { -04:00 }
+\datatool_region_set_timezone_map:nn { CA / CST } { -06:00 }
+\datatool_region_set_timezone_map:nn { CA / CDT } { -05:00 }
+\datatool_region_set_timezone_map:nn { CA / MST } { -07:00 }
+\datatool_region_set_timezone_map:nn { CA / MDT } { -06:00 }
+\datatool_region_set_timezone_map:nn { CA / PST } { -08:00 }
+\datatool_region_set_timezone_map:nn { CA / PDT } { -07:00 }
+% \end{macrocode}
+%\subsection{Options}
+%Define options for this region:
+% \begin{macrocode}
+\datatool_locale_define_keys:nn { CA }
+ {
+ number-style .code:n =
+ {
+ \exp_args:Ne \keys_if_exist:nnTF
+ { datatool / locale / \l_datatool_current_language_tl - CA }
+ { number-style }
+ {
+ \exp_args:Ne \keys_set:nn
+ { datatool / locale / \l_datatool_current_language_tl - CA }
+ { number-style = { #1 } }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-CA }
+ {
+ No ~ number-style ~ available ~ for ~ current ~ language ~
+ ` \l_datatool_current_language_tl ' ~
+ (additional ~ language ~ module ~ may ~ need ~ installing)
+ }
+ }
+ } ,
+% \end{macrocode}
+% Currency symbol before or after value:
+% \begin{macrocode}
+ currency-symbol-position .choice: ,
+ currency-symbol-position / before .code:n =
+ {
+ \cs_set_eq:NN \datatool_CA_currency_position:nn \dtlcurrprefixfmt
+ } ,
+ currency-symbol-position / after .code:n =
+ {
+ \cs_set_eq:NN \datatool_CA_currency_position:nn \dtlcurrsuffixfmt
+ } ,
+% \end{macrocode}
+% Should the currency symbol be prefixed with the region code:
+% \begin{macrocode}
+ currency-symbol-prefix .choice: ,
+ currency-symbol-prefix / false .code:n =
+ {
+ \cs_set_eq:NN \datatoolCAsymbolprefix \use_none:n
+ } ,
+ currency-symbol-prefix / true .code:n =
+ {
+ \cs_set_eq:NN
+ \datatoolCAsymbolprefix
+ \datatool_currency_symbol_region_prefix:n
+ } ,
+ currency-symbol-prefix .default:n = { true } ,
+% \end{macrocode}
+% Separator between currency symbol (not code) and value:
+% \begin{macrocode}
+ currency-symbol-sep .choice: ,
+ currency-symbol-sep / none .code:n =
+ {
+ \tl_clear:N \l_datatool_CA_sym_sep_tl
+ } ,
+ currency-symbol-sep / thin-space .code:n =
+ {
+ \tl_set:Nn \l_datatool_CA_sym_sep_tl { \, }
+ } ,
+ currency-symbol-sep / space .code:n =
+ {
+ \tl_set:Nn \l_datatool_CA_sym_sep_tl { ~ }
+ } ,
+ currency-symbol-sep / nbsp .code:n =
+ {
+ \tl_set:Nn \l_datatool_CA_sym_sep_tl { \nobreakspace }
+ } ,
+ currency-symbol-sep .initial:n = { none } ,
+% \end{macrocode}
+% Date and time styles:
+% \begin{macrocode}
+ date-style .choice: ,
+ date-style / dmyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_CA_datestyle_tl { ddmmyyyy }
+ } ,
+ date-style / mdyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_CA_datestyle_tl { mmddyyyy }
+ } ,
+ date-style / yyyymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_CA_datestyle_tl { yyyymmdd }
+ } ,
+ date-style / dmyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_CA_datestyle_tl { ddmmyy }
+ } ,
+ date-style / mdyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_CA_datestyle_tl { mmddyy }
+ } ,
+ date-style / yymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_CA_datestyle_tl { yymmdd }
+ } ,
+ date-variant .choice: ,
+ date-variant / slash .code:n =
+ {
+ \tl_set:Nn \l__datatool_CA_datevariant_tl { slash }
+ } ,
+ date-variant / hyphen .code:n =
+ {
+ \tl_set:Nn \l__datatool_CA_datevariant_tl { hyphen }
+ } ,
+ date-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_CA_datevariant_tl { dot }
+ } ,
+ date-variant / dialect .code:n =
+ {
+ \tl_set:Nn \l__datatool_CA_datevariant_tl
+ { \l_datatool_current_language_tl }
+ } ,
+ time-variant .choice: ,
+ time-variant / colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_CA_timevariant_tl { colon }
+ } ,
+ time-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_CA_timevariant_tl { dot }
+ } ,
+ time-variant / dialect .code:n =
+ {
+ \tl_if_eq:NnTF \l__datatool_CA_timevariant_tl { dot }
+ {
+ \tl_set:Nn \l__datatool_CA_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ }
+ {
+ \tl_if_in:NnF
+ \l__datatool_CA_timevariant_tl
+ { \l_datatool_current_language_tl }
+ {
+ \tl_set:Nn \l__datatool_CA_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ }
+ }
+ } ,
+ time-variant / dialect-colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_CA_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ } ,
+ time-variant / dialect-dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_CA_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ } ,
+ }
+% \end{macrocode}
+%
+%\subsection{Hooks}
+%Command to update temporal parsing commands for this region:
+% \begin{macrocode}
+\newcommand \datatoolCASetTemporalParsers
+ {
+ \renewcommand \DTLCurrentLocaleParseTimeStamp
+ { \datatool_CA_parse_timestamp:NnTF }
+ \renewcommand \DTLCurrentLocaleParseDate
+ { \datatool_CA_parse_date:NnTF }
+ \renewcommand \DTLCurrentLocaleParseTime
+ { \datatool_CA_parse_time:NnTF }
+ \let
+ \DTLCurrentLocaleGetTimeZoneMap
+ \datatool_CA_get_timezone_map:n
+ }
+% \end{macrocode}
+%Set temporal formatting commands for this region. Currently this
+%just resets to the default, but may change in future.
+%Note that the defaults test if the applicable \sty{datetime2}
+%command is available and will fallback on ISO if not defined.
+%Bear in mind that the default style for \sty{datetime2} is
+%\texttt{iso} so there won't be a noticeable difference unless the
+%\sty{datetime2} regional setting is on.
+% \begin{macrocode}
+\newcommand \datatoolCASetTemporalFormatters
+ {
+ \let
+ \DTLCurrentLocaleFormatDate
+ \datatool_default_date_fmt:nnnn
+ \let
+ \DTLCurrentLocaleFormatTime
+ \datatool_default_time_fmt:nnn
+ \let
+ \DTLCurrentLocaleFormatTimeZone
+ \datatool_default_timezone_fmt:nn
+ \let
+ \DTLCurrentLocaleFormatTimeStampNoZone
+ \datatool_default_timestamp_fmt:nnnnnnn
+ \let
+ \DTLCurrentLocaleFormatTimeStampWithZone
+ \datatool_default_timestamp_fmt:nnnnnnnnn
+ \renewcommand \DTLCurrentLocaleTimeStampFmtSep { ~ }
+ }
+% \end{macrocode}
+%
+%Command to update currency and temporal parsing commands for this region:
+% \begin{macrocode}
+\newcommand \DTLCALocaleHook
+ {
+ \datatoolCASetCurrency
+ \datatoolCASetTemporalParsers
+ \datatoolCASetTemporalFormatters
+% \end{macrocode}
+%Allow language files to reference the region:
+% \begin{macrocode}
+ \tl_set:Nn \l_datatool_current_region_tl { CA }
+ }
+% \end{macrocode}
+%
+% Finished with \LaTeX3 syntax.
+% \begin{macrocode}
+\ExplSyntaxOff
+% \end{macrocode}
+%Note that the hook is added to the captions by \sty{datatool-base}
+%not by the region file.
+%\iffalse
+% \begin{macrocode}
+%</datatool-CA.ldf>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+%<*datatool-FK.ldf>
+% \end{macrocode}
+%\fi
+%\section{datatool-FK.ldf}\label{sec:datatool-FK}
+% Support for region FK.
+% \begin{macrocode}
+\TrackLangProvidesResource{FK}[2025/03/01 v1.0]
+% \end{macrocode}
+% Switch on \LaTeX3 syntax:
+% \begin{macrocode}
+\ExplSyntaxOn
+% \end{macrocode}
+%
+%\subsection{Numbers and Currency}
+%Set the number group and decimal symbols for this region.
+% \begin{macrocode}
+\cs_new:Nn \datatool_FK_set_numberchars_official:
+ {
+ \datatool_set_numberchars:nn { , } { . }
+ }
+% \end{macrocode}
+%Unofficial style.
+% \begin{macrocode}
+\cs_new:Nn \datatool_FK_set_numberchars_unofficial:
+ {
+ \datatool_set_thinspace_group_decimal_char:n { . }
+ }
+% \end{macrocode}
+%Hook to set the number group and decimal characters for the region:
+% \begin{macrocode}
+\newcommand \datatoolFKSetNumberChars
+ {
+ \bool_if:NT \l_datatool_region_set_numberchars_bool
+ {
+ \datatool_FK_set_numberchars_official:
+ }
+ }
+% \end{macrocode}
+%How to format the position of the currency symbol in relation to the value.
+% \begin{macrocode}
+\cs_new:Nn \datatool_FK_currency_position:nn
+ {
+ \dtlcurrprefixfmt { #1 } { #2 }
+ }
+% \end{macrocode}
+%Separator between currency symbol and value.
+% \begin{macrocode}
+\tl_new:N \l_datatool_FK_sym_sep_tl
+% \end{macrocode}
+% Set the currency format for this region.
+% \begin{macrocode}
+\newcommand \datatoolFKcurrencyfmt [ 2 ]
+ {
+ \datatool_FK_currency_position:nn
+ {
+ \datatoolFKsymbolprefix { FK }
+ #1
+ }
+ { #2 }
+ }
+% \end{macrocode}
+%Prefix for symbol, if required.
+% \begin{macrocode}
+\newcommand \datatoolFKsymbolprefix [ 1 ] { }
+% \end{macrocode}
+% Define the currency symbols for this region.
+% \begin{macrocode}
+\datatool_def_currency:nnnV
+ { \datatoolFKcurrencyfmt }
+ { FKP }
+ { \pounds }
+ \l_datatool_pound_tl
+% \end{macrocode}
+% Register the currency code with this region:
+% \begin{macrocode}
+\datatool_register_regional_currency_code:nn { FK } { FKP }
+% \end{macrocode}
+% Provide a command to set the currency for this region (for use
+% with any hook used when the locale changes).
+% NB this should do nothing with
+% \verb|\DTLsetup{region-currency=false}|
+% \begin{macrocode}
+\newcommand \datatoolFKSetCurrency
+ {
+ \bool_if:NT \l_datatool_region_set_currency_bool
+ {
+ \DTLsetdefaultcurrency { FKP }
+% \end{macrocode}
+%Number of digits that \cs{DTLdecimaltocurrency} should round to:
+% \begin{macrocode}
+ \renewcommand \DTLCurrentLocaleCurrencyDP { 2 }
+% \end{macrocode}
+%Separator between symbol and value:
+% \begin{macrocode}
+ \renewcommand \dtlcurrfmtsymsep { \l_datatool_FK_sym_sep_tl }
+ }
+ }
+% \end{macrocode}
+%
+%\subsection{Date and Time Parsing}
+% This defaults to day/month/year but may be changed with \cs{DTLsetLocaleOptions}. For example:
+%\begin{dispListing}
+%\DTLsetLocaleOptions{FK}{date-style=dmyyyy, date-variant=slash}
+%\end{dispListing}
+%An appropriate language file will need to also be installed to
+%parse dates containing month names or day of week names.
+%
+%Provide a way to configure parsing style.
+% \begin{macrocode}
+\tl_new:N \l__datatool_FK_datevariant_tl
+\tl_set:Nn \l__datatool_FK_datevariant_tl { slash }
+% \end{macrocode}
+%NB These token lists are used to form command names. The following is not
+%a format string.
+% \begin{macrocode}
+\tl_new:N \l__datatool_FK_datestyle_tl
+\tl_set:Nn \l__datatool_FK_datestyle_tl { ddmmyyyy }
+\tl_new:N \l__datatool_FK_timevariant_tl
+\tl_set:Nn \l__datatool_FK_timevariant_tl { colon }
+% \end{macrocode}
+%
+%Each parsing command defined below has final \marg{true} and \marg{false}
+%arguments (\code{TF}). These are used if parsing was successful (true) or if
+%parsing failed (false). The internal commands used by
+%\sty{datatool-base} have no need for solo branches (only \code{T} or only
+%\code{F}) so these commands are simply defined with \verb|\cs_new:Nn|
+%not as conditionals.
+%
+%\subsubsection{Time Stamp Parsing}
+%Use command
+%\begin{definition}
+%\cs{datatool\_}\meta{date-style}\verb|_hhmmss_tz_parse_timestamp:nnNnTF|
+%\end{definition}
+%with date regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{date-variant}\verb|_|\meta{date-style}\verb|_date_regex|
+%\end{definition}
+%and time regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{time-variant}\verb|_hhmmss_time_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_FK_parse_timestamp:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_FK_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_FK_datevariant_tl
+ _
+ \l__datatool_FK_datestyle_tl
+ _date_regex
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_FK_timevariant_tl
+ _hhmmss_time_regex
+ }
+ {
+ \use:c
+ {
+ datatool_
+ \l__datatool_FK_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_FK_datevariant_tl
+ _
+ \l__datatool_FK_datestyle_tl
+ _date_regex
+ }
+ {
+ c_datatool_
+ \l__datatool_FK_timevariant_tl
+ _hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_FK_timevariant_tl
+ { datatool-FK }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_FK_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_FK_timevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_FK_datevariant_tl
+ { datatool-FK }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_FK_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_FK_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_FK_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-FK }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_FK_datestyle_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%
+%\subsubsection{Date Parsing}
+%Use command \cs{datatool\_}\meta{style}\verb|_parse_date:NNnTF|
+%with regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{variant}\verb|_anchored_|\meta{style}\verb|_date_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_FK_parse_date:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_FK_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_FK_datevariant_tl
+ _anchored_
+ \l__datatool_FK_datestyle_tl
+ _date_regex
+ }
+ {
+ \exp_args:cc
+ {
+ datatool_
+ \l__datatool_FK_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_FK_datevariant_tl
+ _anchored_
+ \l__datatool_FK_datestyle_tl
+ _date_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_FK_datevariant_tl
+ { datatool-FK }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_FK_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_FK_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_FK_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-FK }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_FK_datestyle_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%
+%\subsubsection{Time Parsing}
+%Use command \cs{datatool\_}\meta{style}\verb|_parse_time:NNnTF|
+%with regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{variant}\verb|_anchored_|\meta{style}\verb|_time_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_FK_parse_time:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_FK_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ {
+ \datatool_hhmmss_parse_time:cNnTF
+ {
+ c_datatool_
+ \l__datatool_FK_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_FK_timevariant_tl
+ { datatool-FK }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_FK_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_FK_timevariant_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%
+%\subsubsection{Time Zone Mappings}
+%Define time zone mapping command for this region:
+% \begin{macrocode}
+\cs_new:Nn \datatool_FK_get_timezone_map:n
+ {
+ \datatool_region_get_timezone_map:n { FK / #1 }
+ }
+% \end{macrocode}
+%Define time zone IDs for this region (one-way map from ID to offset):
+% \begin{macrocode}
+\datatool_region_set_timezone_map:nn { FK / BST } { +01:00 }
+\datatool_region_set_timezone_map:nn { FK / FKST } { -03:00 }
+\datatool_region_set_timezone_map:nn { FK / GMT } { +00:00 }
+% \end{macrocode}
+%
+%\subsection{Options}
+%Define options for this region:
+% \begin{macrocode}
+\datatool_locale_define_keys:nn { FK }
+ {
+ number-style .choices:nn =
+ { official, unofficial }
+ {
+ \exp_args:NNe \renewcommand
+ \datatoolFKSetNumberChars
+ {
+ \exp_not:N \bool_if:NT
+ \exp_not:N \l_datatool_region_set_numberchars_bool
+ {
+ \exp_not:c { datatool_FK_set_numberchars_ \l_keys_choice_tl : }
+ }
+ }
+ \tl_if_eq:NnT \l_datatool_current_region_tl { FK }
+ {
+ \datatoolFKSetNumberChars
+ }
+ } ,
+% \end{macrocode}
+% Currency symbol before or after value:
+% \begin{macrocode}
+ currency-symbol-position .choice: ,
+ currency-symbol-position / before .code:n =
+ {
+ \cs_set_eq:NN \datatool_FK_currency_position:nn \dtlcurrprefixfmt
+ } ,
+ currency-symbol-position / after .code:n =
+ {
+ \cs_set_eq:NN \datatool_FK_currency_position:nn \dtlcurrsuffixfmt
+ } ,
+% \end{macrocode}
+% Should the currency symbol be prefixed with the region code:
+% \begin{macrocode}
+ currency-symbol-prefix .choice: ,
+ currency-symbol-prefix / false .code:n =
+ {
+ \cs_set_eq:NN \datatoolFKsymbolprefix \use_none:n
+ } ,
+ currency-symbol-prefix / true .code:n =
+ {
+ \cs_set_eq:NN
+ \datatoolFKsymbolprefix
+ \datatool_currency_symbol_region_prefix:n
+ } ,
+ currency-symbol-prefix .default:n = { true } ,
+% \end{macrocode}
+% Separator between currency symbol (not code) and value:
+% \begin{macrocode}
+ currency-symbol-sep .choice: ,
+ currency-symbol-sep / none .code:n =
+ {
+ \tl_clear:N \l_datatool_FK_sym_sep_tl
+ } ,
+ currency-symbol-sep / thin-space .code:n =
+ {
+ \tl_set:Nn \l_datatool_FK_sym_sep_tl { \, }
+ } ,
+ currency-symbol-sep / space .code:n =
+ {
+ \tl_set:Nn \l_datatool_FK_sym_sep_tl { ~ }
+ } ,
+ currency-symbol-sep / nbsp .code:n =
+ {
+ \tl_set:Nn \l_datatool_FK_sym_sep_tl { \nobreakspace }
+ } ,
+ currency-symbol-sep . initial:n = { none } ,
+% \end{macrocode}
+% Date and time styles:
+% \begin{macrocode}
+ date-style .choice: ,
+ date-style / dmyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_FK_datestyle_tl { ddmmyyyy }
+ } ,
+ date-style / mdyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_FK_datestyle_tl { mmddyyyy }
+ } ,
+ date-style / yyyymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_FK_datestyle_tl { yyyymmdd }
+ } ,
+ date-style / dmyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_FK_datestyle_tl { ddmmyy }
+ } ,
+ date-style / mdyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_FK_datestyle_tl { mmddyy }
+ } ,
+ date-style / yymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_FK_datestyle_tl { yymmdd }
+ } ,
+ date-variant .choice: ,
+ date-variant / slash .code:n =
+ {
+ \tl_set:Nn \l__datatool_FK_datevariant_tl { slash }
+ } ,
+ date-variant / hyphen .code:n =
+ {
+ \tl_set:Nn \l__datatool_FK_datevariant_tl { hyphen }
+ } ,
+ date-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_FK_datevariant_tl { dot }
+ } ,
+ date-variant / dialect .code:n =
+ {
+ \tl_set:Nn \l__datatool_FK_datevariant_tl
+ { \l_datatool_current_language_tl }
+ } ,
+ time-variant .choice: ,
+ time-variant / colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_FK_timevariant_tl { colon }
+ } ,
+ time-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_FK_timevariant_tl { dot }
+ } ,
+ time-variant / dialect .code:n =
+ {
+ \tl_if_eq:NnTF \l__datatool_FK_timevariant_tl { dot }
+ {
+ \tl_set:Nn \l__datatool_FK_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ }
+ {
+ \tl_if_in:NnF
+ \l__datatool_FK_timevariant_tl
+ { \l_datatool_current_language_tl }
+ {
+ \tl_set:Nn \l__datatool_FK_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ }
+ }
+ } ,
+ time-variant / dialect-colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_FK_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ } ,
+ time-variant / dialect-dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_FK_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ } ,
+ }
+% \end{macrocode}
+%
+%\subsection{Hooks}
+%Command to update temporal parsing commands for this region:
+% \begin{macrocode}
+\newcommand \datatoolFKSetTemporalParsers
+ {
+ \renewcommand \DTLCurrentLocaleParseTimeStamp
+ { \datatool_FK_parse_timestamp:NnTF }
+ \renewcommand \DTLCurrentLocaleParseDate
+ { \datatool_FK_parse_date:NnTF }
+ \renewcommand \DTLCurrentLocaleParseTime
+ { \datatool_FK_parse_time:NnTF }
+ \let
+ \DTLCurrentLocaleGetTimeZoneMap
+ \datatool_FK_get_timezone_map:n
+ }
+% \end{macrocode}
+%Set temporal formatting commands for this region. Currently this
+%just resets to the default, but may change in future.
+%Note that the defaults test if the applicable \sty{datetime2}
+%command is available and will fallback on ISO if not defined.
+%Bear in mind that the default style for \sty{datetime2} is
+%\texttt{iso} so there won't be a noticeable difference unless the
+%\sty{datetime2} regional setting is on.
+% \begin{macrocode}
+\newcommand \datatoolFKSetTemporalFormatters
+ {
+ \let
+ \DTLCurrentLocaleFormatDate
+ \datatool_default_date_fmt:nnnn
+ \let
+ \DTLCurrentLocaleFormatTime
+ \datatool_default_time_fmt:nnn
+ \let
+ \DTLCurrentLocaleFormatTimeZone
+ \datatool_default_timezone_fmt:nn
+ \let
+ \DTLCurrentLocaleFormatTimeStampNoZone
+ \datatool_default_timestamp_fmt:nnnnnnn
+ \let
+ \DTLCurrentLocaleFormatTimeStampWithZone
+ \datatool_default_timestamp_fmt:nnnnnnnnn
+ \renewcommand \DTLCurrentLocaleTimeStampFmtSep { ~ }
+ }
+% \end{macrocode}
+%
+%
+%Command to update currency and temporal parsing commands for this region:
+% \begin{macrocode}
+\newcommand \DTLFKLocaleHook
+ {
+ \datatoolFKSetNumberChars
+ \datatoolFKSetCurrency
+ \datatoolFKSetTemporalParsers
+ \datatoolFKSetTemporalFormatters
+% \end{macrocode}
+%Allow language files to reference the region:
+% \begin{macrocode}
+ \tl_set:Nn \l_datatool_current_region_tl { FK }
+ }
+% \end{macrocode}
+%
+% Finished with \LaTeX3 syntax.
+% \begin{macrocode}
+\ExplSyntaxOff
+% \end{macrocode}
+%Note that the hook is added to the captions by \sty{datatool-base}
+%not by the region file.
+%\iffalse
+% \begin{macrocode}
+%</datatool-FK.ldf>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+%<*datatool-GB.ldf>
+% \end{macrocode}
+%\fi
+%\section{datatool-GB.ldf}\label{sec:datatool-GB}
+% Support for region GB.
+% \begin{macrocode}
+\TrackLangProvidesResource{GB}[2025/03/01 v1.0]
+% \end{macrocode}
+% Switch on \LaTeX3 syntax:
+% \begin{macrocode}
+\ExplSyntaxOn
+% \end{macrocode}
+%\subsection{Numbers and Currency}
+% Set the number group and decimal symbols for this region.
+%Official style has comma number group and decimal dot.
+% \begin{macrocode}
+\cs_new:Nn \datatool_GB_set_numberchars_official:
+ {
+ \DTLsetnumberchars { , } { . }
+ }
+% \end{macrocode}
+% This will allow a normal space, \cs{,} (thin space command) or
+% the thin space Unicode character U+2009 as the number group separator when
+% parsing and will use \cs{,} when formatting.
+% \begin{macrocode}
+\cs_new:Nn \datatool_GB_set_numberchars_education:
+ {
+ \datatool_set_thinspace_group_decimal_char:n { . }
+ }
+% \end{macrocode}
+%Old style uses mid-dot as the decimal point but allows both middle
+%dot and low dot when parsing.
+% \begin{macrocode}
+\cs_new:Nn \datatool_GB_set_numberchars_old:
+ {
+ \datatool_set_numberchars_tl_regex:nnnn
+ { , } { \textperiodcentered }
+ { , } { \x{2E} | \u{l_datatool_middot_tl} | \c{textperiodcentered} }
+ }
+% \end{macrocode}
+%Hook to set the number group and decimal characters for the region:
+% \begin{macrocode}
+\newcommand \datatoolGBSetNumberChars
+ {
+ \bool_if:NT \l_datatool_region_set_numberchars_bool
+ {
+ \datatool_GB_set_numberchars_official:
+ }
+ }
+% \end{macrocode}
+%How to format the position of the currency symbol in relation to the value.
+% \begin{macrocode}
+\cs_new:Nn \datatool_GB_currency_position:nn
+ {
+ \dtlcurrprefixfmt { #1 } { #2 }
+ }
+% \end{macrocode}
+%Separator between currency symbol and value.
+% \begin{macrocode}
+\tl_new:N \l_datatool_GB_sym_sep_tl
+% \end{macrocode}
+% Set the currency format for this region.
+% \begin{macrocode}
+\newcommand \datatoolGBcurrencyfmt [ 2 ]
+ {
+ \datatool_GB_currency_position:nn
+ {
+ \datatoolGBsymbolprefix { GB }
+ #1
+ }
+ { #2 }
+ }
+% \end{macrocode}
+%Prefix for symbol, if required.
+% \begin{macrocode}
+\newcommand \datatoolGBsymbolprefix [ 1 ] { }
+% \end{macrocode}
+% Define the currency symbols for this region.
+% \begin{macrocode}
+\datatool_def_currency:nnnV
+ { \datatoolGBcurrencyfmt }
+ { GBP }
+ { \pounds }
+ \l_datatool_pound_tl
+% \end{macrocode}
+%Register the currency code with this region:
+% \begin{macrocode}
+\datatool_register_regional_currency_code:nn { GB } { GBP }
+% \end{macrocode}
+% Provide a command to set the currency for this region (for use
+% with any hook used when the locale changes).
+% NB this should do nothing with
+% \verb|\DTLsetup{region-currency=false}|
+% \begin{macrocode}
+\newcommand \datatoolGBSetCurrency
+ {
+ \bool_if:NT \l_datatool_region_set_currency_bool
+ {
+ \DTLsetdefaultcurrency { GBP }
+% \end{macrocode}
+%Number of digits that \cs{DTLdecimaltocurrency} should round to:
+% \begin{macrocode}
+ \renewcommand \DTLCurrentLocaleCurrencyDP { 2 }
+% \end{macrocode}
+%Separator between symbol and value:
+% \begin{macrocode}
+ \renewcommand \dtlcurrfmtsymsep { \l_datatool_GB_sym_sep_tl }
+ }
+ }
+% \end{macrocode}
+%
+%\subsection{Date and Time Parsing}
+% Provide a way to configure temporal parsing style.
+% The default is day/month/year but may be changed with
+% \cs{DTLsetLocaleOptions}. For example:
+%\begin{dispListing}
+%\DTLsetLocaleOptions{GB}{date-style=dmyy, date-variant=dot}
+%\end{dispListing}
+%An appropriate language file will need to also be installed to
+%parse dates containing month names or day of week names.
+%
+% \begin{macrocode}
+\tl_new:N \l__datatool_GB_datevariant_tl
+\tl_set:Nn \l__datatool_GB_datevariant_tl { slash }
+% \end{macrocode}
+%NB These token lists are used to form command names. The following is not
+%a format string.
+% \begin{macrocode}
+\tl_new:N \l__datatool_GB_datestyle_tl
+\tl_set:Nn \l__datatool_GB_datestyle_tl { ddmmyyyy }
+\tl_new:N \l__datatool_GB_timevariant_tl
+\tl_set:Nn \l__datatool_GB_timevariant_tl { colon }
+% \end{macrocode}
+%
+%Each parsing command defined below has final \marg{true} and \marg{false}
+%arguments (\code{TF}). These are used if parsing was successful (true) or if
+%parsing failed (false). The internal commands used by
+%\sty{datatool-base} have no need for solo branches (only \code{T} or only
+%\code{F}) so these commands are simply defined with \verb|\cs_new:Nn|
+%not as conditionals.
+%
+%\subsubsection{Time Stamp Parsing}
+%Use command
+%\begin{definition}
+%\cs{datatool\_}\meta{date-style}\verb|_hhmmss_tz_parse_timestamp:nnNnTF|
+%\end{definition}
+%with date regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{date-variant}\verb|_|\meta{date-style}\verb|_date_regex|
+%\end{definition}
+%and time regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{time-variant}\verb|_hhmmss_time_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_GB_parse_timestamp:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_GB_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_GB_datevariant_tl
+ _
+ \l__datatool_GB_datestyle_tl
+ _date_regex
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_GB_timevariant_tl
+ _hhmmss_time_regex
+ }
+ {
+ \use:c
+ {
+ datatool_
+ \l__datatool_GB_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_GB_datevariant_tl
+ _
+ \l__datatool_GB_datestyle_tl
+ _date_regex
+ }
+ {
+ c_datatool_
+ \l__datatool_GB_timevariant_tl
+ _hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_GB_timevariant_tl
+ { datatool-GB }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_GB_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_GB_timevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_GB_datevariant_tl
+ { datatool-GB }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_GB_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_GB_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_GB_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-GB }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_GB_datestyle_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%\subsubsection{Date Parsing}
+%Use command \cs{datatool\_}\meta{style}\verb|_parse_date:NNnTF|
+%with regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{variant}\verb|_anchored_|\meta{style}\verb|_date_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_GB_parse_date:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_GB_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_GB_datevariant_tl
+ _anchored_
+ \l__datatool_GB_datestyle_tl
+ _date_regex
+ }
+ {
+ \exp_args:cc
+ {
+ datatool_
+ \l__datatool_GB_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_GB_datevariant_tl
+ _anchored_
+ \l__datatool_GB_datestyle_tl
+ _date_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_GB_datevariant_tl
+ { datatool-GB }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_GB_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_GB_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_GB_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-GB }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_GB_datestyle_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%\subsubsection{Time Parsing}
+%Use command \cs{datatool\_}\meta{style}\verb|_parse_time:NNnTF|
+%with regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{variant}\verb|_anchored_|\meta{style}\verb|_time_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_GB_parse_time:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_GB_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ {
+ \datatool_hhmmss_parse_time:cNnTF
+ {
+ c_datatool_
+ \l__datatool_GB_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_GB_timevariant_tl
+ { datatool-GB }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_GB_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_GB_timevariant_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%
+%\subsubsection{Time Zones}
+%Define time zone mapping command for this region:
+% \begin{macrocode}
+\cs_new:Nn \datatool_GB_get_timezone_map:n
+ {
+ \datatool_region_get_timezone_map:n { GB / #1 }
+ }
+% \end{macrocode}
+%Define time zone IDs for this region (one-way map from ID to offset):
+% \begin{macrocode}
+\datatool_region_set_timezone_map:nn { GB / GMT } { +00:00 }
+\datatool_region_set_timezone_map:nn { GB / BST } { +01:00 }
+\datatool_region_set_timezone_map:nn { GB / CET } { +01:00 }
+\datatool_region_set_timezone_map:nn { GB / CEST } { +02:00 }
+% \end{macrocode}
+%
+%\subsection{Options}
+%Define options for this region:
+% \begin{macrocode}
+\datatool_locale_define_keys:nn { GB }
+ {
+ number-style .choices:nn =
+ { official , education , old }
+ {
+ \exp_args:NNe \renewcommand
+ \datatoolGBSetNumberChars
+ {
+ \exp_not:N \bool_if:NT
+ \exp_not:N \l_datatool_region_set_numberchars_bool
+ {
+ \exp_not:c { datatool_GB_set_numberchars_ \l_keys_choice_tl : }
+ }
+ }
+ \tl_if_eq:NnT \l_datatool_current_region_tl { GB }
+ {
+ \datatoolGBSetNumberChars
+ }
+ } ,
+% \end{macrocode}
+% Currency symbol before or after value:
+% \begin{macrocode}
+ currency-symbol-position .choice: ,
+ currency-symbol-position / before .code:n =
+ {
+ \cs_set_eq:NN \datatool_GB_currency_position:nn \dtlcurrprefixfmt
+ } ,
+ currency-symbol-position / after .code:n =
+ {
+ \cs_set_eq:NN \datatool_GB_currency_position:nn \dtlcurrsuffixfmt
+ } ,
+% \end{macrocode}
+% Should the currency symbol be prefixed with the region code:
+% \begin{macrocode}
+ currency-symbol-prefix .choice: ,
+ currency-symbol-prefix / false .code:n =
+ {
+ \cs_set_eq:NN \datatoolGBsymbolprefix \use_none:n
+ } ,
+ currency-symbol-prefix / true .code:n =
+ {
+ \cs_set_eq:NN
+ \datatoolGBsymbolprefix
+ \datatool_currency_symbol_region_prefix:n
+ } ,
+ currency-symbol-prefix .default:n = { true } ,
+% \end{macrocode}
+% Separator between currency symbol (not code) and value:
+% \begin{macrocode}
+ currency-symbol-sep .choice: ,
+ currency-symbol-sep / none .code:n =
+ {
+ \tl_clear:N \l_datatool_GB_sym_sep_tl
+ } ,
+ currency-symbol-sep / thin-space .code:n =
+ {
+ \tl_set:Nn \l_datatool_GB_sym_sep_tl { \, }
+ } ,
+ currency-symbol-sep / space .code:n =
+ {
+ \tl_set:Nn \l_datatool_GB_sym_sep_tl { ~ }
+ } ,
+ currency-symbol-sep / nbsp .code:n =
+ {
+ \tl_set:Nn \l_datatool_GB_sym_sep_tl { \nobreakspace }
+ } ,
+ currency-symbol-sep .initial:n = { none } ,
+% \end{macrocode}
+% Date and time styles:
+% \begin{macrocode}
+ date-style .choice: ,
+ date-style / dmyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_GB_datestyle_tl { ddmmyyyy }
+ } ,
+ date-style / mdyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_GB_datestyle_tl { mmddyyyy }
+ } ,
+ date-style / yyyymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_GB_datestyle_tl { yyyymmdd }
+ } ,
+ date-style / dmyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_GB_datestyle_tl { ddmmyy }
+ } ,
+ date-style / mdyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_GB_datestyle_tl { mmddyy }
+ } ,
+ date-style / yymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_GB_datestyle_tl { yymmdd }
+ } ,
+ date-variant .choice: ,
+ date-variant / slash .code:n =
+ {
+ \tl_set:Nn \l__datatool_GB_datevariant_tl { slash }
+ } ,
+ date-variant / hyphen .code:n =
+ {
+ \tl_set:Nn \l__datatool_GB_datevariant_tl { hyphen }
+ } ,
+ date-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_GB_datevariant_tl { dot }
+ } ,
+ date-variant / dialect .code:n =
+ {
+ \tl_set:Nn \l__datatool_GB_datevariant_tl
+ { \l_datatool_current_language_tl }
+ } ,
+ time-variant .choice: ,
+ time-variant / colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_GB_timevariant_tl { colon }
+ } ,
+ time-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_GB_timevariant_tl { dot }
+ } ,
+ time-variant / dialect .code:n =
+ {
+ \tl_if_eq:NnTF \l__datatool_GB_timevariant_tl { dot }
+ {
+ \tl_set:Nn \l__datatool_GB_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ }
+ {
+ \tl_if_in:NnF
+ \l__datatool_GB_timevariant_tl
+ { \l_datatool_current_language_tl }
+ {
+ \tl_set:Nn \l__datatool_GB_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ }
+ }
+ } ,
+ time-variant / dialect-colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_GB_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ } ,
+ time-variant / dialect-dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_GB_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ } ,
+ }
+% \end{macrocode}
+%
+%\subsection{Hooks}
+%Command to update temporal parsing commands for this region:
+% \begin{macrocode}
+\newcommand \datatoolGBSetTemporalParsers
+ {
+ \renewcommand \DTLCurrentLocaleParseTimeStamp
+ { \datatool_GB_parse_timestamp:NnTF }
+ \renewcommand \DTLCurrentLocaleParseDate
+ { \datatool_GB_parse_date:NnTF }
+ \renewcommand \DTLCurrentLocaleParseTime
+ { \datatool_GB_parse_time:NnTF }
+ \let
+ \DTLCurrentLocaleGetTimeZoneMap
+ \datatool_GB_get_timezone_map:n
+ }
+% \end{macrocode}
+%Set temporal formatting commands for this region. Currently this
+%just resets to the default, but may change in future.
+%Note that the defaults test if the applicable \sty{datetime2}
+%command is available and will fallback on ISO if not defined.
+%Bear in mind that the default style for \sty{datetime2} is
+%\texttt{iso} so there won't be a noticeable difference unless the
+%\sty{datetime2} regional setting is on.
+% \begin{macrocode}
+\newcommand \datatoolGBSetTemporalFormatters
+ {
+ \let
+ \DTLCurrentLocaleFormatDate
+ \datatool_default_date_fmt:nnnn
+ \let
+ \DTLCurrentLocaleFormatTime
+ \datatool_default_time_fmt:nnn
+ \let
+ \DTLCurrentLocaleFormatTimeZone
+ \datatool_default_timezone_fmt:nn
+ \let
+ \DTLCurrentLocaleFormatTimeStampNoZone
+ \datatool_default_timestamp_fmt:nnnnnnn
+ \let
+ \DTLCurrentLocaleFormatTimeStampWithZone
+ \datatool_default_timestamp_fmt:nnnnnnnnn
+ \renewcommand \DTLCurrentLocaleTimeStampFmtSep { ~ }
+ }
+% \end{macrocode}
+%
+%Command to update number symbols, currency and temporal parsing commands
+%for this region:
+% \begin{macrocode}
+\newcommand \DTLGBLocaleHook
+ {
+ \datatoolGBSetNumberChars
+ \datatoolGBSetCurrency
+ \datatoolGBSetTemporalParsers
+ \datatoolGBSetTemporalFormatters
+% \end{macrocode}
+%Allow language files to reference the region:
+% \begin{macrocode}
+ \tl_set:Nn \l_datatool_current_region_tl { GB }
+ }
+% \end{macrocode}
+%
+% Finished with \LaTeX3 syntax.
+% \begin{macrocode}
+\ExplSyntaxOff
+% \end{macrocode}
+%Note that the hook is added to the captions by \sty{datatool-base}
+%not by the region file.
+%\iffalse
+% \begin{macrocode}
+%</datatool-GB.ldf>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+%<*datatool-GG.ldf>
+% \end{macrocode}
+%\fi
+%\section{datatool-GG.ldf}\label{sec:datatool-GG}
+% Support for region GG.
+% \begin{macrocode}
+\TrackLangProvidesResource{GG}[2025/03/01 v1.0]
+% \end{macrocode}
+% Switch on \LaTeX3 syntax:
+% \begin{macrocode}
+\ExplSyntaxOn
+% \end{macrocode}
+%
+%\subsection{Numbers and Currency}
+%Set the number group and decimal symbols for this region.
+% \begin{macrocode}
+\cs_new:Nn \datatool_GG_set_numberchars_official:
+ {
+ \datatool_set_numberchars:nn { , } { . }
+ }
+% \end{macrocode}
+%Unofficial style.
+% \begin{macrocode}
+\cs_new:Nn \datatool_GG_set_numberchars_unofficial:
+ {
+ \datatool_set_thinspace_group_decimal_char:n { . }
+ }
+% \end{macrocode}
+%Hook to set the number group and decimal characters for the region:
+% \begin{macrocode}
+\newcommand \datatoolGGSetNumberChars
+ {
+ \bool_if:NT \l_datatool_region_set_numberchars_bool
+ {
+ \datatool_GG_set_numberchars_official:
+ }
+ }
+% \end{macrocode}
+%How to format the position of the currency symbol in relation to the value.
+% \begin{macrocode}
+\cs_new:Nn \datatool_GG_currency_position:nn
+ {
+ \dtlcurrprefixfmt { #1 } { #2 }
+ }
+% \end{macrocode}
+%Separator between currency symbol and value.
+% \begin{macrocode}
+\tl_new:N \l_datatool_GG_sym_sep_tl
+% \end{macrocode}
+% Set the currency format for this region.
+% \begin{macrocode}
+\newcommand \datatoolGGcurrencyfmt [ 2 ]
+ {
+ \datatool_GG_currency_position:nn
+ {
+ \datatoolGGsymbolprefix { GG }
+ #1
+ }
+ { #2 }
+ }
+% \end{macrocode}
+%Prefix for symbol, if required.
+% \begin{macrocode}
+\newcommand \datatoolGGsymbolprefix [ 1 ] { }
+% \end{macrocode}
+% Define the currency symbols for this region.
+% \begin{macrocode}
+\datatool_def_currency:nnnV
+ { \datatoolGGcurrencyfmt }
+ { GGP }
+ { \pounds }
+ \l_datatool_pound_tl
+% \end{macrocode}
+% Register the currency code with this region:
+% \begin{macrocode}
+\datatool_register_regional_currency_code:nn { GG } { GGP }
+% \end{macrocode}
+% Provide a command to set the currency for this region (for use
+% with any hook used when the locale changes).
+% NB this should do nothing with
+% \verb|\DTLsetup{region-currency=false}|
+% \begin{macrocode}
+\newcommand \datatoolGGSetCurrency
+ {
+ \bool_if:NT \l_datatool_region_set_currency_bool
+ {
+ \DTLsetdefaultcurrency { GGP }
+% \end{macrocode}
+%Number of digits that \cs{DTLdecimaltocurrency} should round to:
+% \begin{macrocode}
+ \renewcommand \DTLCurrentLocaleCurrencyDP { 2 }
+% \end{macrocode}
+%Separator between symbol and value:
+% \begin{macrocode}
+ \renewcommand \dtlcurrfmtsymsep { \l_datatool_GG_sym_sep_tl }
+ }
+ }
+% \end{macrocode}
+%
+%\subsection{Date and Time Parsing}
+% This defaults to day/month/year but may be changed with \cs{DTLsetLocaleOptions}. For example:
+%\begin{dispListing}
+%\DTLsetLocaleOptions{GG}{date-style=dmyyyy, date-variant=slash}
+%\end{dispListing}
+%An appropriate language file will need to also be installed to
+%parse dates containing month names or day of week names.
+%
+%Provide a way to configure parsing style.
+% \begin{macrocode}
+\tl_new:N \l__datatool_GG_datevariant_tl
+\tl_set:Nn \l__datatool_GG_datevariant_tl { slash }
+% \end{macrocode}
+%NB These token lists are used to form command names. The following is not
+%a format string.
+% \begin{macrocode}
+\tl_new:N \l__datatool_GG_datestyle_tl
+\tl_set:Nn \l__datatool_GG_datestyle_tl { ddmmyyyy }
+\tl_new:N \l__datatool_GG_timevariant_tl
+\tl_set:Nn \l__datatool_GG_timevariant_tl { colon }
+% \end{macrocode}
+%
+%Each parsing command defined below has final \marg{true} and \marg{false}
+%arguments (\code{TF}). These are used if parsing was successful (true) or if
+%parsing failed (false). The internal commands used by
+%\sty{datatool-base} have no need for solo branches (only \code{T} or only
+%\code{F}) so these commands are simply defined with \verb|\cs_new:Nn|
+%not as conditionals.
+%
+%\subsubsection{Time Stamp Parsing}
+%Use command
+%\begin{definition}
+%\cs{datatool\_}\meta{date-style}\verb|_hhmmss_tz_parse_timestamp:nnNnTF|
+%\end{definition}
+%with date regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{date-variant}\verb|_|\meta{date-style}\verb|_date_regex|
+%\end{definition}
+%and time regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{time-variant}\verb|_hhmmss_time_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_GG_parse_timestamp:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_GG_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_GG_datevariant_tl
+ _
+ \l__datatool_GG_datestyle_tl
+ _date_regex
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_GG_timevariant_tl
+ _hhmmss_time_regex
+ }
+ {
+ \use:c
+ {
+ datatool_
+ \l__datatool_GG_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_GG_datevariant_tl
+ _
+ \l__datatool_GG_datestyle_tl
+ _date_regex
+ }
+ {
+ c_datatool_
+ \l__datatool_GG_timevariant_tl
+ _hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_GG_timevariant_tl
+ { datatool-GG }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_GG_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_GG_timevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_GG_datevariant_tl
+ { datatool-GG }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_GG_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_GG_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_GG_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-GG }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_GG_datestyle_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%
+%\subsubsection{Date Parsing}
+%Use command \cs{datatool\_}\meta{style}\verb|_parse_date:NNnTF|
+%with regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{variant}\verb|_anchored_|\meta{style}\verb|_date_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_GG_parse_date:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_GG_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_GG_datevariant_tl
+ _anchored_
+ \l__datatool_GG_datestyle_tl
+ _date_regex
+ }
+ {
+ \exp_args:cc
+ {
+ datatool_
+ \l__datatool_GG_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_GG_datevariant_tl
+ _anchored_
+ \l__datatool_GG_datestyle_tl
+ _date_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_GG_datevariant_tl
+ { datatool-GG }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_GG_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_GG_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_GG_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-GG }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_GG_datestyle_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%
+%\subsubsection{Time Parsing}
+%Use command \cs{datatool\_}\meta{style}\verb|_parse_time:NNnTF|
+%with regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{variant}\verb|_anchored_|\meta{style}\verb|_time_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_GG_parse_time:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_GG_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ {
+ \datatool_hhmmss_parse_time:cNnTF
+ {
+ c_datatool_
+ \l__datatool_GG_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_GG_timevariant_tl
+ { datatool-GG }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_GG_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_GG_timevariant_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%
+%\subsubsection{Time Zone Mappings}
+%Define time zone mapping command for this region:
+% \begin{macrocode}
+\cs_new:Nn \datatool_GG_get_timezone_map:n
+ {
+ \datatool_region_get_timezone_map:n { GG / #1 }
+ }
+% \end{macrocode}
+%Define time zone IDs for this region (one-way map from ID to offset):
+% \begin{macrocode}
+\datatool_region_set_timezone_map:nn { GG / BST } { +01:00 }
+\datatool_region_set_timezone_map:nn { GG / GMT } { +00:00 }
+\datatool_region_set_timezone_map:nn { GG / CET } { +01:00 }
+\datatool_region_set_timezone_map:nn { GG / CEST } { +02:00 }
+% \end{macrocode}
+%
+%\subsection{Options}
+%Define options for this region:
+% \begin{macrocode}
+\datatool_locale_define_keys:nn { GG }
+ {
+ number-style .choices:nn =
+ { official, unofficial }
+ {
+ \exp_args:NNe \renewcommand
+ \datatoolGGSetNumberChars
+ {
+ \exp_not:N \bool_if:NT
+ \exp_not:N \l_datatool_region_set_numberchars_bool
+ {
+ \exp_not:c { datatool_GG_set_numberchars_ \l_keys_choice_tl : }
+ }
+ }
+ \tl_if_eq:NnT \l_datatool_current_region_tl { GG }
+ {
+ \datatoolGGSetNumberChars
+ }
+ } ,
+% \end{macrocode}
+% Currency symbol before or after value:
+% \begin{macrocode}
+ currency-symbol-position .choice: ,
+ currency-symbol-position / before .code:n =
+ {
+ \cs_set_eq:NN \datatool_GG_currency_position:nn \dtlcurrprefixfmt
+ } ,
+ currency-symbol-position / after .code:n =
+ {
+ \cs_set_eq:NN \datatool_GG_currency_position:nn \dtlcurrsuffixfmt
+ } ,
+% \end{macrocode}
+% Should the currency symbol be prefixed with the region code:
+% \begin{macrocode}
+ currency-symbol-prefix .choice: ,
+ currency-symbol-prefix / false .code:n =
+ {
+ \cs_set_eq:NN \datatoolGGsymbolprefix \use_none:n
+ } ,
+ currency-symbol-prefix / true .code:n =
+ {
+ \cs_set_eq:NN
+ \datatoolGGsymbolprefix
+ \datatool_currency_symbol_region_prefix:n
+ } ,
+ currency-symbol-prefix .default:n = { true } ,
+% \end{macrocode}
+% Separator between currency symbol (not code) and value:
+% \begin{macrocode}
+ currency-symbol-sep .choice: ,
+ currency-symbol-sep / none .code:n =
+ {
+ \tl_clear:N \l_datatool_GG_sym_sep_tl
+ } ,
+ currency-symbol-sep / thin-space .code:n =
+ {
+ \tl_set:Nn \l_datatool_GG_sym_sep_tl { \, }
+ } ,
+ currency-symbol-sep / space .code:n =
+ {
+ \tl_set:Nn \l_datatool_GG_sym_sep_tl { ~ }
+ } ,
+ currency-symbol-sep / nbsp .code:n =
+ {
+ \tl_set:Nn \l_datatool_GG_sym_sep_tl { \nobreakspace }
+ } ,
+ currency-symbol-sep . initial:n = { none } ,
+% \end{macrocode}
+% Date and time styles:
+% \begin{macrocode}
+ date-style .choice: ,
+ date-style / dmyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_GG_datestyle_tl { ddmmyyyy }
+ } ,
+ date-style / mdyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_GG_datestyle_tl { mmddyyyy }
+ } ,
+ date-style / yyyymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_GG_datestyle_tl { yyyymmdd }
+ } ,
+ date-style / dmyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_GG_datestyle_tl { ddmmyy }
+ } ,
+ date-style / mdyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_GG_datestyle_tl { mmddyy }
+ } ,
+ date-style / yymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_GG_datestyle_tl { yymmdd }
+ } ,
+ date-variant .choice: ,
+ date-variant / slash .code:n =
+ {
+ \tl_set:Nn \l__datatool_GG_datevariant_tl { slash }
+ } ,
+ date-variant / hyphen .code:n =
+ {
+ \tl_set:Nn \l__datatool_GG_datevariant_tl { hyphen }
+ } ,
+ date-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_GG_datevariant_tl { dot }
+ } ,
+ date-variant / dialect .code:n =
+ {
+ \tl_set:Nn \l__datatool_GG_datevariant_tl
+ { \l_datatool_current_language_tl }
+ } ,
+ time-variant .choice: ,
+ time-variant / colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_GG_timevariant_tl { colon }
+ } ,
+ time-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_GG_timevariant_tl { dot }
+ } ,
+ time-variant / dialect .code:n =
+ {
+ \tl_if_eq:NnTF \l__datatool_GG_timevariant_tl { dot }
+ {
+ \tl_set:Nn \l__datatool_GG_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ }
+ {
+ \tl_if_in:NnF
+ \l__datatool_GG_timevariant_tl
+ { \l_datatool_current_language_tl }
+ {
+ \tl_set:Nn \l__datatool_GG_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ }
+ }
+ } ,
+ time-variant / dialect-colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_GG_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ } ,
+ time-variant / dialect-dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_GG_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ } ,
+ }
+% \end{macrocode}
+%
+%\subsection{Hooks}
+%Command to update temporal parsing commands for this region:
+% \begin{macrocode}
+\newcommand \datatoolGGSetTemporalParsers
+ {
+ \renewcommand \DTLCurrentLocaleParseTimeStamp
+ { \datatool_GG_parse_timestamp:NnTF }
+ \renewcommand \DTLCurrentLocaleParseDate
+ { \datatool_GG_parse_date:NnTF }
+ \renewcommand \DTLCurrentLocaleParseTime
+ { \datatool_GG_parse_time:NnTF }
+ \let
+ \DTLCurrentLocaleGetTimeZoneMap
+ \datatool_GG_get_timezone_map:n
+ }
+% \end{macrocode}
+%Set temporal formatting commands for this region. Currently this
+%just resets to the default, but may change in future.
+%Note that the defaults test if the applicable \sty{datetime2}
+%command is available and will fallback on ISO if not defined.
+%Bear in mind that the default style for \sty{datetime2} is
+%\texttt{iso} so there won't be a noticeable difference unless the
+%\sty{datetime2} regional setting is on.
+% \begin{macrocode}
+\newcommand \datatoolGGSetTemporalFormatters
+ {
+ \let
+ \DTLCurrentLocaleFormatDate
+ \datatool_default_date_fmt:nnnn
+ \let
+ \DTLCurrentLocaleFormatTime
+ \datatool_default_time_fmt:nnn
+ \let
+ \DTLCurrentLocaleFormatTimeZone
+ \datatool_default_timezone_fmt:nn
+ \let
+ \DTLCurrentLocaleFormatTimeStampNoZone
+ \datatool_default_timestamp_fmt:nnnnnnn
+ \let
+ \DTLCurrentLocaleFormatTimeStampWithZone
+ \datatool_default_timestamp_fmt:nnnnnnnnn
+ \renewcommand \DTLCurrentLocaleTimeStampFmtSep { ~ }
+ }
+% \end{macrocode}
+%
+%
+%Command to update currency and temporal parsing commands for this region:
+% \begin{macrocode}
+\newcommand \DTLGGLocaleHook
+ {
+ \datatoolGGSetNumberChars
+ \datatoolGGSetCurrency
+ \datatoolGGSetTemporalParsers
+ \datatoolGGSetTemporalFormatters
+% \end{macrocode}
+%Allow language files to reference the region:
+% \begin{macrocode}
+ \tl_set:Nn \l_datatool_current_region_tl { GG }
+ }
+% \end{macrocode}
+%
+% Finished with \LaTeX3 syntax.
+% \begin{macrocode}
+\ExplSyntaxOff
+% \end{macrocode}
+%Note that the hook is added to the captions by \sty{datatool-base}
+%not by the region file.
+%\iffalse
+% \begin{macrocode}
+%</datatool-GG.ldf>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+%<*datatool-GI.ldf>
+% \end{macrocode}
+%\fi
+%\section{datatool-GI.ldf}\label{sec:datatool-GI}
+% Support for region GI.
+% \begin{macrocode}
+\TrackLangProvidesResource{GI}[2025/03/01 v1.0]
+% \end{macrocode}
+% Switch on \LaTeX3 syntax:
+% \begin{macrocode}
+\ExplSyntaxOn
+% \end{macrocode}
+%
+%\subsection{Numbers and Currency}
+%Set the number group and decimal symbols for this region.
+% \begin{macrocode}
+\cs_new:Nn \datatool_GI_set_numberchars_official:
+ {
+ \datatool_set_numberchars:nn { , } { . }
+ }
+% \end{macrocode}
+%Unofficial style.
+% \begin{macrocode}
+\cs_new:Nn \datatool_GI_set_numberchars_unofficial:
+ {
+ \datatool_set_thinspace_group_decimal_char:n { . }
+ }
+% \end{macrocode}
+%Hook to set the number group and decimal characters for the region:
+% \begin{macrocode}
+\newcommand \datatoolGISetNumberChars
+ {
+ \bool_if:NT \l_datatool_region_set_numberchars_bool
+ {
+ \datatool_GI_set_numberchars_official:
+ }
+ }
+% \end{macrocode}
+%How to format the position of the currency symbol in relation to the value.
+% \begin{macrocode}
+\cs_new:Nn \datatool_GI_currency_position:nn
+ {
+ \dtlcurrprefixfmt { #1 } { #2 }
+ }
+% \end{macrocode}
+%Separator between currency symbol and value.
+% \begin{macrocode}
+\tl_new:N \l_datatool_GI_sym_sep_tl
+% \end{macrocode}
+% Set the currency format for this region.
+% \begin{macrocode}
+\newcommand \datatoolGIcurrencyfmt [ 2 ]
+ {
+ \datatool_GI_currency_position:nn
+ {
+ \datatoolGIsymbolprefix { GI }
+ #1
+ }
+ { #2 }
+ }
+% \end{macrocode}
+%Prefix for symbol, if required.
+% \begin{macrocode}
+\newcommand \datatoolGIsymbolprefix [ 1 ] { }
+% \end{macrocode}
+% Define the currency symbols for this region.
+% \begin{macrocode}
+\datatool_def_currency:nnnV
+ { \datatoolGIcurrencyfmt }
+ { GIP }
+ { \pounds }
+ \l_datatool_pound_tl
+% \end{macrocode}
+% Register the currency code with this region:
+% \begin{macrocode}
+\datatool_register_regional_currency_code:nn { GI } { GIP }
+% \end{macrocode}
+% Provide a command to set the currency for this region (for use
+% with any hook used when the locale changes).
+% NB this should do nothing with
+% \verb|\DTLsetup{region-currency=false}|
+% \begin{macrocode}
+\newcommand \datatoolGISetCurrency
+ {
+ \bool_if:NT \l_datatool_region_set_currency_bool
+ {
+ \DTLsetdefaultcurrency { GIP }
+% \end{macrocode}
+%Number of digits that \cs{DTLdecimaltocurrency} should round to:
+% \begin{macrocode}
+ \renewcommand \DTLCurrentLocaleCurrencyDP { 2 }
+% \end{macrocode}
+%Separator between symbol and value:
+% \begin{macrocode}
+ \renewcommand \dtlcurrfmtsymsep { \l_datatool_GI_sym_sep_tl }
+ }
+ }
+% \end{macrocode}
+%
+%\subsection{Date and Time Parsing}
+% This defaults to day/month/year but may be changed with \cs{DTLsetLocaleOptions}. For example:
+%\begin{dispListing}
+%\DTLsetLocaleOptions{GI}{date-style=dmyyyy, date-variant=slash}
+%\end{dispListing}
+%An appropriate language file will need to also be installed to
+%parse dates containing month names or day of week names.
+%
+%Provide a way to configure parsing style.
+% \begin{macrocode}
+\tl_new:N \l__datatool_GI_datevariant_tl
+\tl_set:Nn \l__datatool_GI_datevariant_tl { slash }
+% \end{macrocode}
+%NB These token lists are used to form command names. The following is not
+%a format string.
+% \begin{macrocode}
+\tl_new:N \l__datatool_GI_datestyle_tl
+\tl_set:Nn \l__datatool_GI_datestyle_tl { ddmmyyyy }
+\tl_new:N \l__datatool_GI_timevariant_tl
+\tl_set:Nn \l__datatool_GI_timevariant_tl { colon }
+% \end{macrocode}
+%
+%Each parsing command defined below has final \marg{true} and \marg{false}
+%arguments (\code{TF}). These are used if parsing was successful (true) or if
+%parsing failed (false). The internal commands used by
+%\sty{datatool-base} have no need for solo branches (only \code{T} or only
+%\code{F}) so these commands are simply defined with \verb|\cs_new:Nn|
+%not as conditionals.
+%
+%\subsubsection{Time Stamp Parsing}
+%Use command
+%\begin{definition}
+%\cs{datatool\_}\meta{date-style}\verb|_hhmmss_tz_parse_timestamp:nnNnTF|
+%\end{definition}
+%with date regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{date-variant}\verb|_|\meta{date-style}\verb|_date_regex|
+%\end{definition}
+%and time regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{time-variant}\verb|_hhmmss_time_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_GI_parse_timestamp:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_GI_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_GI_datevariant_tl
+ _
+ \l__datatool_GI_datestyle_tl
+ _date_regex
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_GI_timevariant_tl
+ _hhmmss_time_regex
+ }
+ {
+ \use:c
+ {
+ datatool_
+ \l__datatool_GI_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_GI_datevariant_tl
+ _
+ \l__datatool_GI_datestyle_tl
+ _date_regex
+ }
+ {
+ c_datatool_
+ \l__datatool_GI_timevariant_tl
+ _hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_GI_timevariant_tl
+ { datatool-GI }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_GI_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_GI_timevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_GI_datevariant_tl
+ { datatool-GI }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_GI_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_GI_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_GI_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-GI }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_GI_datestyle_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%
+%\subsubsection{Date Parsing}
+%Use command \cs{datatool\_}\meta{style}\verb|_parse_date:NNnTF|
+%with regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{variant}\verb|_anchored_|\meta{style}\verb|_date_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_GI_parse_date:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_GI_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_GI_datevariant_tl
+ _anchored_
+ \l__datatool_GI_datestyle_tl
+ _date_regex
+ }
+ {
+ \exp_args:cc
+ {
+ datatool_
+ \l__datatool_GI_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_GI_datevariant_tl
+ _anchored_
+ \l__datatool_GI_datestyle_tl
+ _date_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_GI_datevariant_tl
+ { datatool-GI }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_GI_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_GI_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_GI_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-GI }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_GI_datestyle_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%
+%\subsubsection{Time Parsing}
+%Use command \cs{datatool\_}\meta{style}\verb|_parse_time:NNnTF|
+%with regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{variant}\verb|_anchored_|\meta{style}\verb|_time_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_GI_parse_time:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_GI_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ {
+ \datatool_hhmmss_parse_time:cNnTF
+ {
+ c_datatool_
+ \l__datatool_GI_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_GI_timevariant_tl
+ { datatool-GI }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_GI_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_GI_timevariant_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%
+%\subsubsection{Time Zone Mappings}
+%Define time zone mapping command for this region:
+% \begin{macrocode}
+\cs_new:Nn \datatool_GI_get_timezone_map:n
+ {
+ \datatool_region_get_timezone_map:n { GI / #1 }
+ }
+% \end{macrocode}
+%Define time zone IDs for this region (one-way map from ID to offset):
+% \begin{macrocode}
+\datatool_region_set_timezone_map:nn { GI / CEST } { +02:00 }
+\datatool_region_set_timezone_map:nn { GI / BST } { +01:00 }
+\datatool_region_set_timezone_map:nn { GI / CET } { +01:00 }
+\datatool_region_set_timezone_map:nn { GI / GMT } { +00:00 }
+% \end{macrocode}
+%
+%\subsection{Options}
+%Define options for this region:
+% \begin{macrocode}
+\datatool_locale_define_keys:nn { GI }
+ {
+ number-style .choices:nn =
+ { official, unofficial }
+ {
+ \exp_args:NNe \renewcommand
+ \datatoolGISetNumberChars
+ {
+ \exp_not:N \bool_if:NT
+ \exp_not:N \l_datatool_region_set_numberchars_bool
+ {
+ \exp_not:c { datatool_GI_set_numberchars_ \l_keys_choice_tl : }
+ }
+ }
+ \tl_if_eq:NnT \l_datatool_current_region_tl { GI }
+ {
+ \datatoolGISetNumberChars
+ }
+ } ,
+% \end{macrocode}
+% Currency symbol before or after value:
+% \begin{macrocode}
+ currency-symbol-position .choice: ,
+ currency-symbol-position / before .code:n =
+ {
+ \cs_set_eq:NN \datatool_GI_currency_position:nn \dtlcurrprefixfmt
+ } ,
+ currency-symbol-position / after .code:n =
+ {
+ \cs_set_eq:NN \datatool_GI_currency_position:nn \dtlcurrsuffixfmt
+ } ,
+% \end{macrocode}
+% Should the currency symbol be prefixed with the region code:
+% \begin{macrocode}
+ currency-symbol-prefix .choice: ,
+ currency-symbol-prefix / false .code:n =
+ {
+ \cs_set_eq:NN \datatoolGIsymbolprefix \use_none:n
+ } ,
+ currency-symbol-prefix / true .code:n =
+ {
+ \cs_set_eq:NN
+ \datatoolGIsymbolprefix
+ \datatool_currency_symbol_region_prefix:n
+ } ,
+ currency-symbol-prefix .default:n = { true } ,
+% \end{macrocode}
+% Separator between currency symbol (not code) and value:
+% \begin{macrocode}
+ currency-symbol-sep .choice: ,
+ currency-symbol-sep / none .code:n =
+ {
+ \tl_clear:N \l_datatool_GI_sym_sep_tl
+ } ,
+ currency-symbol-sep / thin-space .code:n =
+ {
+ \tl_set:Nn \l_datatool_GI_sym_sep_tl { \, }
+ } ,
+ currency-symbol-sep / space .code:n =
+ {
+ \tl_set:Nn \l_datatool_GI_sym_sep_tl { ~ }
+ } ,
+ currency-symbol-sep / nbsp .code:n =
+ {
+ \tl_set:Nn \l_datatool_GI_sym_sep_tl { \nobreakspace }
+ } ,
+ currency-symbol-sep . initial:n = { none } ,
+% \end{macrocode}
+% Date and time styles:
+% \begin{macrocode}
+ date-style .choice: ,
+ date-style / dmyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_GI_datestyle_tl { ddmmyyyy }
+ } ,
+ date-style / mdyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_GI_datestyle_tl { mmddyyyy }
+ } ,
+ date-style / yyyymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_GI_datestyle_tl { yyyymmdd }
+ } ,
+ date-style / dmyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_GI_datestyle_tl { ddmmyy }
+ } ,
+ date-style / mdyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_GI_datestyle_tl { mmddyy }
+ } ,
+ date-style / yymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_GI_datestyle_tl { yymmdd }
+ } ,
+ date-variant .choice: ,
+ date-variant / slash .code:n =
+ {
+ \tl_set:Nn \l__datatool_GI_datevariant_tl { slash }
+ } ,
+ date-variant / hyphen .code:n =
+ {
+ \tl_set:Nn \l__datatool_GI_datevariant_tl { hyphen }
+ } ,
+ date-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_GI_datevariant_tl { dot }
+ } ,
+ date-variant / dialect .code:n =
+ {
+ \tl_set:Nn \l__datatool_GI_datevariant_tl
+ { \l_datatool_current_language_tl }
+ } ,
+ time-variant .choice: ,
+ time-variant / colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_GI_timevariant_tl { colon }
+ } ,
+ time-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_GI_timevariant_tl { dot }
+ } ,
+ time-variant / dialect .code:n =
+ {
+ \tl_if_eq:NnTF \l__datatool_GI_timevariant_tl { dot }
+ {
+ \tl_set:Nn \l__datatool_GI_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ }
+ {
+ \tl_if_in:NnF
+ \l__datatool_GI_timevariant_tl
+ { \l_datatool_current_language_tl }
+ {
+ \tl_set:Nn \l__datatool_GI_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ }
+ }
+ } ,
+ time-variant / dialect-colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_GI_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ } ,
+ time-variant / dialect-dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_GI_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ } ,
+ }
+% \end{macrocode}
+%
+%\subsection{Hooks}
+%Command to update temporal parsing commands for this region:
+% \begin{macrocode}
+\newcommand \datatoolGISetTemporalParsers
+ {
+ \renewcommand \DTLCurrentLocaleParseTimeStamp
+ { \datatool_GI_parse_timestamp:NnTF }
+ \renewcommand \DTLCurrentLocaleParseDate
+ { \datatool_GI_parse_date:NnTF }
+ \renewcommand \DTLCurrentLocaleParseTime
+ { \datatool_GI_parse_time:NnTF }
+ \let
+ \DTLCurrentLocaleGetTimeZoneMap
+ \datatool_GI_get_timezone_map:n
+ }
+% \end{macrocode}
+%Set temporal formatting commands for this region. Currently this
+%just resets to the default, but may change in future.
+%Note that the defaults test if the applicable \sty{datetime2}
+%command is available and will fallback on ISO if not defined.
+%Bear in mind that the default style for \sty{datetime2} is
+%\texttt{iso} so there won't be a noticeable difference unless the
+%\sty{datetime2} regional setting is on.
+% \begin{macrocode}
+\newcommand \datatoolGISetTemporalFormatters
+ {
+ \let
+ \DTLCurrentLocaleFormatDate
+ \datatool_default_date_fmt:nnnn
+ \let
+ \DTLCurrentLocaleFormatTime
+ \datatool_default_time_fmt:nnn
+ \let
+ \DTLCurrentLocaleFormatTimeZone
+ \datatool_default_timezone_fmt:nn
+ \let
+ \DTLCurrentLocaleFormatTimeStampNoZone
+ \datatool_default_timestamp_fmt:nnnnnnn
+ \let
+ \DTLCurrentLocaleFormatTimeStampWithZone
+ \datatool_default_timestamp_fmt:nnnnnnnnn
+ \renewcommand \DTLCurrentLocaleTimeStampFmtSep { ~ }
+ }
+% \end{macrocode}
+%
+%
+%Command to update currency and temporal parsing commands for this region:
+% \begin{macrocode}
+\newcommand \DTLGILocaleHook
+ {
+ \datatoolGISetNumberChars
+ \datatoolGISetCurrency
+ \datatoolGISetTemporalParsers
+ \datatoolGISetTemporalFormatters
+% \end{macrocode}
+%Allow language files to reference the region:
+% \begin{macrocode}
+ \tl_set:Nn \l_datatool_current_region_tl { GI }
+ }
+% \end{macrocode}
+%
+% Finished with \LaTeX3 syntax.
+% \begin{macrocode}
+\ExplSyntaxOff
+% \end{macrocode}
+%Note that the hook is added to the captions by \sty{datatool-base}
+%not by the region file.
+%\iffalse
+% \begin{macrocode}
+%</datatool-GI.ldf>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+%<*datatool-IE.ldf>
+% \end{macrocode}
+%\fi
+%\section{datatool-IE.ldf}\label{sec:datatool-IE}
+% Support for region IE.
+% \begin{macrocode}
+\TrackLangProvidesResource{IE}[2025/03/01 v1.0]
+% \end{macrocode}
+% Switch on \LaTeX3 syntax:
+% \begin{macrocode}
+\ExplSyntaxOn
+% \end{macrocode}
+%
+%\subsection{Numbers and Currency}
+%Set the number group and decimal symbols for this region.
+% \begin{macrocode}
+\cs_new:Nn \datatool_IE_set_numberchars_official:
+ {
+ \datatool_set_numberchars:nn { , } { . }
+ }
+% \end{macrocode}
+%Unofficial style.
+% \begin{macrocode}
+\cs_new:Nn \datatool_IE_set_numberchars_unofficial:
+ {
+ \datatool_set_thinspace_group_decimal_char:n { . }
+ }
+% \end{macrocode}
+%Hook to set the number group and decimal characters for the region:
+% \begin{macrocode}
+\newcommand \datatoolIESetNumberChars
+ {
+ \bool_if:NT \l_datatool_region_set_numberchars_bool
+ {
+ \datatool_IE_set_numberchars_official:
+ }
+ }
+% \end{macrocode}
+% The EUR currency is already defined by \sty{datatool-base}, but we
+% need to register the currency code with this region:
+% \begin{macrocode}
+\datatool_register_regional_currency_code:nn { IE } { EUR }
+% \end{macrocode}
+%How to format the position of the currency symbol in relation to the value.
+% \begin{macrocode}
+\cs_new:Nn \datatool_IE_currency_position:nn
+ {
+ \dtlcurrprefixfmt { #1 } { #2 }
+ }
+% \end{macrocode}
+%Separator between currency symbol and value.
+% \begin{macrocode}
+\tl_new:N \l_datatool_IE_sym_sep_tl
+% \end{macrocode}
+%
+% Provide a command to set the currency for this region (for use
+% with any hook used when the locale changes).
+% \begin{macrocode}
+\newcommand \datatoolIESetCurrency
+ {
+ \bool_if:NT \l_datatool_region_set_currency_bool
+ {
+ \DTLsetdefaultcurrency { EUR }
+% \end{macrocode}
+%Number of digits that \cs{DTLdecimaltocurrency} should round to:
+% \begin{macrocode}
+ \renewcommand \DTLCurrentLocaleCurrencyDP { 2 }
+% \end{macrocode}
+%Update EUR format to reflect current region style:
+% \begin{macrocode}
+ \renewcommand \DTLdefaultEURcurrencyfmt
+ { \datatool_IE_currency_position:nn }
+% \end{macrocode}
+%Separator between symbol and value:
+% \begin{macrocode}
+ \renewcommand \dtlcurrfmtsymsep { \l_datatool_IE_sym_sep_tl }
+ }
+ }
+% \end{macrocode}
+%
+%\subsection{Date and Time Parsing}
+% This defaults to day/month/year but may be changed with \cs{DTLsetLocaleOptions}. For example:
+%\begin{dispListing}
+%\DTLsetLocaleOptions{IE}{date-style=dmyyyy, date-variant=slash}
+%\end{dispListing}
+%An appropriate language file will need to also be installed to
+%parse dates containing month names or day of week names.
+%
+% Provide a way to configure parsing style.
+% \begin{macrocode}
+\tl_new:N \l__datatool_IE_datevariant_tl
+\tl_set:Nn \l__datatool_IE_datevariant_tl { slash }
+% \end{macrocode}
+%NB These token lists are used to form command names. The following is not
+%a format string.
+% \begin{macrocode}
+\tl_new:N \l__datatool_IE_datestyle_tl
+\tl_set:Nn \l__datatool_IE_datestyle_tl { ddmmyyyy }
+\tl_new:N \l__datatool_IE_timevariant_tl
+\tl_set:Nn \l__datatool_IE_timevariant_tl { colon }
+% \end{macrocode}
+%
+%Each parsing command defined below has final \marg{true} and \marg{false}
+%arguments (\code{TF}). These are used if parsing was successful (true) or if
+%parsing failed (false). The internal commands used by
+%\sty{datatool-base} have no need for solo branches (only \code{T} or only
+%\code{F}) so these commands are simply defined with \verb|\cs_new:Nn|
+%not as conditionals.
+%
+%\subsubsection{Time Stamp Parsing}
+%Use command
+%\begin{definition}
+%\cs{datatool\_}\meta{date-style}\verb|_hhmmss_tz_parse_timestamp:nnNnTF|
+%\end{definition}
+%with date regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{date-variant}\verb|_|\meta{date-style}\verb|_date_regex|
+%\end{definition}
+%and time regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{time-variant}\verb|_hhmmss_time_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_IE_parse_timestamp:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_IE_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_IE_datevariant_tl
+ _
+ \l__datatool_IE_datestyle_tl
+ _date_regex
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_IE_timevariant_tl
+ _hhmmss_time_regex
+ }
+ {
+ \use:c
+ {
+ datatool_
+ \l__datatool_IE_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_IE_datevariant_tl
+ _
+ \l__datatool_IE_datestyle_tl
+ _date_regex
+ }
+ {
+ c_datatool_
+ \l__datatool_IE_timevariant_tl
+ _hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_IE_timevariant_tl
+ { datatool-IE }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_IE_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_IE_timevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_IE_datevariant_tl
+ { datatool-IE }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_IE_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_IE_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_IE_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-IE }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_IE_datestyle_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%
+%\subsubsection{Date Parsing}
+%Use command \cs{datatool\_}\meta{style}\verb|_parse_date:NNnTF|
+%with regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{variant}\verb|_anchored_|\meta{style}\verb|_date_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_IE_parse_date:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_IE_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_IE_datevariant_tl
+ _anchored_
+ \l__datatool_IE_datestyle_tl
+ _date_regex
+ }
+ {
+ \exp_args:cc
+ {
+ datatool_
+ \l__datatool_IE_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_IE_datevariant_tl
+ _anchored_
+ \l__datatool_IE_datestyle_tl
+ _date_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_IE_datevariant_tl
+ { datatool-IE }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_IE_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_IE_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_IE_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-IE }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_IE_datestyle_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%
+%\subsubsection{Time Parsing}
+%Use command \cs{datatool\_}\meta{style}\verb|_parse_time:NNnTF|
+%with regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{variant}\verb|_anchored_|\meta{style}\verb|_time_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_IE_parse_time:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_IE_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ {
+ \datatool_hhmmss_parse_time:cNnTF
+ {
+ c_datatool_
+ \l__datatool_IE_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_IE_timevariant_tl
+ { datatool-IE }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_IE_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_IE_timevariant_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%
+%\subsubsection{Time Zone Mappings}
+%Define time zone mapping command for this region:
+% \begin{macrocode}
+\cs_new:Nn \datatool_IE_get_timezone_map:n
+ {
+ \datatool_region_get_timezone_map:n { IE / #1 }
+ }
+% \end{macrocode}
+%Define time zone IDs for this region (one-way map from ID to offset):
+% \begin{macrocode}
+\datatool_region_set_timezone_map:nn { IE / IST } { +01:00 }
+\datatool_region_set_timezone_map:nn { IE / GMT } { +00:00 }
+\datatool_region_set_timezone_map:nn { IE / CEST } { +02:00 }
+\datatool_region_set_timezone_map:nn { IE / CET } { +01:00 }
+% \end{macrocode}
+%\subsection{Options}
+%Define options for this region:
+% \begin{macrocode}
+\datatool_locale_define_keys:nn { IE }
+ {
+ number-style .choices:nn =
+ { official, unofficial }
+ {
+ \exp_args:NNe \renewcommand
+ \datatoolIESetNumberChars
+ {
+ \exp_not:N \bool_if:NT
+ \exp_not:N \l_datatool_region_set_numberchars_bool
+ {
+ \exp_not:c { datatool_IE_set_numberchars_ \l_keys_choice_tl : }
+ }
+ }
+ \tl_if_eq:NnT \l_datatool_current_region_tl { IE }
+ {
+ \datatoolIESetNumberChars
+ }
+ } ,
+% \end{macrocode}
+% Currency symbol before or after value:
+% \begin{macrocode}
+ currency-symbol-position .choice: ,
+ currency-symbol-position / before .code:n =
+ {
+ \cs_set_eq:NN \datatool_IE_currency_position:nn \dtlcurrprefixfmt
+ } ,
+ currency-symbol-position / after .code:n =
+ {
+ \cs_set_eq:NN \datatool_IE_currency_position:nn \dtlcurrsuffixfmt
+ } ,
+% \end{macrocode}
+% Separator between currency symbol (not code) and value:
+% \begin{macrocode}
+ currency-symbol-sep .choice: ,
+ currency-symbol-sep / none .code:n =
+ {
+ \tl_clear:N \l_datatool_IE_sym_sep_tl
+ } ,
+ currency-symbol-sep / thin-space .code:n =
+ {
+ \tl_set:Nn \l_datatool_IE_sym_sep_tl { \, }
+ } ,
+ currency-symbol-sep / space .code:n =
+ {
+ \tl_set:Nn \l_datatool_IE_sym_sep_tl { ~ }
+ } ,
+ currency-symbol-sep / nbsp .code:n =
+ {
+ \tl_set:Nn \l_datatool_IE_sym_sep_tl { \nobreakspace }
+ } ,
+ currency-symbol-sep .initial:n = { none } ,
+% \end{macrocode}
+% Date and time styles:
+% \begin{macrocode}
+ date-style .choice: ,
+ date-style / dmyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_IE_datestyle_tl { ddmmyyyy }
+ } ,
+ date-style / mdyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_IE_datestyle_tl { mmddyyyy }
+ } ,
+ date-style / yyyymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_IE_datestyle_tl { yyyymmdd }
+ } ,
+ date-style / dmyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_IE_datestyle_tl { ddmmyy }
+ } ,
+ date-style / mdyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_IE_datestyle_tl { mmddyy }
+ } ,
+ date-style / yymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_IE_datestyle_tl { yymmdd }
+ } ,
+ date-variant .choice: ,
+ date-variant / slash .code:n =
+ {
+ \tl_set:Nn \l__datatool_IE_datevariant_tl { slash }
+ } ,
+ date-variant / hyphen .code:n =
+ {
+ \tl_set:Nn \l__datatool_IE_datevariant_tl { hyphen }
+ } ,
+ date-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_IE_datevariant_tl { dot }
+ } ,
+ date-variant / dialect .code:n =
+ {
+ \tl_set:Nn \l__datatool_IE_datevariant_tl
+ { \l_datatool_current_language_tl }
+ } ,
+ time-variant .choice: ,
+ time-variant / colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_IE_timevariant_tl { colon }
+ } ,
+ time-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_IE_timevariant_tl { dot }
+ } ,
+ time-variant / dialect .code:n =
+ {
+ \tl_if_eq:NnTF \l__datatool_IE_timevariant_tl { dot }
+ {
+ \tl_set:Nn \l__datatool_IE_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ }
+ {
+ \tl_if_in:NnF
+ \l__datatool_IE_timevariant_tl
+ { \l_datatool_current_language_tl }
+ {
+ \tl_set:Nn \l__datatool_IE_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ }
+ }
+ } ,
+ time-variant / dialect-colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_IE_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ } ,
+ time-variant / dialect-dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_IE_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ } ,
+ }
+% \end{macrocode}
+%\subsection{Hooks}
+%Command to update temporal parsing commands for this region:
+% \begin{macrocode}
+\newcommand \datatoolIESetTemporalParsers
+ {
+ \renewcommand \DTLCurrentLocaleParseTimeStamp
+ { \datatool_IE_parse_timestamp:NnTF }
+ \renewcommand \DTLCurrentLocaleParseDate
+ { \datatool_IE_parse_date:NnTF }
+ \renewcommand \DTLCurrentLocaleParseTime
+ { \datatool_IE_parse_time:NnTF }
+ \let
+ \DTLCurrentLocaleGetTimeZoneMap
+ \datatool_IE_get_timezone_map:n
+ }
+% \end{macrocode}
+%Set temporal formatting commands for this region. Currently this
+%just resets to the default, but may change in future.
+%Note that the defaults test if the applicable \sty{datetime2}
+%command is available and will fallback on ISO if not defined.
+%Bear in mind that the default style for \sty{datetime2} is
+%\texttt{iso} so there won't be a noticeable difference unless the
+%\sty{datetime2} regional setting is on.
+% \begin{macrocode}
+\newcommand \datatoolIESetTemporalFormatters
+ {
+ \let
+ \DTLCurrentLocaleFormatDate
+ \datatool_default_date_fmt:nnnn
+ \let
+ \DTLCurrentLocaleFormatTime
+ \datatool_default_time_fmt:nnn
+ \let
+ \DTLCurrentLocaleFormatTimeZone
+ \datatool_default_timezone_fmt:nn
+ \let
+ \DTLCurrentLocaleFormatTimeStampNoZone
+ \datatool_default_timestamp_fmt:nnnnnnn
+ \let
+ \DTLCurrentLocaleFormatTimeStampWithZone
+ \datatool_default_timestamp_fmt:nnnnnnnnn
+ \renewcommand \DTLCurrentLocaleTimeStampFmtSep { ~ }
+ }
+% \end{macrocode}
+%
+
+%Command to update currency and temporal parsing commands for this region:
+% \begin{macrocode}
+\newcommand \DTLIELocaleHook
+ {
+ \datatoolIESetNumberChars
+ \datatoolIESetCurrency
+ \datatoolIESetTemporalParsers
+ \datatoolIESetTemporalFormatters
+% \end{macrocode}
+%Allow language files to reference the region:
+% \begin{macrocode}
+ \tl_set:Nn \l_datatool_current_region_tl { IE }
+ }
+% \end{macrocode}
+%
+% Finished with \LaTeX3 syntax.
+% \begin{macrocode}
+\ExplSyntaxOff
+% \end{macrocode}
+%Note that the hook is added to the captions by \sty{datatool-base}
+%not by the region file.
+%\iffalse
+% \begin{macrocode}
+%</datatool-IE.ldf>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+%<*datatool-IM.ldf>
+% \end{macrocode}
+%\fi
+%\section{datatool-IM.ldf}\label{sec:datatool-IM}
+% Support for region IM.
+% \begin{macrocode}
+\TrackLangProvidesResource{IM}[2025/03/01 v1.0]
+% \end{macrocode}
+% Switch on \LaTeX3 syntax:
+% \begin{macrocode}
+\ExplSyntaxOn
+% \end{macrocode}
+%
+%\subsection{Numbers and Currency}
+%Set the number group and decimal symbols for this region.
+% \begin{macrocode}
+\cs_new:Nn \datatool_IM_set_numberchars_official:
+ {
+ \datatool_set_numberchars:nn { , } { . }
+ }
+% \end{macrocode}
+%Unofficial style.
+% \begin{macrocode}
+\cs_new:Nn \datatool_IM_set_numberchars_unofficial:
+ {
+ \datatool_set_thinspace_group_decimal_char:n { . }
+ }
+% \end{macrocode}
+%Hook to set the number group and decimal characters for the region:
+% \begin{macrocode}
+\newcommand \datatoolIMSetNumberChars
+ {
+ \bool_if:NT \l_datatool_region_set_numberchars_bool
+ {
+ \datatool_IM_set_numberchars_official:
+ }
+ }
+% \end{macrocode}
+%How to format the position of the currency symbol in relation to the value.
+% \begin{macrocode}
+\cs_new:Nn \datatool_IM_currency_position:nn
+ {
+ \dtlcurrprefixfmt { #1 } { #2 }
+ }
+% \end{macrocode}
+%Separator between currency symbol and value.
+% \begin{macrocode}
+\tl_new:N \l_datatool_IM_sym_sep_tl
+% \end{macrocode}
+% Set the currency format for this region.
+% \begin{macrocode}
+\newcommand \datatoolIMcurrencyfmt [ 2 ]
+ {
+ \datatool_IM_currency_position:nn
+ {
+ \datatoolIMsymbolprefix { IM }
+ #1
+ }
+ { #2 }
+ }
+% \end{macrocode}
+%Prefix for symbol, if required.
+% \begin{macrocode}
+\newcommand \datatoolIMsymbolprefix [ 1 ] { }
+% \end{macrocode}
+% Define the currency symbols for this region.
+% \begin{macrocode}
+\datatool_def_currency:nnnV
+ { \datatoolIMcurrencyfmt }
+ { IMP }
+ { \pounds }
+ \l_datatool_pound_tl
+% \end{macrocode}
+% Register the currency code with this region:
+% \begin{macrocode}
+\datatool_register_regional_currency_code:nn { IM } { IMP }
+% \end{macrocode}
+% Provide a command to set the currency for this region (for use
+% with any hook used when the locale changes).
+% NB this should do nothing with
+% \verb|\DTLsetup{region-currency=false}|
+% \begin{macrocode}
+\newcommand \datatoolIMSetCurrency
+ {
+ \bool_if:NT \l_datatool_region_set_currency_bool
+ {
+ \DTLsetdefaultcurrency { IMP }
+% \end{macrocode}
+%Number of digits that \cs{DTLdecimaltocurrency} should round to:
+% \begin{macrocode}
+ \renewcommand \DTLCurrentLocaleCurrencyDP { 2 }
+% \end{macrocode}
+%Separator between symbol and value:
+% \begin{macrocode}
+ \renewcommand \dtlcurrfmtsymsep { \l_datatool_IM_sym_sep_tl }
+ }
+ }
+% \end{macrocode}
+%
+%\subsection{Date and Time Parsing}
+% This defaults to day/month/year but may be changed with \cs{DTLsetLocaleOptions}. For example:
+%\begin{dispListing}
+%\DTLsetLocaleOptions{IM}{date-style=dmyyyy, date-variant=slash}
+%\end{dispListing}
+%An appropriate language file will need to also be installed to
+%parse dates containing month names or day of week names.
+%
+%Provide a way to configure parsing style.
+% \begin{macrocode}
+\tl_new:N \l__datatool_IM_datevariant_tl
+\tl_set:Nn \l__datatool_IM_datevariant_tl { slash }
+% \end{macrocode}
+%NB These token lists are used to form command names. The following is not
+%a format string.
+% \begin{macrocode}
+\tl_new:N \l__datatool_IM_datestyle_tl
+\tl_set:Nn \l__datatool_IM_datestyle_tl { ddmmyyyy }
+\tl_new:N \l__datatool_IM_timevariant_tl
+\tl_set:Nn \l__datatool_IM_timevariant_tl { colon }
+% \end{macrocode}
+%
+%Each parsing command defined below has final \marg{true} and \marg{false}
+%arguments (\code{TF}). These are used if parsing was successful (true) or if
+%parsing failed (false). The internal commands used by
+%\sty{datatool-base} have no need for solo branches (only \code{T} or only
+%\code{F}) so these commands are simply defined with \verb|\cs_new:Nn|
+%not as conditionals.
+%
+%\subsubsection{Time Stamp Parsing}
+%Use command
+%\begin{definition}
+%\cs{datatool\_}\meta{date-style}\verb|_hhmmss_tz_parse_timestamp:nnNnTF|
+%\end{definition}
+%with date regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{date-variant}\verb|_|\meta{date-style}\verb|_date_regex|
+%\end{definition}
+%and time regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{time-variant}\verb|_hhmmss_time_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_IM_parse_timestamp:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_IM_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_IM_datevariant_tl
+ _
+ \l__datatool_IM_datestyle_tl
+ _date_regex
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_IM_timevariant_tl
+ _hhmmss_time_regex
+ }
+ {
+ \use:c
+ {
+ datatool_
+ \l__datatool_IM_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_IM_datevariant_tl
+ _
+ \l__datatool_IM_datestyle_tl
+ _date_regex
+ }
+ {
+ c_datatool_
+ \l__datatool_IM_timevariant_tl
+ _hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_IM_timevariant_tl
+ { datatool-IM }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_IM_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_IM_timevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_IM_datevariant_tl
+ { datatool-IM }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_IM_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_IM_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_IM_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-IM }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_IM_datestyle_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%
+%\subsubsection{Date Parsing}
+%Use command \cs{datatool\_}\meta{style}\verb|_parse_date:NNnTF|
+%with regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{variant}\verb|_anchored_|\meta{style}\verb|_date_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_IM_parse_date:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_IM_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_IM_datevariant_tl
+ _anchored_
+ \l__datatool_IM_datestyle_tl
+ _date_regex
+ }
+ {
+ \exp_args:cc
+ {
+ datatool_
+ \l__datatool_IM_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_IM_datevariant_tl
+ _anchored_
+ \l__datatool_IM_datestyle_tl
+ _date_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_IM_datevariant_tl
+ { datatool-IM }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_IM_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_IM_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_IM_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-IM }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_IM_datestyle_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%
+%\subsubsection{Time Parsing}
+%Use command \cs{datatool\_}\meta{style}\verb|_parse_time:NNnTF|
+%with regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{variant}\verb|_anchored_|\meta{style}\verb|_time_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_IM_parse_time:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_IM_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ {
+ \datatool_hhmmss_parse_time:cNnTF
+ {
+ c_datatool_
+ \l__datatool_IM_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_IM_timevariant_tl
+ { datatool-IM }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_IM_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_IM_timevariant_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%
+%\subsubsection{Time Zone Mappings}
+%Define time zone mapping command for this region:
+% \begin{macrocode}
+\cs_new:Nn \datatool_IM_get_timezone_map:n
+ {
+ \datatool_region_get_timezone_map:n { IM / #1 }
+ }
+% \end{macrocode}
+%Define time zone IDs for this region (one-way map from ID to offset):
+% \begin{macrocode}
+\datatool_region_set_timezone_map:nn { IM / CET } { +01:00 }
+\datatool_region_set_timezone_map:nn { IM / GMT } { +00:00 }
+\datatool_region_set_timezone_map:nn { IM / BST } { +01:00 }
+\datatool_region_set_timezone_map:nn { IM / CEST } { +02:00 }
+% \end{macrocode}
+%
+%\subsection{Options}
+%Define options for this region:
+% \begin{macrocode}
+\datatool_locale_define_keys:nn { IM }
+ {
+ number-style .choices:nn =
+ { official, unofficial }
+ {
+ \exp_args:NNe \renewcommand
+ \datatoolIMSetNumberChars
+ {
+ \exp_not:N \bool_if:NT
+ \exp_not:N \l_datatool_region_set_numberchars_bool
+ {
+ \exp_not:c { datatool_IM_set_numberchars_ \l_keys_choice_tl : }
+ }
+ }
+ \tl_if_eq:NnT \l_datatool_current_region_tl { IM }
+ {
+ \datatoolIMSetNumberChars
+ }
+ } ,
+% \end{macrocode}
+% Currency symbol before or after value:
+% \begin{macrocode}
+ currency-symbol-position .choice: ,
+ currency-symbol-position / before .code:n =
+ {
+ \cs_set_eq:NN \datatool_IM_currency_position:nn \dtlcurrprefixfmt
+ } ,
+ currency-symbol-position / after .code:n =
+ {
+ \cs_set_eq:NN \datatool_IM_currency_position:nn \dtlcurrsuffixfmt
+ } ,
+% \end{macrocode}
+% Should the currency symbol be prefixed with the region code:
+% \begin{macrocode}
+ currency-symbol-prefix .choice: ,
+ currency-symbol-prefix / false .code:n =
+ {
+ \cs_set_eq:NN \datatoolIMsymbolprefix \use_none:n
+ } ,
+ currency-symbol-prefix / true .code:n =
+ {
+ \cs_set_eq:NN
+ \datatoolIMsymbolprefix
+ \datatool_currency_symbol_region_prefix:n
+ } ,
+ currency-symbol-prefix .default:n = { true } ,
+% \end{macrocode}
+% Separator between currency symbol (not code) and value:
+% \begin{macrocode}
+ currency-symbol-sep .choice: ,
+ currency-symbol-sep / none .code:n =
+ {
+ \tl_clear:N \l_datatool_IM_sym_sep_tl
+ } ,
+ currency-symbol-sep / thin-space .code:n =
+ {
+ \tl_set:Nn \l_datatool_IM_sym_sep_tl { \, }
+ } ,
+ currency-symbol-sep / space .code:n =
+ {
+ \tl_set:Nn \l_datatool_IM_sym_sep_tl { ~ }
+ } ,
+ currency-symbol-sep / nbsp .code:n =
+ {
+ \tl_set:Nn \l_datatool_IM_sym_sep_tl { \nobreakspace }
+ } ,
+ currency-symbol-sep . initial:n = { none } ,
+% \end{macrocode}
+% Date and time styles:
+% \begin{macrocode}
+ date-style .choice: ,
+ date-style / dmyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_IM_datestyle_tl { ddmmyyyy }
+ } ,
+ date-style / mdyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_IM_datestyle_tl { mmddyyyy }
+ } ,
+ date-style / yyyymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_IM_datestyle_tl { yyyymmdd }
+ } ,
+ date-style / dmyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_IM_datestyle_tl { ddmmyy }
+ } ,
+ date-style / mdyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_IM_datestyle_tl { mmddyy }
+ } ,
+ date-style / yymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_IM_datestyle_tl { yymmdd }
+ } ,
+ date-variant .choice: ,
+ date-variant / slash .code:n =
+ {
+ \tl_set:Nn \l__datatool_IM_datevariant_tl { slash }
+ } ,
+ date-variant / hyphen .code:n =
+ {
+ \tl_set:Nn \l__datatool_IM_datevariant_tl { hyphen }
+ } ,
+ date-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_IM_datevariant_tl { dot }
+ } ,
+ date-variant / dialect .code:n =
+ {
+ \tl_set:Nn \l__datatool_IM_datevariant_tl
+ { \l_datatool_current_language_tl }
+ } ,
+ time-variant .choice: ,
+ time-variant / colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_IM_timevariant_tl { colon }
+ } ,
+ time-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_IM_timevariant_tl { dot }
+ } ,
+ time-variant / dialect .code:n =
+ {
+ \tl_if_eq:NnTF \l__datatool_IM_timevariant_tl { dot }
+ {
+ \tl_set:Nn \l__datatool_IM_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ }
+ {
+ \tl_if_in:NnF
+ \l__datatool_IM_timevariant_tl
+ { \l_datatool_current_language_tl }
+ {
+ \tl_set:Nn \l__datatool_IM_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ }
+ }
+ } ,
+ time-variant / dialect-colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_IM_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ } ,
+ time-variant / dialect-dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_IM_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ } ,
+ }
+% \end{macrocode}
+%
+%\subsection{Hooks}
+%Command to update temporal parsing commands for this region:
+% \begin{macrocode}
+\newcommand \datatoolIMSetTemporalParsers
+ {
+ \renewcommand \DTLCurrentLocaleParseTimeStamp
+ { \datatool_IM_parse_timestamp:NnTF }
+ \renewcommand \DTLCurrentLocaleParseDate
+ { \datatool_IM_parse_date:NnTF }
+ \renewcommand \DTLCurrentLocaleParseTime
+ { \datatool_IM_parse_time:NnTF }
+ \let
+ \DTLCurrentLocaleGetTimeZoneMap
+ \datatool_IM_get_timezone_map:n
+ }
+% \end{macrocode}
+%Set temporal formatting commands for this region. Currently this
+%just resets to the default, but may change in future.
+%Note that the defaults test if the applicable \sty{datetime2}
+%command is available and will fallback on ISO if not defined.
+%Bear in mind that the default style for \sty{datetime2} is
+%\texttt{iso} so there won't be a noticeable difference unless the
+%\sty{datetime2} regional setting is on.
+% \begin{macrocode}
+\newcommand \datatoolIMSetTemporalFormatters
+ {
+ \let
+ \DTLCurrentLocaleFormatDate
+ \datatool_default_date_fmt:nnnn
+ \let
+ \DTLCurrentLocaleFormatTime
+ \datatool_default_time_fmt:nnn
+ \let
+ \DTLCurrentLocaleFormatTimeZone
+ \datatool_default_timezone_fmt:nn
+ \let
+ \DTLCurrentLocaleFormatTimeStampNoZone
+ \datatool_default_timestamp_fmt:nnnnnnn
+ \let
+ \DTLCurrentLocaleFormatTimeStampWithZone
+ \datatool_default_timestamp_fmt:nnnnnnnnn
+ \renewcommand \DTLCurrentLocaleTimeStampFmtSep { ~ }
+ }
+% \end{macrocode}
+%
+%
+%Command to update currency and temporal parsing commands for this region:
+% \begin{macrocode}
+\newcommand \DTLIMLocaleHook
+ {
+ \datatoolIMSetNumberChars
+ \datatoolIMSetCurrency
+ \datatoolIMSetTemporalParsers
+ \datatoolIMSetTemporalFormatters
+% \end{macrocode}
+%Allow language files to reference the region:
+% \begin{macrocode}
+ \tl_set:Nn \l_datatool_current_region_tl { IM }
+ }
+% \end{macrocode}
+%
+% Finished with \LaTeX3 syntax.
+% \begin{macrocode}
+\ExplSyntaxOff
+% \end{macrocode}
+%Note that the hook is added to the captions by \sty{datatool-base}
+%not by the region file.
+%\iffalse
+% \begin{macrocode}
+%</datatool-IM.ldf>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+%<*datatool-JE.ldf>
+% \end{macrocode}
+%\fi
+%\section{datatool-JE.ldf}\label{sec:datatool-JE}
+% Support for region JE.
+% \begin{macrocode}
+\TrackLangProvidesResource{JE}[2025/03/01 v1.0]
+% \end{macrocode}
+% Switch on \LaTeX3 syntax:
+% \begin{macrocode}
+\ExplSyntaxOn
+% \end{macrocode}
+%
+%\subsection{Numbers and Currency}
+%Set the number group and decimal symbols for this region.
+% \begin{macrocode}
+\cs_new:Nn \datatool_JE_set_numberchars_official:
+ {
+ \datatool_set_numberchars:nn { , } { . }
+ }
+% \end{macrocode}
+%Unofficial style.
+% \begin{macrocode}
+\cs_new:Nn \datatool_JE_set_numberchars_unofficial:
+ {
+ \datatool_set_thinspace_group_decimal_char:n { . }
+ }
+% \end{macrocode}
+%Hook to set the number group and decimal characters for the region:
+% \begin{macrocode}
+\newcommand \datatoolJESetNumberChars
+ {
+ \bool_if:NT \l_datatool_region_set_numberchars_bool
+ {
+ \datatool_JE_set_numberchars_official:
+ }
+ }
+% \end{macrocode}
+%How to format the position of the currency symbol in relation to the value.
+% \begin{macrocode}
+\cs_new:Nn \datatool_JE_currency_position:nn
+ {
+ \dtlcurrprefixfmt { #1 } { #2 }
+ }
+% \end{macrocode}
+%Separator between currency symbol and value.
+% \begin{macrocode}
+\tl_new:N \l_datatool_JE_sym_sep_tl
+% \end{macrocode}
+% Set the currency format for this region.
+% \begin{macrocode}
+\newcommand \datatoolJEcurrencyfmt [ 2 ]
+ {
+ \datatool_JE_currency_position:nn
+ {
+ \datatoolJEsymbolprefix { JE }
+ #1
+ }
+ { #2 }
+ }
+% \end{macrocode}
+%Prefix for symbol, if required.
+% \begin{macrocode}
+\newcommand \datatoolJEsymbolprefix [ 1 ] { }
+% \end{macrocode}
+% Define the currency symbols for this region.
+% \begin{macrocode}
+\datatool_def_currency:nnnV
+ { \datatoolJEcurrencyfmt }
+ { JEP }
+ { \pounds }
+ \l_datatool_pound_tl
+% \end{macrocode}
+% Register the currency code with this region:
+% \begin{macrocode}
+\datatool_register_regional_currency_code:nn { JE } { JEP }
+% \end{macrocode}
+% Provide a command to set the currency for this region (for use
+% with any hook used when the locale changes).
+% NB this should do nothing with
+% \verb|\DTLsetup{region-currency=false}|
+% \begin{macrocode}
+\newcommand \datatoolJESetCurrency
+ {
+ \bool_if:NT \l_datatool_region_set_currency_bool
+ {
+ \DTLsetdefaultcurrency { JEP }
+% \end{macrocode}
+%Number of digits that \cs{DTLdecimaltocurrency} should round to:
+% \begin{macrocode}
+ \renewcommand \DTLCurrentLocaleCurrencyDP { 2 }
+% \end{macrocode}
+%Separator between symbol and value:
+% \begin{macrocode}
+ \renewcommand \dtlcurrfmtsymsep { \l_datatool_JE_sym_sep_tl }
+ }
+ }
+% \end{macrocode}
+%
+%\subsection{Date and Time Parsing}
+% This defaults to day/month/year but may be changed with \cs{DTLsetLocaleOptions}. For example:
+%\begin{dispListing}
+%\DTLsetLocaleOptions{JE}{date-style=dmyyyy, date-variant=slash}
+%\end{dispListing}
+%An appropriate language file will need to also be installed to
+%parse dates containing month names or day of week names.
+%
+%Provide a way to configure parsing style.
+% \begin{macrocode}
+\tl_new:N \l__datatool_JE_datevariant_tl
+\tl_set:Nn \l__datatool_JE_datevariant_tl { slash }
+% \end{macrocode}
+%NB These token lists are used to form command names. The following is not
+%a format string.
+% \begin{macrocode}
+\tl_new:N \l__datatool_JE_datestyle_tl
+\tl_set:Nn \l__datatool_JE_datestyle_tl { ddmmyyyy }
+\tl_new:N \l__datatool_JE_timevariant_tl
+\tl_set:Nn \l__datatool_JE_timevariant_tl { colon }
+% \end{macrocode}
+%
+%Each parsing command defined below has final \marg{true} and \marg{false}
+%arguments (\code{TF}). These are used if parsing was successful (true) or if
+%parsing failed (false). The internal commands used by
+%\sty{datatool-base} have no need for solo branches (only \code{T} or only
+%\code{F}) so these commands are simply defined with \verb|\cs_new:Nn|
+%not as conditionals.
+%
+%\subsubsection{Time Stamp Parsing}
+%Use command
+%\begin{definition}
+%\cs{datatool\_}\meta{date-style}\verb|_hhmmss_tz_parse_timestamp:nnNnTF|
+%\end{definition}
+%with date regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{date-variant}\verb|_|\meta{date-style}\verb|_date_regex|
+%\end{definition}
+%and time regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{time-variant}\verb|_hhmmss_time_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_JE_parse_timestamp:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_JE_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_JE_datevariant_tl
+ _
+ \l__datatool_JE_datestyle_tl
+ _date_regex
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_JE_timevariant_tl
+ _hhmmss_time_regex
+ }
+ {
+ \use:c
+ {
+ datatool_
+ \l__datatool_JE_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_JE_datevariant_tl
+ _
+ \l__datatool_JE_datestyle_tl
+ _date_regex
+ }
+ {
+ c_datatool_
+ \l__datatool_JE_timevariant_tl
+ _hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_JE_timevariant_tl
+ { datatool-JE }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_JE_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_JE_timevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_JE_datevariant_tl
+ { datatool-JE }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_JE_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_JE_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_JE_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-JE }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_JE_datestyle_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%
+%\subsubsection{Date Parsing}
+%Use command \cs{datatool\_}\meta{style}\verb|_parse_date:NNnTF|
+%with regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{variant}\verb|_anchored_|\meta{style}\verb|_date_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_JE_parse_date:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_JE_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_JE_datevariant_tl
+ _anchored_
+ \l__datatool_JE_datestyle_tl
+ _date_regex
+ }
+ {
+ \exp_args:cc
+ {
+ datatool_
+ \l__datatool_JE_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_JE_datevariant_tl
+ _anchored_
+ \l__datatool_JE_datestyle_tl
+ _date_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_JE_datevariant_tl
+ { datatool-JE }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_JE_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_JE_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_JE_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-JE }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_JE_datestyle_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%
+%\subsubsection{Time Parsing}
+%Use command \cs{datatool\_}\meta{style}\verb|_parse_time:NNnTF|
+%with regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{variant}\verb|_anchored_|\meta{style}\verb|_time_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_JE_parse_time:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_JE_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ {
+ \datatool_hhmmss_parse_time:cNnTF
+ {
+ c_datatool_
+ \l__datatool_JE_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_JE_timevariant_tl
+ { datatool-JE }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_JE_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_JE_timevariant_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%
+%\subsubsection{Time Zone Mappings}
+%Define time zone mapping command for this region:
+% \begin{macrocode}
+\cs_new:Nn \datatool_JE_get_timezone_map:n
+ {
+ \datatool_region_get_timezone_map:n { JE / #1 }
+ }
+% \end{macrocode}
+%Define time zone IDs for this region (one-way map from ID to offset):
+% \begin{macrocode}
+\datatool_region_set_timezone_map:nn { JE / CEST } { +02:00 }
+\datatool_region_set_timezone_map:nn { JE / GMT } { +00:00 }
+\datatool_region_set_timezone_map:nn { JE / CET } { +01:00 }
+\datatool_region_set_timezone_map:nn { JE / BST } { +01:00 }
+% \end{macrocode}
+%
+%\subsection{Options}
+%Define options for this region:
+% \begin{macrocode}
+\datatool_locale_define_keys:nn { JE }
+ {
+ number-style .choices:nn =
+ { official, unofficial }
+ {
+ \exp_args:NNe \renewcommand
+ \datatoolJESetNumberChars
+ {
+ \exp_not:N \bool_if:NT
+ \exp_not:N \l_datatool_region_set_numberchars_bool
+ {
+ \exp_not:c { datatool_JE_set_numberchars_ \l_keys_choice_tl : }
+ }
+ }
+ \tl_if_eq:NnT \l_datatool_current_region_tl { JE }
+ {
+ \datatoolJESetNumberChars
+ }
+ } ,
+% \end{macrocode}
+% Currency symbol before or after value:
+% \begin{macrocode}
+ currency-symbol-position .choice: ,
+ currency-symbol-position / before .code:n =
+ {
+ \cs_set_eq:NN \datatool_JE_currency_position:nn \dtlcurrprefixfmt
+ } ,
+ currency-symbol-position / after .code:n =
+ {
+ \cs_set_eq:NN \datatool_JE_currency_position:nn \dtlcurrsuffixfmt
+ } ,
+% \end{macrocode}
+% Should the currency symbol be prefixed with the region code:
+% \begin{macrocode}
+ currency-symbol-prefix .choice: ,
+ currency-symbol-prefix / false .code:n =
+ {
+ \cs_set_eq:NN \datatoolJEsymbolprefix \use_none:n
+ } ,
+ currency-symbol-prefix / true .code:n =
+ {
+ \cs_set_eq:NN
+ \datatoolJEsymbolprefix
+ \datatool_currency_symbol_region_prefix:n
+ } ,
+ currency-symbol-prefix .default:n = { true } ,
+% \end{macrocode}
+% Separator between currency symbol (not code) and value:
+% \begin{macrocode}
+ currency-symbol-sep .choice: ,
+ currency-symbol-sep / none .code:n =
+ {
+ \tl_clear:N \l_datatool_JE_sym_sep_tl
+ } ,
+ currency-symbol-sep / thin-space .code:n =
+ {
+ \tl_set:Nn \l_datatool_JE_sym_sep_tl { \, }
+ } ,
+ currency-symbol-sep / space .code:n =
+ {
+ \tl_set:Nn \l_datatool_JE_sym_sep_tl { ~ }
+ } ,
+ currency-symbol-sep / nbsp .code:n =
+ {
+ \tl_set:Nn \l_datatool_JE_sym_sep_tl { \nobreakspace }
+ } ,
+ currency-symbol-sep . initial:n = { none } ,
+% \end{macrocode}
+% Date and time styles:
+% \begin{macrocode}
+ date-style .choice: ,
+ date-style / dmyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_JE_datestyle_tl { ddmmyyyy }
+ } ,
+ date-style / mdyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_JE_datestyle_tl { mmddyyyy }
+ } ,
+ date-style / yyyymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_JE_datestyle_tl { yyyymmdd }
+ } ,
+ date-style / dmyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_JE_datestyle_tl { ddmmyy }
+ } ,
+ date-style / mdyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_JE_datestyle_tl { mmddyy }
+ } ,
+ date-style / yymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_JE_datestyle_tl { yymmdd }
+ } ,
+ date-variant .choice: ,
+ date-variant / slash .code:n =
+ {
+ \tl_set:Nn \l__datatool_JE_datevariant_tl { slash }
+ } ,
+ date-variant / hyphen .code:n =
+ {
+ \tl_set:Nn \l__datatool_JE_datevariant_tl { hyphen }
+ } ,
+ date-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_JE_datevariant_tl { dot }
+ } ,
+ date-variant / dialect .code:n =
+ {
+ \tl_set:Nn \l__datatool_JE_datevariant_tl
+ { \l_datatool_current_language_tl }
+ } ,
+ time-variant .choice: ,
+ time-variant / colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_JE_timevariant_tl { colon }
+ } ,
+ time-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_JE_timevariant_tl { dot }
+ } ,
+ time-variant / dialect .code:n =
+ {
+ \tl_if_eq:NnTF \l__datatool_JE_timevariant_tl { dot }
+ {
+ \tl_set:Nn \l__datatool_JE_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ }
+ {
+ \tl_if_in:NnF
+ \l__datatool_JE_timevariant_tl
+ { \l_datatool_current_language_tl }
+ {
+ \tl_set:Nn \l__datatool_JE_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ }
+ }
+ } ,
+ time-variant / dialect-colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_JE_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ } ,
+ time-variant / dialect-dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_JE_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ } ,
+ }
+% \end{macrocode}
+%
+%\subsection{Hooks}
+%Command to update temporal parsing commands for this region:
+% \begin{macrocode}
+\newcommand \datatoolJESetTemporalParsers
+ {
+ \renewcommand \DTLCurrentLocaleParseTimeStamp
+ { \datatool_JE_parse_timestamp:NnTF }
+ \renewcommand \DTLCurrentLocaleParseDate
+ { \datatool_JE_parse_date:NnTF }
+ \renewcommand \DTLCurrentLocaleParseTime
+ { \datatool_JE_parse_time:NnTF }
+ \let
+ \DTLCurrentLocaleGetTimeZoneMap
+ \datatool_JE_get_timezone_map:n
+ }
+% \end{macrocode}
+%Set temporal formatting commands for this region. Currently this
+%just resets to the default, but may change in future.
+%Note that the defaults test if the applicable \sty{datetime2}
+%command is available and will fallback on ISO if not defined.
+%Bear in mind that the default style for \sty{datetime2} is
+%\texttt{iso} so there won't be a noticeable difference unless the
+%\sty{datetime2} regional setting is on.
+% \begin{macrocode}
+\newcommand \datatoolJESetTemporalFormatters
+ {
+ \let
+ \DTLCurrentLocaleFormatDate
+ \datatool_default_date_fmt:nnnn
+ \let
+ \DTLCurrentLocaleFormatTime
+ \datatool_default_time_fmt:nnn
+ \let
+ \DTLCurrentLocaleFormatTimeZone
+ \datatool_default_timezone_fmt:nn
+ \let
+ \DTLCurrentLocaleFormatTimeStampNoZone
+ \datatool_default_timestamp_fmt:nnnnnnn
+ \let
+ \DTLCurrentLocaleFormatTimeStampWithZone
+ \datatool_default_timestamp_fmt:nnnnnnnnn
+ \renewcommand \DTLCurrentLocaleTimeStampFmtSep { ~ }
+ }
+% \end{macrocode}
+%
+%
+%Command to update currency and temporal parsing commands for this region:
+% \begin{macrocode}
+\newcommand \DTLJELocaleHook
+ {
+ \datatoolJESetNumberChars
+ \datatoolJESetCurrency
+ \datatoolJESetTemporalParsers
+ \datatoolJESetTemporalFormatters
+% \end{macrocode}
+%Allow language files to reference the region:
+% \begin{macrocode}
+ \tl_set:Nn \l_datatool_current_region_tl { JE }
+ }
+% \end{macrocode}
+%
+% Finished with \LaTeX3 syntax.
+% \begin{macrocode}
+\ExplSyntaxOff
+% \end{macrocode}
+%Note that the hook is added to the captions by \sty{datatool-base}
+%not by the region file.
+%\iffalse
+% \begin{macrocode}
+%</datatool-JE.ldf>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+%<*datatool-NZ.ldf>
+% \end{macrocode}
+%\fi
+%\section{datatool-NZ.ldf}\label{sec:datatool-NZ}
+% Support for region NZ.
+% \begin{macrocode}
+\TrackLangProvidesResource{NZ}[2025/03/01 v1.0]
+% \end{macrocode}
+% Switch on \LaTeX3 syntax:
+% \begin{macrocode}
+\ExplSyntaxOn
+% \end{macrocode}
+%
+%\subsection{Numbers and Currency}
+%Set the number group and decimal symbols for this region.
+% \begin{macrocode}
+\cs_new:Nn \datatool_NZ_set_numberchars_official:
+ {
+ \datatool_set_numberchars:nn { , } { . }
+ }
+% \end{macrocode}
+%Unofficial style.
+% \begin{macrocode}
+\cs_new:Nn \datatool_NZ_set_numberchars_unofficial:
+ {
+ \datatool_set_thinspace_group_decimal_char:n { . }
+ }
+% \end{macrocode}
+%Hook to set the number group and decimal characters for the region:
+% \begin{macrocode}
+\newcommand \datatoolNZSetNumberChars
+ {
+ \bool_if:NT \l_datatool_region_set_numberchars_bool
+ {
+ \datatool_NZ_set_numberchars_official:
+ }
+ }
+% \end{macrocode}
+%How to format the position of the currency symbol in relation to the value.
+% \begin{macrocode}
+\cs_new:Nn \datatool_NZ_currency_position:nn
+ {
+ \dtlcurrprefixfmt { #1 } { #2 }
+ }
+% \end{macrocode}
+%Separator between currency symbol and value.
+% \begin{macrocode}
+\tl_new:N \l_datatool_NZ_sym_sep_tl
+% \end{macrocode}
+% Set the currency format for this region.
+% \begin{macrocode}
+\newcommand \datatoolNZcurrencyfmt [ 2 ]
+ {
+ \datatool_NZ_currency_position:nn
+ {
+ \datatoolNZsymbolprefix { NZ }
+ #1
+ }
+ { #2 }
+ }
+% \end{macrocode}
+%Prefix for symbol, if required.
+% \begin{macrocode}
+\newcommand \datatoolNZsymbolprefix [ 1 ] { }
+% \end{macrocode}
+% Define the currency symbols for this region.
+% \begin{macrocode}
+\datatool_def_currency:nnnV
+ { \datatoolNZcurrencyfmt }
+ { NZD }
+ { \$ }
+ \c_dollar_str
+% \end{macrocode}
+% Register the currency code with this region:
+% \begin{macrocode}
+\datatool_register_regional_currency_code:nn { NZ } { NZD }
+% \end{macrocode}
+% Provide a command to set the currency for this region (for use
+% with any hook used when the locale changes).
+% NB this should do nothing with
+% \verb|\DTLsetup{region-currency=false}|
+% \begin{macrocode}
+\newcommand \datatoolNZSetCurrency
+ {
+ \bool_if:NT \l_datatool_region_set_currency_bool
+ {
+ \DTLsetdefaultcurrency { NZD }
+% \end{macrocode}
+%Number of digits that \cs{DTLdecimaltocurrency} should round to:
+% \begin{macrocode}
+ \renewcommand \DTLCurrentLocaleCurrencyDP { 2 }
+% \end{macrocode}
+%Separator between symbol and value:
+% \begin{macrocode}
+ \renewcommand \dtlcurrfmtsymsep { \l_datatool_NZ_sym_sep_tl }
+ }
+ }
+% \end{macrocode}
+%
+%\subsection{Date and Time Parsing}
+% This defaults to day/month/year but may be changed with \cs{DTLsetLocaleOptions}. For example:
+%\begin{dispListing}
+%\DTLsetLocaleOptions{NZ}{date-style=dmyyyy, date-variant=slash}
+%\end{dispListing}
+%An appropriate language file will need to also be installed to
+%parse dates containing month names or day of week names.
+%
+%Provide a way to configure parsing style.
+% \begin{macrocode}
+\tl_new:N \l__datatool_NZ_datevariant_tl
+\tl_set:Nn \l__datatool_NZ_datevariant_tl { slash }
+% \end{macrocode}
+%NB These token lists are used to form command names. The following is not
+%a format string.
+% \begin{macrocode}
+\tl_new:N \l__datatool_NZ_datestyle_tl
+\tl_set:Nn \l__datatool_NZ_datestyle_tl { ddmmyyyy }
+\tl_new:N \l__datatool_NZ_timevariant_tl
+\tl_set:Nn \l__datatool_NZ_timevariant_tl { colon }
+% \end{macrocode}
+%
+%Each parsing command defined below has final \marg{true} and \marg{false}
+%arguments (\code{TF}). These are used if parsing was successful (true) or if
+%parsing failed (false). The internal commands used by
+%\sty{datatool-base} have no need for solo branches (only \code{T} or only
+%\code{F}) so these commands are simply defined with \verb|\cs_new:Nn|
+%not as conditionals.
+%
+%\subsubsection{Time Stamp Parsing}
+%Use command
+%\begin{definition}
+%\cs{datatool\_}\meta{date-style}\verb|_hhmmss_tz_parse_timestamp:nnNnTF|
+%\end{definition}
+%with date regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{date-variant}\verb|_|\meta{date-style}\verb|_date_regex|
+%\end{definition}
+%and time regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{time-variant}\verb|_hhmmss_time_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_NZ_parse_timestamp:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_NZ_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_NZ_datevariant_tl
+ _
+ \l__datatool_NZ_datestyle_tl
+ _date_regex
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_NZ_timevariant_tl
+ _hhmmss_time_regex
+ }
+ {
+ \use:c
+ {
+ datatool_
+ \l__datatool_NZ_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_NZ_datevariant_tl
+ _
+ \l__datatool_NZ_datestyle_tl
+ _date_regex
+ }
+ {
+ c_datatool_
+ \l__datatool_NZ_timevariant_tl
+ _hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_NZ_timevariant_tl
+ { datatool-NZ }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_NZ_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_NZ_timevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_NZ_datevariant_tl
+ { datatool-NZ }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_NZ_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_NZ_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_NZ_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-NZ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_NZ_datestyle_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%
+%\subsubsection{Date Parsing}
+%Use command \cs{datatool\_}\meta{style}\verb|_parse_date:NNnTF|
+%with regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{variant}\verb|_anchored_|\meta{style}\verb|_date_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_NZ_parse_date:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_NZ_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_NZ_datevariant_tl
+ _anchored_
+ \l__datatool_NZ_datestyle_tl
+ _date_regex
+ }
+ {
+ \exp_args:cc
+ {
+ datatool_
+ \l__datatool_NZ_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_NZ_datevariant_tl
+ _anchored_
+ \l__datatool_NZ_datestyle_tl
+ _date_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_NZ_datevariant_tl
+ { datatool-NZ }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_NZ_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_NZ_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_NZ_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-NZ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_NZ_datestyle_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%
+%\subsubsection{Time Parsing}
+%Use command \cs{datatool\_}\meta{style}\verb|_parse_time:NNnTF|
+%with regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{variant}\verb|_anchored_|\meta{style}\verb|_time_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_NZ_parse_time:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_NZ_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ {
+ \datatool_hhmmss_parse_time:cNnTF
+ {
+ c_datatool_
+ \l__datatool_NZ_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_NZ_timevariant_tl
+ { datatool-NZ }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_NZ_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_NZ_timevariant_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%
+%\subsubsection{Time Zone Mappings}
+%Define time zone mapping command for this region:
+% \begin{macrocode}
+\cs_new:Nn \datatool_NZ_get_timezone_map:n
+ {
+ \datatool_region_get_timezone_map:n { NZ / #1 }
+ }
+% \end{macrocode}
+%Define time zone IDs for this region (one-way map from ID to offset):
+% \begin{macrocode}
+\datatool_region_set_timezone_map:nn { NZ / NZST } { +12:00 }
+\datatool_region_set_timezone_map:nn { NZ / CHADT } { +13:45 }
+\datatool_region_set_timezone_map:nn { NZ / NZDT } { +13:00 }
+\datatool_region_set_timezone_map:nn { NZ / CHAST } { +12:45 }
+% \end{macrocode}
+%
+%\subsection{Options}
+%Define options for this region:
+% \begin{macrocode}
+\datatool_locale_define_keys:nn { NZ }
+ {
+ number-style .choices:nn =
+ { official, unofficial }
+ {
+ \exp_args:NNe \renewcommand
+ \datatoolNZSetNumberChars
+ {
+ \exp_not:N \bool_if:NT
+ \exp_not:N \l_datatool_region_set_numberchars_bool
+ {
+ \exp_not:c { datatool_NZ_set_numberchars_ \l_keys_choice_tl : }
+ }
+ }
+ \tl_if_eq:NnT \l_datatool_current_region_tl { NZ }
+ {
+ \datatoolNZSetNumberChars
+ }
+ } ,
+% \end{macrocode}
+% Currency symbol before or after value:
+% \begin{macrocode}
+ currency-symbol-position .choice: ,
+ currency-symbol-position / before .code:n =
+ {
+ \cs_set_eq:NN \datatool_NZ_currency_position:nn \dtlcurrprefixfmt
+ } ,
+ currency-symbol-position / after .code:n =
+ {
+ \cs_set_eq:NN \datatool_NZ_currency_position:nn \dtlcurrsuffixfmt
+ } ,
+% \end{macrocode}
+% Should the currency symbol be prefixed with the region code:
+% \begin{macrocode}
+ currency-symbol-prefix .choice: ,
+ currency-symbol-prefix / false .code:n =
+ {
+ \cs_set_eq:NN \datatoolNZsymbolprefix \use_none:n
+ } ,
+ currency-symbol-prefix / true .code:n =
+ {
+ \cs_set_eq:NN
+ \datatoolNZsymbolprefix
+ \datatool_currency_symbol_region_prefix:n
+ } ,
+ currency-symbol-prefix .default:n = { true } ,
+% \end{macrocode}
+% Separator between currency symbol (not code) and value:
+% \begin{macrocode}
+ currency-symbol-sep .choice: ,
+ currency-symbol-sep / none .code:n =
+ {
+ \tl_clear:N \l_datatool_NZ_sym_sep_tl
+ } ,
+ currency-symbol-sep / thin-space .code:n =
+ {
+ \tl_set:Nn \l_datatool_NZ_sym_sep_tl { \, }
+ } ,
+ currency-symbol-sep / space .code:n =
+ {
+ \tl_set:Nn \l_datatool_NZ_sym_sep_tl { ~ }
+ } ,
+ currency-symbol-sep / nbsp .code:n =
+ {
+ \tl_set:Nn \l_datatool_NZ_sym_sep_tl { \nobreakspace }
+ } ,
+ currency-symbol-sep . initial:n = { none } ,
+% \end{macrocode}
+% Date and time styles:
+% \begin{macrocode}
+ date-style .choice: ,
+ date-style / dmyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_NZ_datestyle_tl { ddmmyyyy }
+ } ,
+ date-style / mdyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_NZ_datestyle_tl { mmddyyyy }
+ } ,
+ date-style / yyyymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_NZ_datestyle_tl { yyyymmdd }
+ } ,
+ date-style / dmyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_NZ_datestyle_tl { ddmmyy }
+ } ,
+ date-style / mdyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_NZ_datestyle_tl { mmddyy }
+ } ,
+ date-style / yymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_NZ_datestyle_tl { yymmdd }
+ } ,
+ date-variant .choice: ,
+ date-variant / slash .code:n =
+ {
+ \tl_set:Nn \l__datatool_NZ_datevariant_tl { slash }
+ } ,
+ date-variant / hyphen .code:n =
+ {
+ \tl_set:Nn \l__datatool_NZ_datevariant_tl { hyphen }
+ } ,
+ date-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_NZ_datevariant_tl { dot }
+ } ,
+ date-variant / dialect .code:n =
+ {
+ \tl_set:Nn \l__datatool_NZ_datevariant_tl
+ { \l_datatool_current_language_tl }
+ } ,
+ time-variant .choice: ,
+ time-variant / colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_NZ_timevariant_tl { colon }
+ } ,
+ time-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_NZ_timevariant_tl { dot }
+ } ,
+ time-variant / dialect .code:n =
+ {
+ \tl_if_eq:NnTF \l__datatool_NZ_timevariant_tl { dot }
+ {
+ \tl_set:Nn \l__datatool_NZ_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ }
+ {
+ \tl_if_in:NnF
+ \l__datatool_NZ_timevariant_tl
+ { \l_datatool_current_language_tl }
+ {
+ \tl_set:Nn \l__datatool_NZ_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ }
+ }
+ } ,
+ time-variant / dialect-colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_NZ_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ } ,
+ time-variant / dialect-dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_NZ_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ } ,
+ }
+% \end{macrocode}
+%
+%\subsection{Hooks}
+%Command to update temporal parsing commands for this region:
+% \begin{macrocode}
+\newcommand \datatoolNZSetTemporalParsers
+ {
+ \renewcommand \DTLCurrentLocaleParseTimeStamp
+ { \datatool_NZ_parse_timestamp:NnTF }
+ \renewcommand \DTLCurrentLocaleParseDate
+ { \datatool_NZ_parse_date:NnTF }
+ \renewcommand \DTLCurrentLocaleParseTime
+ { \datatool_NZ_parse_time:NnTF }
+ \let
+ \DTLCurrentLocaleGetTimeZoneMap
+ \datatool_NZ_get_timezone_map:n
+ }
+% \end{macrocode}
+%Set temporal formatting commands for this region. Currently this
+%just resets to the default, but may change in future.
+%Note that the defaults test if the applicable \sty{datetime2}
+%command is available and will fallback on ISO if not defined.
+%Bear in mind that the default style for \sty{datetime2} is
+%\texttt{iso} so there won't be a noticeable difference unless the
+%\sty{datetime2} regional setting is on.
+% \begin{macrocode}
+\newcommand \datatoolNZSetTemporalFormatters
+ {
+ \let
+ \DTLCurrentLocaleFormatDate
+ \datatool_default_date_fmt:nnnn
+ \let
+ \DTLCurrentLocaleFormatTime
+ \datatool_default_time_fmt:nnn
+ \let
+ \DTLCurrentLocaleFormatTimeZone
+ \datatool_default_timezone_fmt:nn
+ \let
+ \DTLCurrentLocaleFormatTimeStampNoZone
+ \datatool_default_timestamp_fmt:nnnnnnn
+ \let
+ \DTLCurrentLocaleFormatTimeStampWithZone
+ \datatool_default_timestamp_fmt:nnnnnnnnn
+ \renewcommand \DTLCurrentLocaleTimeStampFmtSep { ~ }
+ }
+% \end{macrocode}
+%
+%
+%Command to update currency and temporal parsing commands for this region:
+% \begin{macrocode}
+\newcommand \DTLNZLocaleHook
+ {
+ \datatoolNZSetNumberChars
+ \datatoolNZSetCurrency
+ \datatoolNZSetTemporalParsers
+ \datatoolNZSetTemporalFormatters
+% \end{macrocode}
+%Allow language files to reference the region:
+% \begin{macrocode}
+ \tl_set:Nn \l_datatool_current_region_tl { NZ }
+ }
+% \end{macrocode}
+%
+% Finished with \LaTeX3 syntax.
+% \begin{macrocode}
+\ExplSyntaxOff
+% \end{macrocode}
+%Note that the hook is added to the captions by \sty{datatool-base}
+%not by the region file.
+%\iffalse
+% \begin{macrocode}
+%</datatool-NZ.ldf>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+%<*datatool-US.ldf>
+% \end{macrocode}
+%\fi
+%\section{datatool-US.ldf}\label{sec:datatool-US}
+% Support for region US.
+% \begin{macrocode}
+\TrackLangProvidesResource{US}[2025/03/01 v1.0]
+% \end{macrocode}
+% Switch on \LaTeX3 syntax:
+% \begin{macrocode}
+\ExplSyntaxOn
+% \end{macrocode}
+%\subsection{Numbers and Currency}
+%Set the number group and decimal symbols for this region.
+% \begin{macrocode}
+\cs_new:Nn \datatool_US_set_numberchars_official:
+ {
+ \datatool_set_numberchars:nn { , } { . }
+ }
+% \end{macrocode}
+%Unofficial style.
+% \begin{macrocode}
+\cs_new:Nn \datatool_US_set_numberchars_unofficial:
+ {
+ \datatool_set_thinspace_group_decimal_char:n { . }
+ }
+% \end{macrocode}
+%Hook to set the number group and decimal characters for the region:
+% \begin{macrocode}
+\newcommand \datatoolUSSetNumberChars
+ {
+ \bool_if:NT \l_datatool_region_set_numberchars_bool
+ {
+ \datatool_US_set_numberchars_official:
+ }
+ }
+% \end{macrocode}
+%How to format the position of the currency symbol in relation to the value.
+% \begin{macrocode}
+\cs_new:Nn \datatool_US_currency_position:nn
+ {
+ \dtlcurrprefixfmt { #1 } { #2 }
+ }
+% \end{macrocode}
+%Separator between currency symbol and value.
+% \begin{macrocode}
+\tl_new:N \l_datatool_US_sym_sep_tl
+% \end{macrocode}
+% Set the currency format for this region.
+% \begin{macrocode}
+\newcommand \datatoolUScurrencyfmt [ 2 ]
+ {
+ \datatool_US_currency_position:nn
+ {
+ \datatoolUSsymbolprefix { US }
+ #1
+ }
+ { #2 }
+ }
+% \end{macrocode}
+%Prefix for symbol, if required.
+% \begin{macrocode}
+\newcommand \datatoolUSsymbolprefix [ 1 ] { }
+% \end{macrocode}
+% Define the currency symbols for this region.
+% \begin{macrocode}
+\datatool_def_currency:nnnV
+ { \datatoolUScurrencyfmt }
+ { USD }
+ { \$ }
+ \c_dollar_str
+% \end{macrocode}
+% Register the currency code with this region:
+% \begin{macrocode}
+\datatool_register_regional_currency_code:nn { US } { USD }
+% \end{macrocode}
+% Provide a command to set the currency for this region (for use
+% with any hook used when the locale changes).
+% NB this should do nothing with
+% \verb|\DTLsetup{region-currency=false}|
+% \begin{macrocode}
+\newcommand \datatoolUSSetCurrency
+ {
+ \bool_if:NT \l_datatool_region_set_currency_bool
+ {
+ \DTLsetdefaultcurrency { USD }
+% \end{macrocode}
+%Number of digits that \cs{DTLdecimaltocurrency} should round to:
+% \begin{macrocode}
+ \renewcommand \DTLCurrentLocaleCurrencyDP { 2 }
+% \end{macrocode}
+%Separator between symbol and value:
+% \begin{macrocode}
+ \renewcommand \dtlcurrfmtsymsep { \l_datatool_US_sym_sep_tl }
+ }
+ }
+% \end{macrocode}
+%
+%\subsection{Date and Time Parsing}
+% This defaults to month/day/year but may be changed with \cs{DTLsetLocaleOptions}. For example:
+%\begin{dispListing}
+%\DTLsetLocaleOptions{US}{date-style=dmyyyy, date-variant=slash}
+%\end{dispListing}
+%An appropriate language file will need to also be installed to
+%parse dates containing month names or day of week names.
+%
+% Provide a way to configure parsing style.
+% \begin{macrocode}
+\tl_new:N \l__datatool_US_datevariant_tl
+\tl_set:Nn \l__datatool_US_datevariant_tl { slash }
+% \end{macrocode}
+%NB These token lists are used to form command names. The following is not
+%a format string.
+% \begin{macrocode}
+\tl_new:N \l__datatool_US_datestyle_tl
+\tl_set:Nn \l__datatool_US_datestyle_tl { mmddyyyy }
+\tl_new:N \l__datatool_US_timevariant_tl
+\tl_set:Nn \l__datatool_US_timevariant_tl { colon }
+% \end{macrocode}
+%
+%Each parsing command defined below has final \marg{true} and \marg{false}
+%arguments (\code{TF}). These are used if parsing was successful (true) or if
+%parsing failed (false). The internal commands used by
+%\sty{datatool-base} have no need for solo branches (only \code{T} or only
+%\code{F}) so these commands are simply defined with \verb|\cs_new:Nn|
+%not as conditionals.
+%
+%\subsubsection{Time Stamp Parsing}
+%Use command
+%\begin{definition}
+%\cs{datatool\_}\meta{date-style}\verb|_hhmmss_tz_parse_timestamp:nnNnTF|
+%\end{definition}
+%with date regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{date-variant}\verb|_|\meta{date-style}\verb|_date_regex|
+%\end{definition}
+%and time regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{time-variant}\verb|_hhmmss_time_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_US_parse_timestamp:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_US_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_US_datevariant_tl
+ _
+ \l__datatool_US_datestyle_tl
+ _date_regex
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_US_timevariant_tl
+ _hhmmss_time_regex
+ }
+ {
+ \use:c
+ {
+ datatool_
+ \l__datatool_US_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_US_datevariant_tl
+ _
+ \l__datatool_US_datestyle_tl
+ _date_regex
+ }
+ {
+ c_datatool_
+ \l__datatool_US_timevariant_tl
+ _hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_US_timevariant_tl
+ { datatool-US }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_US_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_US_timevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_US_datevariant_tl
+ { datatool-US }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_US_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_US_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_US_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-US }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_US_datestyle_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%
+%\subsubsection{Date Parsing}
+%Use command \cs{datatool\_}\meta{style}\verb|_parse_date:NNnTF|
+%with regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{variant}\verb|_anchored_|\meta{style}\verb|_date_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_US_parse_date:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_US_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_US_datevariant_tl
+ _anchored_
+ \l__datatool_US_datestyle_tl
+ _date_regex
+ }
+ {
+ \exp_args:cc
+ {
+ datatool_
+ \l__datatool_US_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_US_datevariant_tl
+ _anchored_
+ \l__datatool_US_datestyle_tl
+ _date_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_US_datevariant_tl
+ { datatool-US }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_US_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_US_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_US_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-US }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_US_datestyle_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%
+%\subsubsection{Time Parsing}
+%Use command \cs{datatool\_}\meta{style}\verb|_parse_time:NNnTF|
+%with regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{variant}\verb|_anchored_|\meta{style}\verb|_time_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_US_parse_time:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_US_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ {
+ \datatool_hhmmss_parse_time:cNnTF
+ {
+ c_datatool_
+ \l__datatool_US_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_US_timevariant_tl
+ { datatool-US }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_US_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_US_timevariant_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%
+%\subsubsection{Time Zone Mappings}
+%Define time zone mapping command for this region:
+% \begin{macrocode}
+\cs_new:Nn \datatool_US_get_timezone_map:n
+ {
+ \datatool_region_get_timezone_map:n { US / #1 }
+ }
+% \end{macrocode}
+%Define time zone IDs for this region (one-way map from ID to offset):
+% \begin{macrocode}
+\datatool_region_set_timezone_map:nn { US / AST } { -04:00 }
+\datatool_region_set_timezone_map:nn { US / ADT } { -03:00 }
+\datatool_region_set_timezone_map:nn { US / EST } { -05:00 }
+\datatool_region_set_timezone_map:nn { US / EDT } { -04:00 }
+\datatool_region_set_timezone_map:nn { US / CST } { -06:00 }
+\datatool_region_set_timezone_map:nn { US / CDT } { -05:00 }
+\datatool_region_set_timezone_map:nn { US / MST } { -07:00 }
+\datatool_region_set_timezone_map:nn { US / MDT } { -06:00 }
+\datatool_region_set_timezone_map:nn { US / PST } { -08:00 }
+\datatool_region_set_timezone_map:nn { US / PDT } { -07:00 }
+\datatool_region_set_timezone_map:nn { US / AKST } { -09:00 }
+\datatool_region_set_timezone_map:nn { US / AKDT } { -08:00 }
+\datatool_region_set_timezone_map:nn { US / HAST } { -10:00 }
+\datatool_region_set_timezone_map:nn { US / HADT } { -9:00 }
+\datatool_region_set_timezone_map:nn { US / SST } { -11:00 }
+\datatool_region_set_timezone_map:nn { US / ChST } { 10:00 }
+% \end{macrocode}
+%
+%\subsection{Options}
+%Define options for this region:
+% \begin{macrocode}
+\datatool_locale_define_keys:nn { US }
+ {
+ number-style .choices:nn =
+ { official, unofficial }
+ {
+ \exp_args:NNe \renewcommand
+ \datatoolUSSetNumberChars
+ {
+ \exp_not:N \bool_if:NT
+ \exp_not:N \l_datatool_region_set_numberchars_bool
+ {
+ \exp_not:c { datatool_US_set_numberchars_ \l_keys_choice_tl : }
+ }
+ }
+ \tl_if_eq:NnT \l_datatool_current_region_tl { US }
+ {
+ \datatoolUSSetNumberChars
+ }
+ } ,
+% \end{macrocode}
+% Currency symbol before or after value:
+% \begin{macrocode}
+ currency-symbol-position .choice: ,
+ currency-symbol-position / before .code:n =
+ {
+ \cs_set_eq:NN \datatool_US_currency_position:nn \dtlcurrprefixfmt
+ } ,
+ currency-symbol-position / after .code:n =
+ {
+ \cs_set_eq:NN \datatool_US_currency_position:nn \dtlcurrsuffixfmt
+ } ,
+% \end{macrocode}
+% Should the currency symbol be prefixed with the region code:
+% \begin{macrocode}
+ currency-symbol-prefix .choice: ,
+ currency-symbol-prefix / false .code:n =
+ {
+ \cs_set_eq:NN \datatoolUSsymbolprefix \use_none:n
+ } ,
+ currency-symbol-prefix / true .code:n =
+ {
+ \cs_set_eq:NN
+ \datatoolUSsymbolprefix
+ \datatool_currency_symbol_region_prefix:n
+ } ,
+ currency-symbol-prefix .default:n = { true } ,
+% \end{macrocode}
+% Separator between currency symbol (not code) and value:
+% \begin{macrocode}
+ currency-symbol-sep .choice: ,
+ currency-symbol-sep / none .code:n =
+ {
+ \tl_clear:N \l_datatool_US_sym_sep_tl
+ } ,
+ currency-symbol-sep / thin-space .code:n =
+ {
+ \tl_set:Nn \l_datatool_US_sym_sep_tl { \, }
+ } ,
+ currency-symbol-sep / space .code:n =
+ {
+ \tl_set:Nn \l_datatool_US_sym_sep_tl { ~ }
+ } ,
+ currency-symbol-sep / nbsp .code:n =
+ {
+ \tl_set:Nn \l_datatool_US_sym_sep_tl { \nobreakspace }
+ } ,
+ currency-symbol-sep . initial:n = { none } ,
+% \end{macrocode}
+% Date and time styles:
+% \begin{macrocode}
+ date-style .choice: ,
+ date-style / dmyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_US_datestyle_tl { ddmmyyyy }
+ } ,
+ date-style / mdyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_US_datestyle_tl { mmddyyyy }
+ } ,
+ date-style / yyyymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_US_datestyle_tl { yyyymmdd }
+ } ,
+ date-style / dmyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_US_datestyle_tl { ddmmyy }
+ } ,
+ date-style / mdyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_US_datestyle_tl { mmddyy }
+ } ,
+ date-style / yymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_US_datestyle_tl { yymmdd }
+ } ,
+ date-variant .choice: ,
+ date-variant / slash .code:n =
+ {
+ \tl_set:Nn \l__datatool_US_datevariant_tl { slash }
+ } ,
+ date-variant / hyphen .code:n =
+ {
+ \tl_set:Nn \l__datatool_US_datevariant_tl { hyphen }
+ } ,
+ date-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_US_datevariant_tl { dot }
+ } ,
+ date-variant / dialect .code:n =
+ {
+ \tl_set:Nn \l__datatool_US_datevariant_tl
+ { \l_datatool_current_language_tl }
+ } ,
+ time-variant .choice: ,
+ time-variant / colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_US_timevariant_tl { colon }
+ } ,
+ time-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_US_timevariant_tl { dot }
+ } ,
+ time-variant / dialect .code:n =
+ {
+ \tl_if_eq:NnTF \l__datatool_US_timevariant_tl { dot }
+ {
+ \tl_set:Nn \l__datatool_US_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ }
+ {
+ \tl_if_in:NnF
+ \l__datatool_US_timevariant_tl
+ { \l_datatool_current_language_tl }
+ {
+ \tl_set:Nn \l__datatool_US_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ }
+ }
+ } ,
+ time-variant / dialect-colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_US_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ } ,
+ time-variant / dialect-dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_US_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ } ,
+ }
+% \end{macrocode}
+%
+%\subsection{Hooks}
+%Command to update temporal parsing commands for this region:
+% \begin{macrocode}
+\newcommand \datatoolUSSetTemporalParsers
+ {
+ \renewcommand \DTLCurrentLocaleParseTimeStamp
+ { \datatool_US_parse_timestamp:NnTF }
+ \renewcommand \DTLCurrentLocaleParseDate
+ { \datatool_US_parse_date:NnTF }
+ \renewcommand \DTLCurrentLocaleParseTime
+ { \datatool_US_parse_time:NnTF }
+ \let
+ \DTLCurrentLocaleGetTimeZoneMap
+ \datatool_US_get_timezone_map:n
+ }
+% \end{macrocode}
+%Set temporal formatting commands for this region. Currently this
+%just resets to the default, but may change in future.
+%Note that the defaults test if the applicable \sty{datetime2}
+%command is available and will fallback on ISO if not defined.
+%Bear in mind that the default style for \sty{datetime2} is
+%\texttt{iso} so there won't be a noticeable difference unless the
+%\sty{datetime2} regional setting is on.
+% \begin{macrocode}
+\newcommand \datatoolUSSetTemporalFormatters
+ {
+ \let
+ \DTLCurrentLocaleFormatDate
+ \datatool_default_date_fmt:nnnn
+ \let
+ \DTLCurrentLocaleFormatTime
+ \datatool_default_time_fmt:nnn
+ \let
+ \DTLCurrentLocaleFormatTimeZone
+ \datatool_default_timezone_fmt:nn
+ \let
+ \DTLCurrentLocaleFormatTimeStampNoZone
+ \datatool_default_timestamp_fmt:nnnnnnn
+ \let
+ \DTLCurrentLocaleFormatTimeStampWithZone
+ \datatool_default_timestamp_fmt:nnnnnnnnn
+ \renewcommand \DTLCurrentLocaleTimeStampFmtSep { ~ }
+ }
+% \end{macrocode}
+%
+%Command to update currency and temporal parsing commands for this region:
+% \begin{macrocode}
+\newcommand \DTLUSLocaleHook
+ {
+ \datatoolUSSetNumberChars
+ \datatoolUSSetCurrency
+ \datatoolUSSetTemporalParsers
+ \datatoolUSSetTemporalFormatters
+% \end{macrocode}
+%Allow language files to reference the region:
+% \begin{macrocode}
+ \tl_set:Nn \l_datatool_current_region_tl { US }
+ }
+% \end{macrocode}
+%
+% Finished with \LaTeX3 syntax.
+% \begin{macrocode}
+\ExplSyntaxOff
+% \end{macrocode}
+%Note that the hook is added to the captions by \sty{datatool-base}
+%not by the region file.
+%\iffalse
+% \begin{macrocode}
+%</datatool-US.ldf>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+%<*datatool-ZA.ldf>
+% \end{macrocode}
+%\fi
+%\section{datatool-ZA.ldf}\label{sec:code:datatool-ZA}
+% Support for region ZA.
+% \begin{macrocode}
+\TrackLangProvidesResource{ZA}[2025/03/01 v1.0]
+% \end{macrocode}
+% Switch on \LaTeX3 syntax:
+% \begin{macrocode}
+\ExplSyntaxOn
+% \end{macrocode}
+%
+%\subsection{Numbers and Currency}
+%Official style is to use dot separator and decimal dot.
+% \begin{macrocode}
+\cs_new:Nn \datatool_ZA_set_numberchars_official:
+ {
+ \DTLsetnumberchars { . } { , }
+ }
+% \end{macrocode}
+%but allow dialect to use another style.
+% \begin{macrocode}
+\cs_new:Nn \datatool_ZA_set_numberchars_dialect:
+ {
+ \cs_if_exist_use:cF
+ { datatool \l_datatool_current_language_tl ZASetNumberChars }
+ {
+ \datatool_ZA_set_numberchars_official:
+ }
+ }
+% \end{macrocode}
+%Hook to set the number group and decimal characters for the region:
+% \begin{macrocode}
+\newcommand \datatoolZASetNumberChars
+ {
+ \bool_if:NT \l_datatool_region_set_numberchars_bool
+ {
+ \datatool_ZA_set_numberchars_official:
+ }
+ }
+% \end{macrocode}
+%How to format the position of the currency symbol in relation to the value.
+% \begin{macrocode}
+\cs_new:Nn \datatool_ZA_currency_position:nn
+ {
+ \dtlcurrprefixfmt { #1 } { #2 }
+ }
+% \end{macrocode}
+%Separator between currency symbol and value.
+% \begin{macrocode}
+\tl_new:N \l_datatool_ZA_sym_sep_tl
+% \end{macrocode}
+%
+% Set the currency format for this region.
+% \begin{macrocode}
+\newcommand \datatoolZAcurrencyfmt { \datatool_ZA_currency_position:nn }
+% \end{macrocode}
+% Define the currency symbols for this region.
+% \begin{macrocode}
+\datatool_def_currency:nnnn
+ { \datatoolZAcurrencyfmt }
+ { ZAR } { R } { R }
+% \end{macrocode}
+%Register the currency code with this region:
+% \begin{macrocode}
+\datatool_register_regional_currency_code:nn { ZA } { ZAR }
+% \end{macrocode}
+% Provide a command to set the currency for this region (for use
+% with any hook used when the locale changes).
+% NB this should do nothing with
+% \verb|\DTLsetup{region-currency=false}|
+% \begin{macrocode}
+\newcommand \datatoolZASetCurrency
+ {
+ \bool_if:NT \l_datatool_region_set_currency_bool
+ {
+ \DTLsetdefaultcurrency { ZAR }
+% \end{macrocode}
+%Number of digits that \cs{DTLdecimaltocurrency} should round to:
+% \begin{macrocode}
+ \renewcommand \DTLCurrentLocaleCurrencyDP { 2 }
+% \end{macrocode}
+%Separator between symbol and value:
+% \begin{macrocode}
+ \renewcommand \dtlcurrfmtsymsep { \l_datatool_ZA_sym_sep_tl }
+ }
+ }
+% \end{macrocode}
+%
+%\subsection{Date and Time Parsing}
+% Date parsing is more complicated as there seems to be a confusing
+% mixture of ISO, day/month/year and month/day/year formats.
+% The default is year-month-day but may be changed with
+% \cs{DTLsetLocaleOptions}. For example:
+%\begin{dispListing}
+%\DTLsetLocaleOptions{ZA}{date-style=dmyyyy, date-variant=slash}
+%\end{dispListing}
+%An appropriate language file will need to also be installed to
+%parse dates containing month names or day of week names.
+%
+% \begin{macrocode}
+\tl_new:N \l__datatool_ZA_datevariant_tl
+\tl_set:Nn \l__datatool_ZA_datevariant_tl { hyphen }
+% \end{macrocode}
+%NB These token lists are used to form command names. The following is not
+%a format string.
+% \begin{macrocode}
+\tl_new:N \l__datatool_ZA_datestyle_tl
+\tl_set:Nn \l__datatool_ZA_datestyle_tl { yyyymmdd }
+\tl_new:N \l__datatool_ZA_timevariant_tl
+\tl_set:Nn \l__datatool_ZA_timevariant_tl { colon }
+% \end{macrocode}
+%
+%Each parsing command defined below has final \marg{true} and \marg{false}
+%arguments (\code{TF}). These are used if parsing was successful (true) or if
+%parsing failed (false). The internal commands used by
+%\sty{datatool-base} have no need for solo branches (only \code{T} or only
+%\code{F}) so these commands are simply defined with \verb|\cs_new:Nn|
+%not as conditionals.
+%
+%\subsubsection{Time Stamp Parsing}
+%Use command
+%\begin{definition}
+%\cs{datatool\_}\meta{date-style}\verb|_hhmmss_tz_parse_timestamp:nnNnTF|
+%\end{definition}
+%with date regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{date-variant}\verb|_|\meta{date-style}\verb|_date_regex|
+%\end{definition}
+%and time regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{time-variant}\verb|_hhmmss_time_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_ZA_parse_timestamp:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_ZA_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_ZA_datevariant_tl
+ _
+ \l__datatool_ZA_datestyle_tl
+ _date_regex
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_ZA_timevariant_tl
+ _hhmmss_time_regex
+ }
+ {
+ \use:c
+ {
+ datatool_
+ \l__datatool_ZA_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_ZA_datevariant_tl
+ _
+ \l__datatool_ZA_datestyle_tl
+ _date_regex
+ }
+ {
+ c_datatool_
+ \l__datatool_ZA_timevariant_tl
+ _hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-ZA }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_ZA_timevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-ZA }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_ZA_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_ZA_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-ZA }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_ZA_datestyle_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%
+%\subsubsection{Date Parsing}
+%Use command \cs{datatool\_}\meta{style}\verb|_parse_date:NNnTF|
+%with regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{variant}\verb|_anchored_|\meta{style}\verb|_date_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_ZA_parse_date:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_ZA_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_ZA_datevariant_tl
+ _anchored_
+ \l__datatool_ZA_datestyle_tl
+ _date_regex
+ }
+ {
+ \exp_args:cc
+ {
+ datatool_
+ \l__datatool_ZA_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_ZA_datevariant_tl
+ _anchored_
+ \l__datatool_ZA_datestyle_tl
+ _date_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-ZA }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_ZA_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_ZA_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-ZA }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_ZA_datestyle_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%
+%\subsubsection{Time Parsing}
+%Use command \cs{datatool\_}\meta{style}\verb|_parse_time:NNnTF|
+%with regular expression
+%\begin{definition}
+%\cs{c\_datatool\_}\meta{variant}\verb|_anchored_|\meta{style}\verb|_time_regex|
+%\end{definition}
+% \begin{macrocode}
+\cs_new:Nn \datatool_ZA_parse_time:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_ZA_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ {
+ \datatool_hhmmss_parse_time:cNnTF
+ {
+ c_datatool_
+ \l__datatool_ZA_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-ZA }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_ZA_timevariant_tl '
+ }
+ #4
+ }
+ }
+% \end{macrocode}
+%
+%\subsubsection{Time Zone Mapping}
+%Define time zone mapping command for this region:
+% \begin{macrocode}
+\cs_new:Nn \datatool_ZA_get_timezone_map:n
+ {
+ \datatool_region_get_timezone_map:n { ZA / #1 }
+ }
+% \end{macrocode}
+%Define time zone IDs for this region (one-way map from ID to offset):
+% \begin{macrocode}
+\datatool_region_set_timezone_map:nn { ZA / SAST } { +02:00 }
+% \end{macrocode}
+%
+%\subsection{Options}
+%Define options for this region:
+% \begin{macrocode}
+\datatool_locale_define_keys:nn { ZA }
+ {
+ number-style .choices:nn =
+ { official , dialect }
+ {
+ \exp_args:NNe \renewcommand
+ \datatoolZASetNumberChars
+ {
+ \exp_not:N \bool_if:NT
+ \exp_not:N \l_datatool_region_set_numberchars_bool
+ {
+ \exp_not:c { datatool_ZA_set_numberchars_ \l_keys_choice_tl : }
+ }
+ }
+ \tl_if_eq:NnT \l_datatool_current_region_tl { ZA }
+ {
+ \datatoolZASetNumberChars
+ }
+ } ,
+% \end{macrocode}
+% Currency symbol before or after value:
+% \begin{macrocode}
+ currency-symbol-position .choice: ,
+ currency-symbol-position / before .code:n =
+ {
+ \cs_set_eq:NN \datatool_ZA_currency_position:nn \dtlcurrprefixfmt
+ } ,
+ currency-symbol-position / after .code:n =
+ {
+ \cs_set_eq:NN \datatool_ZA_currency_position:nn \dtlcurrsuffixfmt
+ } ,
+% \end{macrocode}
+% Separator between currency symbol (not code) and value:
+% \begin{macrocode}
+ currency-symbol-sep .choice: ,
+ currency-symbol-sep / none .code:n =
+ {
+ \tl_clear:N \l_datatool_ZA_sym_sep_tl
+ } ,
+ currency-symbol-sep / thin-space .code:n =
+ {
+ \tl_set:Nn \l_datatool_ZA_sym_sep_tl { \, }
+ } ,
+ currency-symbol-sep / space .code:n =
+ {
+ \tl_set:Nn \l_datatool_ZA_sym_sep_tl { ~ }
+ } ,
+ currency-symbol-sep / nbsp .code:n =
+ {
+ \tl_set:Nn \l_datatool_ZA_sym_sep_tl { \nobreakspace }
+ } ,
+ currency-symbol-sep .initial:n = { none } ,
+% \end{macrocode}
+% Date and time styles:
+% \begin{macrocode}
+ date-style .choice: ,
+ date-style / dmyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_ZA_datestyle_tl { ddmmyyyy }
+ } ,
+ date-style / mdyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_ZA_datestyle_tl { mmddyyyy }
+ } ,
+ date-style / yyyymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_ZA_datestyle_tl { yyyymmdd }
+ } ,
+ date-style / dmyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_ZA_datestyle_tl { ddmmyy }
+ } ,
+ date-style / mdyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_ZA_datestyle_tl { mmddyy }
+ } ,
+ date-style / yymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_ZA_datestyle_tl { yymmdd }
+ } ,
+ date-variant .choice: ,
+ date-variant / slash .code:n =
+ {
+ \tl_set:Nn \l__datatool_ZA_datevariant_tl { slash }
+ } ,
+ date-variant / hyphen .code:n =
+ {
+ \tl_set:Nn \l__datatool_ZA_datevariant_tl { hyphen }
+ } ,
+ date-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_ZA_datevariant_tl { dot }
+ } ,
+ date-variant / dialect .code:n =
+ {
+ \tl_set:Nn \l__datatool_ZA_datevariant_tl
+ { \l_datatool_current_language_tl }
+ } ,
+ time-variant .choice: ,
+ time-variant / colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_ZA_timevariant_tl { colon }
+ } ,
+ time-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_ZA_timevariant_tl { dot }
+ } ,
+ time-variant / dialect .code:n =
+ {
+ \tl_if_eq:NnTF \l__datatool_ZA_timevariant_tl { dot }
+ {
+ \tl_set:Nn \l__datatool_ZA_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ }
+ {
+ \tl_if_in:NnF
+ \l__datatool_ZA_timevariant_tl
+ { \l_datatool_current_language_tl }
+ {
+ \tl_set:Nn \l__datatool_ZA_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ }
+ }
+ } ,
+ time-variant / dialect-colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_ZA_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ } ,
+ time-variant / dialect-dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_ZA_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ } ,
+ }
+% \end{macrocode}
+%
+%\subsection{Hooks}
+%Command to update temporal parsing commands for this region:
+% \begin{macrocode}
+\newcommand \datatoolZASetTemporalParsers
+ {
+ \renewcommand \DTLCurrentLocaleParseTimeStamp
+ { \datatool_ZA_parse_timestamp:NnTF }
+ \renewcommand \DTLCurrentLocaleParseDate
+ { \datatool_ZA_parse_date:NnTF }
+ \renewcommand \DTLCurrentLocaleParseTime
+ { \datatool_ZA_parse_time:NnTF }
+ \let
+ \DTLCurrentLocaleGetTimeZoneMap
+ \datatool_ZA_get_timezone_map:n
+ }
+% \end{macrocode}
+%Set temporal formatting commands for this region. Currently this
+%just resets to the default, but may change in future.
+%Note that the defaults test if the applicable \sty{datetime2}
+%command is available and will fallback on ISO if not defined.
+%Bear in mind that the default style for \sty{datetime2} is
+%\texttt{iso} so there won't be a noticeable difference unless the
+%\sty{datetime2} regional setting is on.
+% \begin{macrocode}
+\newcommand \datatoolZASetTemporalFormatters
+ {
+ \let
+ \DTLCurrentLocaleFormatDate
+ \datatool_default_date_fmt:nnnn
+ \let
+ \DTLCurrentLocaleFormatTime
+ \datatool_default_time_fmt:nnn
+ \let
+ \DTLCurrentLocaleFormatTimeZone
+ \datatool_default_timezone_fmt:nn
+ \let
+ \DTLCurrentLocaleFormatTimeStampNoZone
+ \datatool_default_timestamp_fmt:nnnnnnn
+ \let
+ \DTLCurrentLocaleFormatTimeStampWithZone
+ \datatool_default_timestamp_fmt:nnnnnnnnn
+ \renewcommand \DTLCurrentLocaleTimeStampFmtSep { ~ }
+ }
+% \end{macrocode}
+%Command to update currency and temporal parsing commands for this region:
+% \begin{macrocode}
+\newcommand \DTLZALocaleHook
+ {
+ \datatoolZASetNumberChars
+ \datatoolZASetCurrency
+ \datatoolZASetTemporalParsers
+ \datatoolZASetTemporalFormatters
+% \end{macrocode}
+%Allow language files to reference the region:
+% \begin{macrocode}
+ \tl_set:Nn \l_datatool_current_region_tl { ZA }
+ }
+% \end{macrocode}
+%
+% Finished with \LaTeX3 syntax.
+% \begin{macrocode}
+\ExplSyntaxOff
+% \end{macrocode}
+%Note that the hook is added to the captions by \sty{datatool-base}
+%not by the region file.
+%\iffalse
+% \begin{macrocode}
+%</datatool-ZA.ldf>
+% \end{macrocode}
+%\fi
+%\Finale
+\endinput
Property changes on: trunk/Master/texmf-dist/source/latex/datatool-regions/datatool-regions.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/datatool-regions/datatool-regions.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/datatool-regions/datatool-regions.ins (rev 0)
+++ trunk/Master/texmf-dist/source/latex/datatool-regions/datatool-regions.ins 2025-03-02 21:37:12 UTC (rev 74393)
@@ -0,0 +1,55 @@
+% datatool-regions.ins generated using makedtx version 1.2 2025/3/1 23:13
+\input docstrip
+
+\preamble
+
+ datatool-regions.dtx
+ Copyright 2025 Nicola Talbot
+
+ This work may be distributed and/or modified under the
+ conditions of the LaTeX Project Public License, either version 1.3
+ of this license or (at your option) any later version.
+ The latest version of this license is in
+ http://www.latex-project.org/lppl.txt
+ and version 1.3 or later is part of all distributions of LaTeX
+ version 2005/12/01 or later.
+
+ This work has the LPPL maintenance status `maintained'.
+
+ The Current Maintainer of this work is Nicola Talbot.
+
+ This work consists of the files datatool-regions.dtx and datatool-regions.ins and the derived files datatool-AU.ldf, datatool-BE.ldf, datatool-CA.ldf, datatool-FK.ldf, datatool-GB.ldf, datatool-GG.ldf, datatool-GI.ldf, datatool-IE.ldf, datatool-IM.ldf, datatool-JE.ldf, datatool-NZ.ldf, datatool-US.ldf, datatool-ZA.ldf.
+
+\endpreamble
+
+\askforoverwritefalse
+
+\generate{\file{datatool-AU.ldf}{\usepreamble\defaultpreamble
+\usepostamble\defaultpostamble\from{datatool-regions.dtx}{datatool-AU.ldf,package}}
+\file{datatool-BE.ldf}{\usepreamble\defaultpreamble
+\usepostamble\defaultpostamble\from{datatool-regions.dtx}{datatool-BE.ldf,package}}
+\file{datatool-CA.ldf}{\usepreamble\defaultpreamble
+\usepostamble\defaultpostamble\from{datatool-regions.dtx}{datatool-CA.ldf,package}}
+\file{datatool-FK.ldf}{\usepreamble\defaultpreamble
+\usepostamble\defaultpostamble\from{datatool-regions.dtx}{datatool-FK.ldf,package}}
+\file{datatool-GB.ldf}{\usepreamble\defaultpreamble
+\usepostamble\defaultpostamble\from{datatool-regions.dtx}{datatool-GB.ldf,package}}
+\file{datatool-GG.ldf}{\usepreamble\defaultpreamble
+\usepostamble\defaultpostamble\from{datatool-regions.dtx}{datatool-GG.ldf,package}}
+\file{datatool-GI.ldf}{\usepreamble\defaultpreamble
+\usepostamble\defaultpostamble\from{datatool-regions.dtx}{datatool-GI.ldf,package}}
+\file{datatool-IE.ldf}{\usepreamble\defaultpreamble
+\usepostamble\defaultpostamble\from{datatool-regions.dtx}{datatool-IE.ldf,package}}
+\file{datatool-IM.ldf}{\usepreamble\defaultpreamble
+\usepostamble\defaultpostamble\from{datatool-regions.dtx}{datatool-IM.ldf,package}}
+\file{datatool-JE.ldf}{\usepreamble\defaultpreamble
+\usepostamble\defaultpostamble\from{datatool-regions.dtx}{datatool-JE.ldf,package}}
+\file{datatool-NZ.ldf}{\usepreamble\defaultpreamble
+\usepostamble\defaultpostamble\from{datatool-regions.dtx}{datatool-NZ.ldf,package}}
+\file{datatool-US.ldf}{\usepreamble\defaultpreamble
+\usepostamble\defaultpostamble\from{datatool-regions.dtx}{datatool-US.ldf,package}}
+\file{datatool-ZA.ldf}{\usepreamble\defaultpreamble
+\usepostamble\defaultpostamble\from{datatool-regions.dtx}{datatool-ZA.ldf,package}}
+}
+
+\endbatchfile
Added: trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-AU.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-AU.ldf (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-AU.ldf 2025-03-02 21:37:12 UTC (rev 74393)
@@ -0,0 +1,467 @@
+%%
+%% This is file `datatool-AU.ldf',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% datatool-regions.dtx (with options: `datatool-AU.ldf,package')
+%%
+%% datatool-regions.dtx
+%% Copyright 2025 Nicola Talbot
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Nicola Talbot.
+%%
+%% This work consists of the files datatool-regions.dtx and datatool-regions.ins and the derived files datatool-AU.ldf, datatool-BE.ldf, datatool-CA.ldf, datatool-FK.ldf, datatool-GB.ldf, datatool-GG.ldf, datatool-GI.ldf, datatool-IE.ldf, datatool-IM.ldf, datatool-JE.ldf, datatool-NZ.ldf, datatool-US.ldf, datatool-ZA.ldf.
+%%
+%% \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 \~}
+\TrackLangProvidesResource{AU}[2025/03/01 v1.0]
+\ExplSyntaxOn
+\cs_new:Nn \datatool_AU_set_numberchars_official:
+ {
+ \datatool_set_numberchars:nn { , } { . }
+ }
+\cs_new:Nn \datatool_AU_set_numberchars_unofficial:
+ {
+ \datatool_set_thinspace_group_decimal_char:n { . }
+ }
+\newcommand \datatoolAUSetNumberChars
+ {
+ \bool_if:NT \l_datatool_region_set_numberchars_bool
+ {
+ \datatool_AU_set_numberchars_official:
+ }
+ }
+\cs_new:Nn \datatool_AU_currency_position:nn
+ {
+ \dtlcurrprefixfmt { #1 } { #2 }
+ }
+\tl_new:N \l_datatool_AU_sym_sep_tl
+\newcommand \datatoolAUcurrencyfmt [ 2 ]
+ {
+ \datatool_AU_currency_position:nn
+ {
+ \datatoolAUsymbolprefix { AU }
+ #1
+ }
+ { #2 }
+ }
+\newcommand \datatoolAUsymbolprefix [ 1 ] { }
+\datatool_def_currency:nnnV
+ { \datatoolAUcurrencyfmt }
+ { AUD }
+ { \$ }
+ \c_dollar_str
+\datatool_register_regional_currency_code:nn { AU } { AUD }
+\newcommand \datatoolAUSetCurrency
+ {
+ \bool_if:NT \l_datatool_region_set_currency_bool
+ {
+ \DTLsetdefaultcurrency { AUD }
+ \renewcommand \DTLCurrentLocaleCurrencyDP { 2 }
+ \renewcommand \dtlcurrfmtsymsep { \l_datatool_AU_sym_sep_tl }
+ }
+ }
+\tl_new:N \l__datatool_AU_datevariant_tl
+\tl_set:Nn \l__datatool_AU_datevariant_tl { slash }
+\tl_new:N \l__datatool_AU_datestyle_tl
+\tl_set:Nn \l__datatool_AU_datestyle_tl { ddmmyyyy }
+\tl_new:N \l__datatool_AU_timevariant_tl
+\tl_set:Nn \l__datatool_AU_timevariant_tl { colon }
+\cs_new:Nn \datatool_AU_parse_timestamp:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_AU_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_AU_datevariant_tl
+ _
+ \l__datatool_AU_datestyle_tl
+ _date_regex
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_AU_timevariant_tl
+ _hhmmss_time_regex
+ }
+ {
+ \use:c
+ {
+ datatool_
+ \l__datatool_AU_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_AU_datevariant_tl
+ _
+ \l__datatool_AU_datestyle_tl
+ _date_regex
+ }
+ {
+ c_datatool_
+ \l__datatool_AU_timevariant_tl
+ _hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_AU_timevariant_tl
+ { datatool-AU }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_AU_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_AU_timevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_AU_datevariant_tl
+ { datatool-AU }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_AU_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_AU_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_AU_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-AU }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_AU_datestyle_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_AU_parse_date:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_AU_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_AU_datevariant_tl
+ _anchored_
+ \l__datatool_AU_datestyle_tl
+ _date_regex
+ }
+ {
+ \exp_args:cc
+ {
+ datatool_
+ \l__datatool_AU_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_AU_datevariant_tl
+ _anchored_
+ \l__datatool_AU_datestyle_tl
+ _date_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_AU_datevariant_tl
+ { datatool-AU }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_AU_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_AU_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_AU_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-AU }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_AU_datestyle_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_AU_parse_time:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_AU_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ {
+ \datatool_hhmmss_parse_time:cNnTF
+ {
+ c_datatool_
+ \l__datatool_AU_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_AU_timevariant_tl
+ { datatool-AU }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_AU_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_AU_timevariant_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_AU_get_timezone_map:n
+ {
+ \datatool_region_get_timezone_map:n { AU / #1 }
+ }
+\datatool_region_set_timezone_map:nn { AU / ACST } { +09:30 }
+\datatool_region_set_timezone_map:nn { AU / ACDT } { +10:30 }
+\datatool_region_set_timezone_map:nn { AU / ACWST } { +08:45 }
+\datatool_region_set_timezone_map:nn { AU / ACWDT } { +09:00 }
+\datatool_region_set_timezone_map:nn { AU / AEST } { +10:00 }
+\datatool_region_set_timezone_map:nn { AU / AEDT } { +11:00 }
+\datatool_region_set_timezone_map:nn { AU / CXT } { +07:00 }
+\datatool_region_set_timezone_map:nn { AU / NFT } { +11:00 }
+\datatool_region_set_timezone_map:nn { AU / NFDT } { +12:00 }
+\datatool_region_set_timezone_map:nn { AU / LHST } { +10:30 }
+\datatool_region_set_timezone_map:nn { AU / LHDT } { +11:00 }
+\datatool_region_set_timezone_map:nn { AU / CCT } { +06:30 }
+\datatool_locale_define_keys:nn { AU }
+ {
+ number-style .choices:nn =
+ { official, unofficial }
+ {
+ \exp_args:NNe \renewcommand
+ \datatoolAUSetNumberChars
+ {
+ \exp_not:N \bool_if:NT
+ \exp_not:N \l_datatool_region_set_numberchars_bool
+ {
+ \exp_not:c { datatool_AU_set_numberchars_ \l_keys_choice_tl : }
+ }
+ }
+ \tl_if_eq:NnT \l_datatool_current_region_tl { AU }
+ {
+ \datatoolAUSetNumberChars
+ }
+ } ,
+ currency-symbol-position .choice: ,
+ currency-symbol-position / before .code:n =
+ {
+ \cs_set_eq:NN \datatool_AU_currency_position:nn \dtlcurrprefixfmt
+ } ,
+ currency-symbol-position / after .code:n =
+ {
+ \cs_set_eq:NN \datatool_AU_currency_position:nn \dtlcurrsuffixfmt
+ } ,
+ currency-symbol-prefix .choice: ,
+ currency-symbol-prefix / false .code:n =
+ {
+ \cs_set_eq:NN \datatoolAUsymbolprefix \use_none:n
+ } ,
+ currency-symbol-prefix / true .code:n =
+ {
+ \cs_set_eq:NN
+ \datatoolAUsymbolprefix
+ \datatool_currency_symbol_region_prefix:n
+ } ,
+ currency-symbol-prefix .default:n = { true } ,
+ currency-symbol-sep .choice: ,
+ currency-symbol-sep / none .code:n =
+ {
+ \tl_clear:N \l_datatool_AU_sym_sep_tl
+ } ,
+ currency-symbol-sep / thin-space .code:n =
+ {
+ \tl_set:Nn \l_datatool_AU_sym_sep_tl { \, }
+ } ,
+ currency-symbol-sep / space .code:n =
+ {
+ \tl_set:Nn \l_datatool_AU_sym_sep_tl { ~ }
+ } ,
+ currency-symbol-sep / nbsp .code:n =
+ {
+ \tl_set:Nn \l_datatool_AU_sym_sep_tl { \nobreakspace }
+ } ,
+ currency-symbol-sep . initial:n = { none } ,
+ date-style .choice: ,
+ date-style / dmyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_AU_datestyle_tl { ddmmyyyy }
+ } ,
+ date-style / mdyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_AU_datestyle_tl { mmddyyyy }
+ } ,
+ date-style / yyyymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_AU_datestyle_tl { yyyymmdd }
+ } ,
+ date-style / dmyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_AU_datestyle_tl { ddmmyy }
+ } ,
+ date-style / mdyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_AU_datestyle_tl { mmddyy }
+ } ,
+ date-style / yymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_AU_datestyle_tl { yymmdd }
+ } ,
+ date-variant .choice: ,
+ date-variant / slash .code:n =
+ {
+ \tl_set:Nn \l__datatool_AU_datevariant_tl { slash }
+ } ,
+ date-variant / hyphen .code:n =
+ {
+ \tl_set:Nn \l__datatool_AU_datevariant_tl { hyphen }
+ } ,
+ date-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_AU_datevariant_tl { dot }
+ } ,
+ date-variant / dialect .code:n =
+ {
+ \tl_set:Nn \l__datatool_AU_datevariant_tl
+ { \l_datatool_current_language_tl }
+ } ,
+ time-variant .choice: ,
+ time-variant / colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_AU_timevariant_tl { colon }
+ } ,
+ time-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_AU_timevariant_tl { dot }
+ } ,
+ time-variant / dialect .code:n =
+ {
+ \tl_if_eq:NnTF \l__datatool_AU_timevariant_tl { dot }
+ {
+ \tl_set:Nn \l__datatool_AU_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ }
+ {
+ \tl_if_in:NnF
+ \l__datatool_AU_timevariant_tl
+ { \l_datatool_current_language_tl }
+ {
+ \tl_set:Nn \l__datatool_AU_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ }
+ }
+ } ,
+ time-variant / dialect-colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_AU_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ } ,
+ time-variant / dialect-dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_AU_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ } ,
+ }
+\newcommand \datatoolAUSetTemporalParsers
+ {
+ \renewcommand \DTLCurrentLocaleParseTimeStamp
+ { \datatool_AU_parse_timestamp:NnTF }
+ \renewcommand \DTLCurrentLocaleParseDate
+ { \datatool_AU_parse_date:NnTF }
+ \renewcommand \DTLCurrentLocaleParseTime
+ { \datatool_AU_parse_time:NnTF }
+ \let
+ \DTLCurrentLocaleGetTimeZoneMap
+ \datatool_AU_get_timezone_map:n
+ }
+\newcommand \datatoolAUSetTemporalFormatters
+ {
+ \let
+ \DTLCurrentLocaleFormatDate
+ \datatool_default_date_fmt:nnnn
+ \let
+ \DTLCurrentLocaleFormatTime
+ \datatool_default_time_fmt:nnn
+ \let
+ \DTLCurrentLocaleFormatTimeZone
+ \datatool_default_timezone_fmt:nn
+ \let
+ \DTLCurrentLocaleFormatTimeStampNoZone
+ \datatool_default_timestamp_fmt:nnnnnnn
+ \let
+ \DTLCurrentLocaleFormatTimeStampWithZone
+ \datatool_default_timestamp_fmt:nnnnnnnnn
+ \renewcommand \DTLCurrentLocaleTimeStampFmtSep { ~ }
+ }
+\newcommand \DTLAULocaleHook
+ {
+ \datatoolAUSetNumberChars
+ \datatoolAUSetCurrency
+ \datatoolAUSetTemporalParsers
+ \datatoolAUSetTemporalFormatters
+ \tl_set:Nn \l_datatool_current_region_tl { AU }
+ }
+\ExplSyntaxOff
+\endinput
+%%
+%% End of file `datatool-AU.ldf'.
Property changes on: trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-AU.ldf
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-BE.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-BE.ldf (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-BE.ldf 2025-03-02 21:37:12 UTC (rev 74393)
@@ -0,0 +1,427 @@
+%%
+%% This is file `datatool-BE.ldf',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% datatool-regions.dtx (with options: `datatool-BE.ldf,package')
+%%
+%% datatool-regions.dtx
+%% Copyright 2025 Nicola Talbot
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Nicola Talbot.
+%%
+%% This work consists of the files datatool-regions.dtx and datatool-regions.ins and the derived files datatool-AU.ldf, datatool-BE.ldf, datatool-CA.ldf, datatool-FK.ldf, datatool-GB.ldf, datatool-GG.ldf, datatool-GI.ldf, datatool-IE.ldf, datatool-IM.ldf, datatool-JE.ldf, datatool-NZ.ldf, datatool-US.ldf, datatool-ZA.ldf.
+%%
+%% \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 \~}
+\TrackLangProvidesResource{BE}[2025/03/01 v1.0]
+\ExplSyntaxOn
+\cs_new:Nn \datatool_BE_set_numberchars_default:
+ {
+ \DTLsetnumberchars { . } { , }
+ }
+\cs_new:Nn \datatool_BE_set_numberchars_thinspace:
+ {
+ \datatool_set_thinspace_group_decimal_char:n { . }
+ }
+\cs_new:Nn \datatool_BE_set_numberchars_dialect:
+ {
+ \tl_if_empty:NTF \l_datatool_current_language_tl
+ {
+ \datatool_BE_set_numberchars_default:
+ }
+ {
+ \cs_if_exist_use:cF
+ { datatool \l_datatool_current_language_tl BESetNumberChars }
+ {
+ \datatool_BE_set_numberchars_default:
+ }
+ }
+ }
+\newcommand \datatoolBESetNumberChars
+ {
+ \bool_if:NT \l_datatool_region_set_numberchars_bool
+ {
+ \datatool_BE_set_numberchars_dialect:
+ }
+ }
+\datatool_register_regional_currency_code:nn { BE } { EUR }
+\cs_new:Nn \datatool_BE_currency_position:nn
+ {
+ \dtlcurrsuffixfmt { #1 } { #2 }
+ }
+\tl_new:N \l_datatool_BE_sym_sep_tl
+\newcommand \datatoolBESetCurrency
+ {
+ \bool_if:NT \l_datatool_region_set_currency_bool
+ {
+ \DTLsetdefaultcurrency { EUR }
+ \renewcommand \DTLCurrentLocaleCurrencyDP { 2 }
+ \renewcommand \DTLdefaultEURcurrencyfmt
+ { \datatool_BE_currency_position:nn }
+ \renewcommand \dtlcurrfmtsymsep { \l_datatool_BE_sym_sep_tl }
+ }
+ }
+\tl_new:N \l__datatool_BE_datevariant_tl
+\tl_set:Nn \l__datatool_BE_datevariant_tl { dot }
+\tl_new:N \l__datatool_BE_datestyle_tl
+\tl_set:Nn \l__datatool_BE_datestyle_tl { ddmmyyyy }
+\tl_new:N \l__datatool_BE_timevariant_tl
+\tl_set:Nn \l__datatool_BE_timevariant_tl { colon }
+\cs_new:Nn \datatool_BE_parse_timestamp:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_BE_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_BE_datevariant_tl
+ _
+ \l__datatool_BE_datestyle_tl
+ _date_regex
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_BE_timevariant_tl
+ _hhmmss_time_regex
+ }
+ {
+ \use:c
+ {
+ datatool_
+ \l__datatool_BE_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_BE_datevariant_tl
+ _
+ \l__datatool_BE_datestyle_tl
+ _date_regex
+ }
+ {
+ c_datatool_
+ \l__datatool_BE_timevariant_tl
+ _hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-BE }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_BE_timevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-BE }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_BE_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_BE_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-BE }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_BE_datestyle_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_BE_parse_date:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_BE_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_BE_datevariant_tl
+ _anchored_
+ \l__datatool_BE_datestyle_tl
+ _date_regex
+ }
+ {
+ \exp_args:cc
+ {
+ datatool_
+ \l__datatool_BE_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_BE_datevariant_tl
+ _anchored_
+ \l__datatool_BE_datestyle_tl
+ _date_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-BE }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_BE_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_BE_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-BE }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_BE_datestyle_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_BE_parse_time:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_BE_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ {
+ \datatool_hhmmss_parse_time:cNnTF
+ {
+ c_datatool_
+ \l__datatool_BE_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-BE }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_BE_timevariant_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_BE_get_timezone_map:n
+ {
+ \datatool_region_get_timezone_map:n { BE / #1 }
+ }
+\datatool_region_set_timezone_map:nn { BE / WEST } { +01:00 }
+\datatool_region_set_timezone_map:nn { BE / WET } { +00:00 }
+\datatool_region_set_timezone_map:nn { BE / EEST } { +03:00 }
+\datatool_region_set_timezone_map:nn { BE / EET } { +02:00 }
+\datatool_region_set_timezone_map:nn { BE / CEST } { +02:00 }
+\datatool_region_set_timezone_map:nn { BE / CET } { +01:00 }
+\datatool_region_set_timezone_map:nn { BE / GMT } { +00:00 }
+\datatool_locale_define_keys:nn { BE }
+ {
+ number-style .choices:nn =
+ { default , dialect , thinspace }
+ {
+ \exp_args:NNe \renewcommand
+ \datatoolBESetNumberChars
+ {
+ \exp_not:N \bool_if:NT
+ \exp_not:N \l_datatool_region_set_numberchars_bool
+ {
+ \exp_not:c { datatool_BE_set_numberchars_ \l_keys_choice_tl : }
+ }
+ }
+ \tl_if_eq:NnT \l_datatool_current_region_tl { BE }
+ {
+ \datatoolBESetNumberChars
+ }
+ } ,
+ currency-symbol-position .choice: ,
+ currency-symbol-position / before .code:n =
+ {
+ \cs_set_eq:NN \datatool_BE_currency_position:nn \dtlcurrprefixfmt
+ } ,
+ currency-symbol-position / after .code:n =
+ {
+ \cs_set_eq:NN \datatool_BE_currency_position:nn \dtlcurrsuffixfmt
+ } ,
+ currency-symbol-sep .choice: ,
+ currency-symbol-sep / none .code:n =
+ {
+ \tl_clear:N \l_datatool_BE_sym_sep_tl
+ } ,
+ currency-symbol-sep / thin-space .code:n =
+ {
+ \tl_set:Nn \l_datatool_BE_sym_sep_tl { \, }
+ } ,
+ currency-symbol-sep / space .code:n =
+ {
+ \tl_set:Nn \l_datatool_BE_sym_sep_tl { ~ }
+ } ,
+ currency-symbol-sep / nbsp .code:n =
+ {
+ \tl_set:Nn \l_datatool_BE_sym_sep_tl { \nobreakspace }
+ } ,
+ currency-symbol-sep .initial:n = { none } ,
+ date-style .choice: ,
+ date-style / dmyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_BE_datestyle_tl { ddmmyyyy }
+ } ,
+ date-style / mdyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_BE_datestyle_tl { mmddyyyy }
+ } ,
+ date-style / yyyymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_BE_datestyle_tl { yyyymmdd }
+ } ,
+ date-style / dmyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_BE_datestyle_tl { ddmmyy }
+ } ,
+ date-style / mdyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_BE_datestyle_tl { mmddyy }
+ } ,
+ date-style / yymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_BE_datestyle_tl { yymmdd }
+ } ,
+ date-variant .choice: ,
+ date-variant / slash .code:n =
+ {
+ \tl_set:Nn \l__datatool_BE_datevariant_tl { slash }
+ } ,
+ date-variant / hyphen .code:n =
+ {
+ \tl_set:Nn \l__datatool_BE_datevariant_tl { hyphen }
+ } ,
+ date-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_BE_datevariant_tl { dot }
+ } ,
+ date-variant / dialect .code:n =
+ {
+ \tl_set:Nn \l__datatool_BE_datevariant_tl
+ { \l_datatool_current_language_tl }
+ } ,
+ time-variant .choice: ,
+ time-variant / colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_BE_timevariant_tl { colon }
+ } ,
+ time-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_BE_timevariant_tl { dot }
+ } ,
+ time-variant / dialect .code:n =
+ {
+ \tl_if_eq:NnTF \l__datatool_BE_timevariant_tl { dot }
+ {
+ \tl_set:Nn \l__datatool_BE_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ }
+ {
+ \tl_if_in:NnF
+ \l__datatool_BE_timevariant_tl
+ { \l_datatool_current_language_tl }
+ {
+ \tl_set:Nn \l__datatool_BE_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ }
+ }
+ } ,
+ time-variant / dialect-colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_BE_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ } ,
+ time-variant / dialect-dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_BE_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ } ,
+ }
+\newcommand \datatoolBESetTemporalParsers
+ {
+ \renewcommand \DTLCurrentLocaleParseTimeStamp
+ { \datatool_BE_parse_timestamp:NnTF }
+ \renewcommand \DTLCurrentLocaleParseDate
+ { \datatool_BE_parse_date:NnTF }
+ \renewcommand \DTLCurrentLocaleParseTime
+ { \datatool_BE_parse_time:NnTF }
+ \let
+ \DTLCurrentLocaleGetTimeZoneMap
+ \datatool_BE_get_timezone_map:n
+ }
+\newcommand \datatoolBESetTemporalFormatters
+ {
+ \let
+ \DTLCurrentLocaleFormatDate
+ \datatool_default_date_fmt:nnnn
+ \let
+ \DTLCurrentLocaleFormatTime
+ \datatool_default_time_fmt:nnn
+ \let
+ \DTLCurrentLocaleFormatTimeZone
+ \datatool_default_timezone_fmt:nn
+ \let
+ \DTLCurrentLocaleFormatTimeStampNoZone
+ \datatool_default_timestamp_fmt:nnnnnnn
+ \let
+ \DTLCurrentLocaleFormatTimeStampWithZone
+ \datatool_default_timestamp_fmt:nnnnnnnnn
+ \renewcommand \DTLCurrentLocaleTimeStampFmtSep { ~ }
+ }
+\newcommand \DTLBELocaleHook
+ {
+ \datatoolBESetNumberChars
+ \datatoolBESetCurrency
+ \datatoolBESetTemporalParsers
+ \datatoolBESetTemporalFormatters
+ \tl_set:Nn \l_datatool_current_region_tl { BE }
+ }
+\ExplSyntaxOff
+\endinput
+%%
+%% End of file `datatool-BE.ldf'.
Property changes on: trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-BE.ldf
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-CA.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-CA.ldf (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-CA.ldf 2025-03-02 21:37:12 UTC (rev 74393)
@@ -0,0 +1,455 @@
+%%
+%% This is file `datatool-CA.ldf',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% datatool-regions.dtx (with options: `datatool-CA.ldf,package')
+%%
+%% datatool-regions.dtx
+%% Copyright 2025 Nicola Talbot
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Nicola Talbot.
+%%
+%% This work consists of the files datatool-regions.dtx and datatool-regions.ins and the derived files datatool-AU.ldf, datatool-BE.ldf, datatool-CA.ldf, datatool-FK.ldf, datatool-GB.ldf, datatool-GG.ldf, datatool-GI.ldf, datatool-IE.ldf, datatool-IM.ldf, datatool-JE.ldf, datatool-NZ.ldf, datatool-US.ldf, datatool-ZA.ldf.
+%%
+%% \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 \~}
+\TrackLangProvidesResource{CA}[2025/03/01 v1.0]
+\ExplSyntaxOn
+\newcommand \datatoolCASetNumberChars
+ {
+ \bool_if:NT \l_datatool_region_set_numberchars_bool
+ {
+ \tl_if_empty:NTF \l_datatool_current_language_tl
+ {
+ \datatool_locale_warn:nn { datatool-CA }
+ {
+ No ~ current ~ language: ~ can't ~ set ~
+ number ~ group ~ and ~ decimal ~ characters
+ }
+ }
+ {
+ \cs_if_exist_use:cF
+ { datatool \l_datatool_current_language_tl CASetNumberChars }
+ {
+ \datatool_locale_warn:nn { datatool-CA }
+ {
+ No ~ support ~ for ~ locale ~
+ ` \l_datatool_current_language_tl - CA': ~ can't ~ set ~
+ number ~ group ~ and ~ decimal ~ characters
+ }
+ }
+ }
+ }
+ }
+\cs_new:Nn \datatool_CA_currency_position:nn
+ {
+ \dtlcurrprefixfmt { #1 } { #2 }
+ }
+\tl_new:N \l_datatool_CA_sym_sep_tl
+\newcommand \datatoolCAcurrencyfmt [ 2 ]
+ {
+ \datatool_CA_currency_position:nn
+ {
+ \datatoolCAsymbolprefix { CA }
+ #1
+ }
+ { #2 }
+ }
+\newcommand \datatoolCAsymbolprefix [ 1 ] { }
+\datatool_def_currency:nnnV
+ { \datatoolCAcurrencyfmt }
+ { CAD }
+ { \$ }
+ \c_dollar_str
+\datatool_register_regional_currency_code:nn { CA } { CAD }
+\newcommand \datatoolCASetCurrency
+ {
+ \bool_if:NT \l_datatool_region_set_currency_bool
+ {
+ \DTLsetdefaultcurrency { CAD }
+ \renewcommand \DTLCurrentLocaleCurrencyDP { 2 }
+ \renewcommand \dtlcurrfmtsymsep { \l_datatool_CA_sym_sep_tl }
+ }
+ }
+\tl_new:N \l__datatool_CA_datevariant_tl
+\tl_set:Nn \l__datatool_CA_datevariant_tl { hyphen }
+\tl_new:N \l__datatool_CA_datestyle_tl
+\tl_set:Nn \l__datatool_CA_datestyle_tl { yyyymmdd }
+\tl_new:N \l__datatool_CA_timevariant_tl
+\tl_set:Nn \l__datatool_CA_timevariant_tl { colon }
+\cs_new:Nn \datatool_CA_parse_timestamp:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_CA_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_CA_datevariant_tl
+ _
+ \l__datatool_CA_datestyle_tl
+ _date_regex
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_CA_timevariant_tl
+ _hhmmss_time_regex
+ }
+ {
+ \use:c
+ {
+ datatool_
+ \l__datatool_CA_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_CA_datevariant_tl
+ _
+ \l__datatool_CA_datestyle_tl
+ _date_regex
+ }
+ {
+ c_datatool_
+ \l__datatool_CA_timevariant_tl
+ _hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-CA }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_CA_timevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-CA }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_CA_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_CA_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-CA }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_CA_datestyle_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_CA_parse_date:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_CA_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_CA_datevariant_tl
+ _anchored_
+ \l__datatool_CA_datestyle_tl
+ _date_regex
+ }
+ {
+ \exp_args:cc
+ {
+ datatool_
+ \l__datatool_CA_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_CA_datevariant_tl
+ _anchored_
+ \l__datatool_CA_datestyle_tl
+ _date_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-CA }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_CA_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_CA_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-CA }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_CA_datestyle_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_CA_parse_time:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_CA_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ {
+ \datatool_hhmmss_parse_time:cNnTF
+ {
+ c_datatool_
+ \l__datatool_CA_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-CA }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_CA_timevariant_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_CA_get_timezone_map:n
+ {
+ \datatool_region_get_timezone_map:n { CA / #1 }
+ }
+\datatool_region_set_timezone_map:nn { CA / NDT } { -02:30 }
+\datatool_region_set_timezone_map:nn { CA / NST } { -03:30 }
+\datatool_region_set_timezone_map:nn { CA / AST } { -04:00 }
+\datatool_region_set_timezone_map:nn { CA / ADT } { -03:00 }
+\datatool_region_set_timezone_map:nn { CA / EST } { -05:00 }
+\datatool_region_set_timezone_map:nn { CA / EDT } { -04:00 }
+\datatool_region_set_timezone_map:nn { CA / CST } { -06:00 }
+\datatool_region_set_timezone_map:nn { CA / CDT } { -05:00 }
+\datatool_region_set_timezone_map:nn { CA / MST } { -07:00 }
+\datatool_region_set_timezone_map:nn { CA / MDT } { -06:00 }
+\datatool_region_set_timezone_map:nn { CA / PST } { -08:00 }
+\datatool_region_set_timezone_map:nn { CA / PDT } { -07:00 }
+\datatool_locale_define_keys:nn { CA }
+ {
+ number-style .code:n =
+ {
+ \exp_args:Ne \keys_if_exist:nnTF
+ { datatool / locale / \l_datatool_current_language_tl - CA }
+ { number-style }
+ {
+ \exp_args:Ne \keys_set:nn
+ { datatool / locale / \l_datatool_current_language_tl - CA }
+ { number-style = { #1 } }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-CA }
+ {
+ No ~ number-style ~ available ~ for ~ current ~ language ~
+ ` \l_datatool_current_language_tl ' ~
+ (additional ~ language ~ module ~ may ~ need ~ installing)
+ }
+ }
+ } ,
+ currency-symbol-position .choice: ,
+ currency-symbol-position / before .code:n =
+ {
+ \cs_set_eq:NN \datatool_CA_currency_position:nn \dtlcurrprefixfmt
+ } ,
+ currency-symbol-position / after .code:n =
+ {
+ \cs_set_eq:NN \datatool_CA_currency_position:nn \dtlcurrsuffixfmt
+ } ,
+ currency-symbol-prefix .choice: ,
+ currency-symbol-prefix / false .code:n =
+ {
+ \cs_set_eq:NN \datatoolCAsymbolprefix \use_none:n
+ } ,
+ currency-symbol-prefix / true .code:n =
+ {
+ \cs_set_eq:NN
+ \datatoolCAsymbolprefix
+ \datatool_currency_symbol_region_prefix:n
+ } ,
+ currency-symbol-prefix .default:n = { true } ,
+ currency-symbol-sep .choice: ,
+ currency-symbol-sep / none .code:n =
+ {
+ \tl_clear:N \l_datatool_CA_sym_sep_tl
+ } ,
+ currency-symbol-sep / thin-space .code:n =
+ {
+ \tl_set:Nn \l_datatool_CA_sym_sep_tl { \, }
+ } ,
+ currency-symbol-sep / space .code:n =
+ {
+ \tl_set:Nn \l_datatool_CA_sym_sep_tl { ~ }
+ } ,
+ currency-symbol-sep / nbsp .code:n =
+ {
+ \tl_set:Nn \l_datatool_CA_sym_sep_tl { \nobreakspace }
+ } ,
+ currency-symbol-sep .initial:n = { none } ,
+ date-style .choice: ,
+ date-style / dmyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_CA_datestyle_tl { ddmmyyyy }
+ } ,
+ date-style / mdyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_CA_datestyle_tl { mmddyyyy }
+ } ,
+ date-style / yyyymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_CA_datestyle_tl { yyyymmdd }
+ } ,
+ date-style / dmyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_CA_datestyle_tl { ddmmyy }
+ } ,
+ date-style / mdyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_CA_datestyle_tl { mmddyy }
+ } ,
+ date-style / yymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_CA_datestyle_tl { yymmdd }
+ } ,
+ date-variant .choice: ,
+ date-variant / slash .code:n =
+ {
+ \tl_set:Nn \l__datatool_CA_datevariant_tl { slash }
+ } ,
+ date-variant / hyphen .code:n =
+ {
+ \tl_set:Nn \l__datatool_CA_datevariant_tl { hyphen }
+ } ,
+ date-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_CA_datevariant_tl { dot }
+ } ,
+ date-variant / dialect .code:n =
+ {
+ \tl_set:Nn \l__datatool_CA_datevariant_tl
+ { \l_datatool_current_language_tl }
+ } ,
+ time-variant .choice: ,
+ time-variant / colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_CA_timevariant_tl { colon }
+ } ,
+ time-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_CA_timevariant_tl { dot }
+ } ,
+ time-variant / dialect .code:n =
+ {
+ \tl_if_eq:NnTF \l__datatool_CA_timevariant_tl { dot }
+ {
+ \tl_set:Nn \l__datatool_CA_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ }
+ {
+ \tl_if_in:NnF
+ \l__datatool_CA_timevariant_tl
+ { \l_datatool_current_language_tl }
+ {
+ \tl_set:Nn \l__datatool_CA_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ }
+ }
+ } ,
+ time-variant / dialect-colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_CA_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ } ,
+ time-variant / dialect-dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_CA_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ } ,
+ }
+\newcommand \datatoolCASetTemporalParsers
+ {
+ \renewcommand \DTLCurrentLocaleParseTimeStamp
+ { \datatool_CA_parse_timestamp:NnTF }
+ \renewcommand \DTLCurrentLocaleParseDate
+ { \datatool_CA_parse_date:NnTF }
+ \renewcommand \DTLCurrentLocaleParseTime
+ { \datatool_CA_parse_time:NnTF }
+ \let
+ \DTLCurrentLocaleGetTimeZoneMap
+ \datatool_CA_get_timezone_map:n
+ }
+\newcommand \datatoolCASetTemporalFormatters
+ {
+ \let
+ \DTLCurrentLocaleFormatDate
+ \datatool_default_date_fmt:nnnn
+ \let
+ \DTLCurrentLocaleFormatTime
+ \datatool_default_time_fmt:nnn
+ \let
+ \DTLCurrentLocaleFormatTimeZone
+ \datatool_default_timezone_fmt:nn
+ \let
+ \DTLCurrentLocaleFormatTimeStampNoZone
+ \datatool_default_timestamp_fmt:nnnnnnn
+ \let
+ \DTLCurrentLocaleFormatTimeStampWithZone
+ \datatool_default_timestamp_fmt:nnnnnnnnn
+ \renewcommand \DTLCurrentLocaleTimeStampFmtSep { ~ }
+ }
+\newcommand \DTLCALocaleHook
+ {
+ \datatoolCASetCurrency
+ \datatoolCASetTemporalParsers
+ \datatoolCASetTemporalFormatters
+ \tl_set:Nn \l_datatool_current_region_tl { CA }
+ }
+\ExplSyntaxOff
+\endinput
+%%
+%% End of file `datatool-CA.ldf'.
Property changes on: trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-CA.ldf
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-FK.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-FK.ldf (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-FK.ldf 2025-03-02 21:37:12 UTC (rev 74393)
@@ -0,0 +1,458 @@
+%%
+%% This is file `datatool-FK.ldf',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% datatool-regions.dtx (with options: `datatool-FK.ldf,package')
+%%
+%% datatool-regions.dtx
+%% Copyright 2025 Nicola Talbot
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Nicola Talbot.
+%%
+%% This work consists of the files datatool-regions.dtx and datatool-regions.ins and the derived files datatool-AU.ldf, datatool-BE.ldf, datatool-CA.ldf, datatool-FK.ldf, datatool-GB.ldf, datatool-GG.ldf, datatool-GI.ldf, datatool-IE.ldf, datatool-IM.ldf, datatool-JE.ldf, datatool-NZ.ldf, datatool-US.ldf, datatool-ZA.ldf.
+%%
+%% \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 \~}
+\TrackLangProvidesResource{FK}[2025/03/01 v1.0]
+\ExplSyntaxOn
+\cs_new:Nn \datatool_FK_set_numberchars_official:
+ {
+ \datatool_set_numberchars:nn { , } { . }
+ }
+\cs_new:Nn \datatool_FK_set_numberchars_unofficial:
+ {
+ \datatool_set_thinspace_group_decimal_char:n { . }
+ }
+\newcommand \datatoolFKSetNumberChars
+ {
+ \bool_if:NT \l_datatool_region_set_numberchars_bool
+ {
+ \datatool_FK_set_numberchars_official:
+ }
+ }
+\cs_new:Nn \datatool_FK_currency_position:nn
+ {
+ \dtlcurrprefixfmt { #1 } { #2 }
+ }
+\tl_new:N \l_datatool_FK_sym_sep_tl
+\newcommand \datatoolFKcurrencyfmt [ 2 ]
+ {
+ \datatool_FK_currency_position:nn
+ {
+ \datatoolFKsymbolprefix { FK }
+ #1
+ }
+ { #2 }
+ }
+\newcommand \datatoolFKsymbolprefix [ 1 ] { }
+\datatool_def_currency:nnnV
+ { \datatoolFKcurrencyfmt }
+ { FKP }
+ { \pounds }
+ \l_datatool_pound_tl
+\datatool_register_regional_currency_code:nn { FK } { FKP }
+\newcommand \datatoolFKSetCurrency
+ {
+ \bool_if:NT \l_datatool_region_set_currency_bool
+ {
+ \DTLsetdefaultcurrency { FKP }
+ \renewcommand \DTLCurrentLocaleCurrencyDP { 2 }
+ \renewcommand \dtlcurrfmtsymsep { \l_datatool_FK_sym_sep_tl }
+ }
+ }
+\tl_new:N \l__datatool_FK_datevariant_tl
+\tl_set:Nn \l__datatool_FK_datevariant_tl { slash }
+\tl_new:N \l__datatool_FK_datestyle_tl
+\tl_set:Nn \l__datatool_FK_datestyle_tl { ddmmyyyy }
+\tl_new:N \l__datatool_FK_timevariant_tl
+\tl_set:Nn \l__datatool_FK_timevariant_tl { colon }
+\cs_new:Nn \datatool_FK_parse_timestamp:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_FK_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_FK_datevariant_tl
+ _
+ \l__datatool_FK_datestyle_tl
+ _date_regex
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_FK_timevariant_tl
+ _hhmmss_time_regex
+ }
+ {
+ \use:c
+ {
+ datatool_
+ \l__datatool_FK_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_FK_datevariant_tl
+ _
+ \l__datatool_FK_datestyle_tl
+ _date_regex
+ }
+ {
+ c_datatool_
+ \l__datatool_FK_timevariant_tl
+ _hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_FK_timevariant_tl
+ { datatool-FK }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_FK_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_FK_timevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_FK_datevariant_tl
+ { datatool-FK }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_FK_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_FK_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_FK_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-FK }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_FK_datestyle_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_FK_parse_date:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_FK_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_FK_datevariant_tl
+ _anchored_
+ \l__datatool_FK_datestyle_tl
+ _date_regex
+ }
+ {
+ \exp_args:cc
+ {
+ datatool_
+ \l__datatool_FK_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_FK_datevariant_tl
+ _anchored_
+ \l__datatool_FK_datestyle_tl
+ _date_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_FK_datevariant_tl
+ { datatool-FK }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_FK_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_FK_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_FK_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-FK }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_FK_datestyle_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_FK_parse_time:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_FK_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ {
+ \datatool_hhmmss_parse_time:cNnTF
+ {
+ c_datatool_
+ \l__datatool_FK_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_FK_timevariant_tl
+ { datatool-FK }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_FK_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_FK_timevariant_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_FK_get_timezone_map:n
+ {
+ \datatool_region_get_timezone_map:n { FK / #1 }
+ }
+\datatool_region_set_timezone_map:nn { FK / BST } { +01:00 }
+\datatool_region_set_timezone_map:nn { FK / FKST } { -03:00 }
+\datatool_region_set_timezone_map:nn { FK / GMT } { +00:00 }
+\datatool_locale_define_keys:nn { FK }
+ {
+ number-style .choices:nn =
+ { official, unofficial }
+ {
+ \exp_args:NNe \renewcommand
+ \datatoolFKSetNumberChars
+ {
+ \exp_not:N \bool_if:NT
+ \exp_not:N \l_datatool_region_set_numberchars_bool
+ {
+ \exp_not:c { datatool_FK_set_numberchars_ \l_keys_choice_tl : }
+ }
+ }
+ \tl_if_eq:NnT \l_datatool_current_region_tl { FK }
+ {
+ \datatoolFKSetNumberChars
+ }
+ } ,
+ currency-symbol-position .choice: ,
+ currency-symbol-position / before .code:n =
+ {
+ \cs_set_eq:NN \datatool_FK_currency_position:nn \dtlcurrprefixfmt
+ } ,
+ currency-symbol-position / after .code:n =
+ {
+ \cs_set_eq:NN \datatool_FK_currency_position:nn \dtlcurrsuffixfmt
+ } ,
+ currency-symbol-prefix .choice: ,
+ currency-symbol-prefix / false .code:n =
+ {
+ \cs_set_eq:NN \datatoolFKsymbolprefix \use_none:n
+ } ,
+ currency-symbol-prefix / true .code:n =
+ {
+ \cs_set_eq:NN
+ \datatoolFKsymbolprefix
+ \datatool_currency_symbol_region_prefix:n
+ } ,
+ currency-symbol-prefix .default:n = { true } ,
+ currency-symbol-sep .choice: ,
+ currency-symbol-sep / none .code:n =
+ {
+ \tl_clear:N \l_datatool_FK_sym_sep_tl
+ } ,
+ currency-symbol-sep / thin-space .code:n =
+ {
+ \tl_set:Nn \l_datatool_FK_sym_sep_tl { \, }
+ } ,
+ currency-symbol-sep / space .code:n =
+ {
+ \tl_set:Nn \l_datatool_FK_sym_sep_tl { ~ }
+ } ,
+ currency-symbol-sep / nbsp .code:n =
+ {
+ \tl_set:Nn \l_datatool_FK_sym_sep_tl { \nobreakspace }
+ } ,
+ currency-symbol-sep . initial:n = { none } ,
+ date-style .choice: ,
+ date-style / dmyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_FK_datestyle_tl { ddmmyyyy }
+ } ,
+ date-style / mdyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_FK_datestyle_tl { mmddyyyy }
+ } ,
+ date-style / yyyymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_FK_datestyle_tl { yyyymmdd }
+ } ,
+ date-style / dmyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_FK_datestyle_tl { ddmmyy }
+ } ,
+ date-style / mdyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_FK_datestyle_tl { mmddyy }
+ } ,
+ date-style / yymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_FK_datestyle_tl { yymmdd }
+ } ,
+ date-variant .choice: ,
+ date-variant / slash .code:n =
+ {
+ \tl_set:Nn \l__datatool_FK_datevariant_tl { slash }
+ } ,
+ date-variant / hyphen .code:n =
+ {
+ \tl_set:Nn \l__datatool_FK_datevariant_tl { hyphen }
+ } ,
+ date-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_FK_datevariant_tl { dot }
+ } ,
+ date-variant / dialect .code:n =
+ {
+ \tl_set:Nn \l__datatool_FK_datevariant_tl
+ { \l_datatool_current_language_tl }
+ } ,
+ time-variant .choice: ,
+ time-variant / colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_FK_timevariant_tl { colon }
+ } ,
+ time-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_FK_timevariant_tl { dot }
+ } ,
+ time-variant / dialect .code:n =
+ {
+ \tl_if_eq:NnTF \l__datatool_FK_timevariant_tl { dot }
+ {
+ \tl_set:Nn \l__datatool_FK_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ }
+ {
+ \tl_if_in:NnF
+ \l__datatool_FK_timevariant_tl
+ { \l_datatool_current_language_tl }
+ {
+ \tl_set:Nn \l__datatool_FK_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ }
+ }
+ } ,
+ time-variant / dialect-colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_FK_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ } ,
+ time-variant / dialect-dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_FK_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ } ,
+ }
+\newcommand \datatoolFKSetTemporalParsers
+ {
+ \renewcommand \DTLCurrentLocaleParseTimeStamp
+ { \datatool_FK_parse_timestamp:NnTF }
+ \renewcommand \DTLCurrentLocaleParseDate
+ { \datatool_FK_parse_date:NnTF }
+ \renewcommand \DTLCurrentLocaleParseTime
+ { \datatool_FK_parse_time:NnTF }
+ \let
+ \DTLCurrentLocaleGetTimeZoneMap
+ \datatool_FK_get_timezone_map:n
+ }
+\newcommand \datatoolFKSetTemporalFormatters
+ {
+ \let
+ \DTLCurrentLocaleFormatDate
+ \datatool_default_date_fmt:nnnn
+ \let
+ \DTLCurrentLocaleFormatTime
+ \datatool_default_time_fmt:nnn
+ \let
+ \DTLCurrentLocaleFormatTimeZone
+ \datatool_default_timezone_fmt:nn
+ \let
+ \DTLCurrentLocaleFormatTimeStampNoZone
+ \datatool_default_timestamp_fmt:nnnnnnn
+ \let
+ \DTLCurrentLocaleFormatTimeStampWithZone
+ \datatool_default_timestamp_fmt:nnnnnnnnn
+ \renewcommand \DTLCurrentLocaleTimeStampFmtSep { ~ }
+ }
+\newcommand \DTLFKLocaleHook
+ {
+ \datatoolFKSetNumberChars
+ \datatoolFKSetCurrency
+ \datatoolFKSetTemporalParsers
+ \datatoolFKSetTemporalFormatters
+ \tl_set:Nn \l_datatool_current_region_tl { FK }
+ }
+\ExplSyntaxOff
+\endinput
+%%
+%% End of file `datatool-FK.ldf'.
Property changes on: trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-FK.ldf
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-GB.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-GB.ldf (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-GB.ldf 2025-03-02 21:37:12 UTC (rev 74393)
@@ -0,0 +1,465 @@
+%%
+%% This is file `datatool-GB.ldf',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% datatool-regions.dtx (with options: `datatool-GB.ldf,package')
+%%
+%% datatool-regions.dtx
+%% Copyright 2025 Nicola Talbot
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Nicola Talbot.
+%%
+%% This work consists of the files datatool-regions.dtx and datatool-regions.ins and the derived files datatool-AU.ldf, datatool-BE.ldf, datatool-CA.ldf, datatool-FK.ldf, datatool-GB.ldf, datatool-GG.ldf, datatool-GI.ldf, datatool-IE.ldf, datatool-IM.ldf, datatool-JE.ldf, datatool-NZ.ldf, datatool-US.ldf, datatool-ZA.ldf.
+%%
+%% \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 \~}
+\TrackLangProvidesResource{GB}[2025/03/01 v1.0]
+\ExplSyntaxOn
+\cs_new:Nn \datatool_GB_set_numberchars_official:
+ {
+ \DTLsetnumberchars { , } { . }
+ }
+\cs_new:Nn \datatool_GB_set_numberchars_education:
+ {
+ \datatool_set_thinspace_group_decimal_char:n { . }
+ }
+\cs_new:Nn \datatool_GB_set_numberchars_old:
+ {
+ \datatool_set_numberchars_tl_regex:nnnn
+ { , } { \textperiodcentered }
+ { , } { \x{2E} | \u{l_datatool_middot_tl} | \c{textperiodcentered} }
+ }
+\newcommand \datatoolGBSetNumberChars
+ {
+ \bool_if:NT \l_datatool_region_set_numberchars_bool
+ {
+ \datatool_GB_set_numberchars_official:
+ }
+ }
+\cs_new:Nn \datatool_GB_currency_position:nn
+ {
+ \dtlcurrprefixfmt { #1 } { #2 }
+ }
+\tl_new:N \l_datatool_GB_sym_sep_tl
+\newcommand \datatoolGBcurrencyfmt [ 2 ]
+ {
+ \datatool_GB_currency_position:nn
+ {
+ \datatoolGBsymbolprefix { GB }
+ #1
+ }
+ { #2 }
+ }
+\newcommand \datatoolGBsymbolprefix [ 1 ] { }
+\datatool_def_currency:nnnV
+ { \datatoolGBcurrencyfmt }
+ { GBP }
+ { \pounds }
+ \l_datatool_pound_tl
+\datatool_register_regional_currency_code:nn { GB } { GBP }
+\newcommand \datatoolGBSetCurrency
+ {
+ \bool_if:NT \l_datatool_region_set_currency_bool
+ {
+ \DTLsetdefaultcurrency { GBP }
+ \renewcommand \DTLCurrentLocaleCurrencyDP { 2 }
+ \renewcommand \dtlcurrfmtsymsep { \l_datatool_GB_sym_sep_tl }
+ }
+ }
+\tl_new:N \l__datatool_GB_datevariant_tl
+\tl_set:Nn \l__datatool_GB_datevariant_tl { slash }
+\tl_new:N \l__datatool_GB_datestyle_tl
+\tl_set:Nn \l__datatool_GB_datestyle_tl { ddmmyyyy }
+\tl_new:N \l__datatool_GB_timevariant_tl
+\tl_set:Nn \l__datatool_GB_timevariant_tl { colon }
+\cs_new:Nn \datatool_GB_parse_timestamp:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_GB_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_GB_datevariant_tl
+ _
+ \l__datatool_GB_datestyle_tl
+ _date_regex
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_GB_timevariant_tl
+ _hhmmss_time_regex
+ }
+ {
+ \use:c
+ {
+ datatool_
+ \l__datatool_GB_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_GB_datevariant_tl
+ _
+ \l__datatool_GB_datestyle_tl
+ _date_regex
+ }
+ {
+ c_datatool_
+ \l__datatool_GB_timevariant_tl
+ _hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_GB_timevariant_tl
+ { datatool-GB }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_GB_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_GB_timevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_GB_datevariant_tl
+ { datatool-GB }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_GB_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_GB_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_GB_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-GB }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_GB_datestyle_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_GB_parse_date:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_GB_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_GB_datevariant_tl
+ _anchored_
+ \l__datatool_GB_datestyle_tl
+ _date_regex
+ }
+ {
+ \exp_args:cc
+ {
+ datatool_
+ \l__datatool_GB_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_GB_datevariant_tl
+ _anchored_
+ \l__datatool_GB_datestyle_tl
+ _date_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_GB_datevariant_tl
+ { datatool-GB }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_GB_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_GB_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_GB_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-GB }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_GB_datestyle_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_GB_parse_time:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_GB_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ {
+ \datatool_hhmmss_parse_time:cNnTF
+ {
+ c_datatool_
+ \l__datatool_GB_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_GB_timevariant_tl
+ { datatool-GB }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_GB_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_GB_timevariant_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_GB_get_timezone_map:n
+ {
+ \datatool_region_get_timezone_map:n { GB / #1 }
+ }
+\datatool_region_set_timezone_map:nn { GB / GMT } { +00:00 }
+\datatool_region_set_timezone_map:nn { GB / BST } { +01:00 }
+\datatool_region_set_timezone_map:nn { GB / CET } { +01:00 }
+\datatool_region_set_timezone_map:nn { GB / CEST } { +02:00 }
+\datatool_locale_define_keys:nn { GB }
+ {
+ number-style .choices:nn =
+ { official , education , old }
+ {
+ \exp_args:NNe \renewcommand
+ \datatoolGBSetNumberChars
+ {
+ \exp_not:N \bool_if:NT
+ \exp_not:N \l_datatool_region_set_numberchars_bool
+ {
+ \exp_not:c { datatool_GB_set_numberchars_ \l_keys_choice_tl : }
+ }
+ }
+ \tl_if_eq:NnT \l_datatool_current_region_tl { GB }
+ {
+ \datatoolGBSetNumberChars
+ }
+ } ,
+ currency-symbol-position .choice: ,
+ currency-symbol-position / before .code:n =
+ {
+ \cs_set_eq:NN \datatool_GB_currency_position:nn \dtlcurrprefixfmt
+ } ,
+ currency-symbol-position / after .code:n =
+ {
+ \cs_set_eq:NN \datatool_GB_currency_position:nn \dtlcurrsuffixfmt
+ } ,
+ currency-symbol-prefix .choice: ,
+ currency-symbol-prefix / false .code:n =
+ {
+ \cs_set_eq:NN \datatoolGBsymbolprefix \use_none:n
+ } ,
+ currency-symbol-prefix / true .code:n =
+ {
+ \cs_set_eq:NN
+ \datatoolGBsymbolprefix
+ \datatool_currency_symbol_region_prefix:n
+ } ,
+ currency-symbol-prefix .default:n = { true } ,
+ currency-symbol-sep .choice: ,
+ currency-symbol-sep / none .code:n =
+ {
+ \tl_clear:N \l_datatool_GB_sym_sep_tl
+ } ,
+ currency-symbol-sep / thin-space .code:n =
+ {
+ \tl_set:Nn \l_datatool_GB_sym_sep_tl { \, }
+ } ,
+ currency-symbol-sep / space .code:n =
+ {
+ \tl_set:Nn \l_datatool_GB_sym_sep_tl { ~ }
+ } ,
+ currency-symbol-sep / nbsp .code:n =
+ {
+ \tl_set:Nn \l_datatool_GB_sym_sep_tl { \nobreakspace }
+ } ,
+ currency-symbol-sep .initial:n = { none } ,
+ date-style .choice: ,
+ date-style / dmyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_GB_datestyle_tl { ddmmyyyy }
+ } ,
+ date-style / mdyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_GB_datestyle_tl { mmddyyyy }
+ } ,
+ date-style / yyyymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_GB_datestyle_tl { yyyymmdd }
+ } ,
+ date-style / dmyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_GB_datestyle_tl { ddmmyy }
+ } ,
+ date-style / mdyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_GB_datestyle_tl { mmddyy }
+ } ,
+ date-style / yymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_GB_datestyle_tl { yymmdd }
+ } ,
+ date-variant .choice: ,
+ date-variant / slash .code:n =
+ {
+ \tl_set:Nn \l__datatool_GB_datevariant_tl { slash }
+ } ,
+ date-variant / hyphen .code:n =
+ {
+ \tl_set:Nn \l__datatool_GB_datevariant_tl { hyphen }
+ } ,
+ date-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_GB_datevariant_tl { dot }
+ } ,
+ date-variant / dialect .code:n =
+ {
+ \tl_set:Nn \l__datatool_GB_datevariant_tl
+ { \l_datatool_current_language_tl }
+ } ,
+ time-variant .choice: ,
+ time-variant / colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_GB_timevariant_tl { colon }
+ } ,
+ time-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_GB_timevariant_tl { dot }
+ } ,
+ time-variant / dialect .code:n =
+ {
+ \tl_if_eq:NnTF \l__datatool_GB_timevariant_tl { dot }
+ {
+ \tl_set:Nn \l__datatool_GB_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ }
+ {
+ \tl_if_in:NnF
+ \l__datatool_GB_timevariant_tl
+ { \l_datatool_current_language_tl }
+ {
+ \tl_set:Nn \l__datatool_GB_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ }
+ }
+ } ,
+ time-variant / dialect-colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_GB_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ } ,
+ time-variant / dialect-dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_GB_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ } ,
+ }
+\newcommand \datatoolGBSetTemporalParsers
+ {
+ \renewcommand \DTLCurrentLocaleParseTimeStamp
+ { \datatool_GB_parse_timestamp:NnTF }
+ \renewcommand \DTLCurrentLocaleParseDate
+ { \datatool_GB_parse_date:NnTF }
+ \renewcommand \DTLCurrentLocaleParseTime
+ { \datatool_GB_parse_time:NnTF }
+ \let
+ \DTLCurrentLocaleGetTimeZoneMap
+ \datatool_GB_get_timezone_map:n
+ }
+\newcommand \datatoolGBSetTemporalFormatters
+ {
+ \let
+ \DTLCurrentLocaleFormatDate
+ \datatool_default_date_fmt:nnnn
+ \let
+ \DTLCurrentLocaleFormatTime
+ \datatool_default_time_fmt:nnn
+ \let
+ \DTLCurrentLocaleFormatTimeZone
+ \datatool_default_timezone_fmt:nn
+ \let
+ \DTLCurrentLocaleFormatTimeStampNoZone
+ \datatool_default_timestamp_fmt:nnnnnnn
+ \let
+ \DTLCurrentLocaleFormatTimeStampWithZone
+ \datatool_default_timestamp_fmt:nnnnnnnnn
+ \renewcommand \DTLCurrentLocaleTimeStampFmtSep { ~ }
+ }
+\newcommand \DTLGBLocaleHook
+ {
+ \datatoolGBSetNumberChars
+ \datatoolGBSetCurrency
+ \datatoolGBSetTemporalParsers
+ \datatoolGBSetTemporalFormatters
+ \tl_set:Nn \l_datatool_current_region_tl { GB }
+ }
+\ExplSyntaxOff
+\endinput
+%%
+%% End of file `datatool-GB.ldf'.
Property changes on: trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-GB.ldf
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-GG.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-GG.ldf (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-GG.ldf 2025-03-02 21:37:12 UTC (rev 74393)
@@ -0,0 +1,459 @@
+%%
+%% This is file `datatool-GG.ldf',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% datatool-regions.dtx (with options: `datatool-GG.ldf,package')
+%%
+%% datatool-regions.dtx
+%% Copyright 2025 Nicola Talbot
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Nicola Talbot.
+%%
+%% This work consists of the files datatool-regions.dtx and datatool-regions.ins and the derived files datatool-AU.ldf, datatool-BE.ldf, datatool-CA.ldf, datatool-FK.ldf, datatool-GB.ldf, datatool-GG.ldf, datatool-GI.ldf, datatool-IE.ldf, datatool-IM.ldf, datatool-JE.ldf, datatool-NZ.ldf, datatool-US.ldf, datatool-ZA.ldf.
+%%
+%% \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 \~}
+\TrackLangProvidesResource{GG}[2025/03/01 v1.0]
+\ExplSyntaxOn
+\cs_new:Nn \datatool_GG_set_numberchars_official:
+ {
+ \datatool_set_numberchars:nn { , } { . }
+ }
+\cs_new:Nn \datatool_GG_set_numberchars_unofficial:
+ {
+ \datatool_set_thinspace_group_decimal_char:n { . }
+ }
+\newcommand \datatoolGGSetNumberChars
+ {
+ \bool_if:NT \l_datatool_region_set_numberchars_bool
+ {
+ \datatool_GG_set_numberchars_official:
+ }
+ }
+\cs_new:Nn \datatool_GG_currency_position:nn
+ {
+ \dtlcurrprefixfmt { #1 } { #2 }
+ }
+\tl_new:N \l_datatool_GG_sym_sep_tl
+\newcommand \datatoolGGcurrencyfmt [ 2 ]
+ {
+ \datatool_GG_currency_position:nn
+ {
+ \datatoolGGsymbolprefix { GG }
+ #1
+ }
+ { #2 }
+ }
+\newcommand \datatoolGGsymbolprefix [ 1 ] { }
+\datatool_def_currency:nnnV
+ { \datatoolGGcurrencyfmt }
+ { GGP }
+ { \pounds }
+ \l_datatool_pound_tl
+\datatool_register_regional_currency_code:nn { GG } { GGP }
+\newcommand \datatoolGGSetCurrency
+ {
+ \bool_if:NT \l_datatool_region_set_currency_bool
+ {
+ \DTLsetdefaultcurrency { GGP }
+ \renewcommand \DTLCurrentLocaleCurrencyDP { 2 }
+ \renewcommand \dtlcurrfmtsymsep { \l_datatool_GG_sym_sep_tl }
+ }
+ }
+\tl_new:N \l__datatool_GG_datevariant_tl
+\tl_set:Nn \l__datatool_GG_datevariant_tl { slash }
+\tl_new:N \l__datatool_GG_datestyle_tl
+\tl_set:Nn \l__datatool_GG_datestyle_tl { ddmmyyyy }
+\tl_new:N \l__datatool_GG_timevariant_tl
+\tl_set:Nn \l__datatool_GG_timevariant_tl { colon }
+\cs_new:Nn \datatool_GG_parse_timestamp:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_GG_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_GG_datevariant_tl
+ _
+ \l__datatool_GG_datestyle_tl
+ _date_regex
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_GG_timevariant_tl
+ _hhmmss_time_regex
+ }
+ {
+ \use:c
+ {
+ datatool_
+ \l__datatool_GG_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_GG_datevariant_tl
+ _
+ \l__datatool_GG_datestyle_tl
+ _date_regex
+ }
+ {
+ c_datatool_
+ \l__datatool_GG_timevariant_tl
+ _hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_GG_timevariant_tl
+ { datatool-GG }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_GG_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_GG_timevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_GG_datevariant_tl
+ { datatool-GG }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_GG_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_GG_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_GG_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-GG }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_GG_datestyle_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_GG_parse_date:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_GG_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_GG_datevariant_tl
+ _anchored_
+ \l__datatool_GG_datestyle_tl
+ _date_regex
+ }
+ {
+ \exp_args:cc
+ {
+ datatool_
+ \l__datatool_GG_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_GG_datevariant_tl
+ _anchored_
+ \l__datatool_GG_datestyle_tl
+ _date_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_GG_datevariant_tl
+ { datatool-GG }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_GG_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_GG_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_GG_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-GG }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_GG_datestyle_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_GG_parse_time:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_GG_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ {
+ \datatool_hhmmss_parse_time:cNnTF
+ {
+ c_datatool_
+ \l__datatool_GG_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_GG_timevariant_tl
+ { datatool-GG }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_GG_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_GG_timevariant_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_GG_get_timezone_map:n
+ {
+ \datatool_region_get_timezone_map:n { GG / #1 }
+ }
+\datatool_region_set_timezone_map:nn { GG / BST } { +01:00 }
+\datatool_region_set_timezone_map:nn { GG / GMT } { +00:00 }
+\datatool_region_set_timezone_map:nn { GG / CET } { +01:00 }
+\datatool_region_set_timezone_map:nn { GG / CEST } { +02:00 }
+\datatool_locale_define_keys:nn { GG }
+ {
+ number-style .choices:nn =
+ { official, unofficial }
+ {
+ \exp_args:NNe \renewcommand
+ \datatoolGGSetNumberChars
+ {
+ \exp_not:N \bool_if:NT
+ \exp_not:N \l_datatool_region_set_numberchars_bool
+ {
+ \exp_not:c { datatool_GG_set_numberchars_ \l_keys_choice_tl : }
+ }
+ }
+ \tl_if_eq:NnT \l_datatool_current_region_tl { GG }
+ {
+ \datatoolGGSetNumberChars
+ }
+ } ,
+ currency-symbol-position .choice: ,
+ currency-symbol-position / before .code:n =
+ {
+ \cs_set_eq:NN \datatool_GG_currency_position:nn \dtlcurrprefixfmt
+ } ,
+ currency-symbol-position / after .code:n =
+ {
+ \cs_set_eq:NN \datatool_GG_currency_position:nn \dtlcurrsuffixfmt
+ } ,
+ currency-symbol-prefix .choice: ,
+ currency-symbol-prefix / false .code:n =
+ {
+ \cs_set_eq:NN \datatoolGGsymbolprefix \use_none:n
+ } ,
+ currency-symbol-prefix / true .code:n =
+ {
+ \cs_set_eq:NN
+ \datatoolGGsymbolprefix
+ \datatool_currency_symbol_region_prefix:n
+ } ,
+ currency-symbol-prefix .default:n = { true } ,
+ currency-symbol-sep .choice: ,
+ currency-symbol-sep / none .code:n =
+ {
+ \tl_clear:N \l_datatool_GG_sym_sep_tl
+ } ,
+ currency-symbol-sep / thin-space .code:n =
+ {
+ \tl_set:Nn \l_datatool_GG_sym_sep_tl { \, }
+ } ,
+ currency-symbol-sep / space .code:n =
+ {
+ \tl_set:Nn \l_datatool_GG_sym_sep_tl { ~ }
+ } ,
+ currency-symbol-sep / nbsp .code:n =
+ {
+ \tl_set:Nn \l_datatool_GG_sym_sep_tl { \nobreakspace }
+ } ,
+ currency-symbol-sep . initial:n = { none } ,
+ date-style .choice: ,
+ date-style / dmyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_GG_datestyle_tl { ddmmyyyy }
+ } ,
+ date-style / mdyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_GG_datestyle_tl { mmddyyyy }
+ } ,
+ date-style / yyyymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_GG_datestyle_tl { yyyymmdd }
+ } ,
+ date-style / dmyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_GG_datestyle_tl { ddmmyy }
+ } ,
+ date-style / mdyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_GG_datestyle_tl { mmddyy }
+ } ,
+ date-style / yymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_GG_datestyle_tl { yymmdd }
+ } ,
+ date-variant .choice: ,
+ date-variant / slash .code:n =
+ {
+ \tl_set:Nn \l__datatool_GG_datevariant_tl { slash }
+ } ,
+ date-variant / hyphen .code:n =
+ {
+ \tl_set:Nn \l__datatool_GG_datevariant_tl { hyphen }
+ } ,
+ date-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_GG_datevariant_tl { dot }
+ } ,
+ date-variant / dialect .code:n =
+ {
+ \tl_set:Nn \l__datatool_GG_datevariant_tl
+ { \l_datatool_current_language_tl }
+ } ,
+ time-variant .choice: ,
+ time-variant / colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_GG_timevariant_tl { colon }
+ } ,
+ time-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_GG_timevariant_tl { dot }
+ } ,
+ time-variant / dialect .code:n =
+ {
+ \tl_if_eq:NnTF \l__datatool_GG_timevariant_tl { dot }
+ {
+ \tl_set:Nn \l__datatool_GG_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ }
+ {
+ \tl_if_in:NnF
+ \l__datatool_GG_timevariant_tl
+ { \l_datatool_current_language_tl }
+ {
+ \tl_set:Nn \l__datatool_GG_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ }
+ }
+ } ,
+ time-variant / dialect-colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_GG_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ } ,
+ time-variant / dialect-dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_GG_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ } ,
+ }
+\newcommand \datatoolGGSetTemporalParsers
+ {
+ \renewcommand \DTLCurrentLocaleParseTimeStamp
+ { \datatool_GG_parse_timestamp:NnTF }
+ \renewcommand \DTLCurrentLocaleParseDate
+ { \datatool_GG_parse_date:NnTF }
+ \renewcommand \DTLCurrentLocaleParseTime
+ { \datatool_GG_parse_time:NnTF }
+ \let
+ \DTLCurrentLocaleGetTimeZoneMap
+ \datatool_GG_get_timezone_map:n
+ }
+\newcommand \datatoolGGSetTemporalFormatters
+ {
+ \let
+ \DTLCurrentLocaleFormatDate
+ \datatool_default_date_fmt:nnnn
+ \let
+ \DTLCurrentLocaleFormatTime
+ \datatool_default_time_fmt:nnn
+ \let
+ \DTLCurrentLocaleFormatTimeZone
+ \datatool_default_timezone_fmt:nn
+ \let
+ \DTLCurrentLocaleFormatTimeStampNoZone
+ \datatool_default_timestamp_fmt:nnnnnnn
+ \let
+ \DTLCurrentLocaleFormatTimeStampWithZone
+ \datatool_default_timestamp_fmt:nnnnnnnnn
+ \renewcommand \DTLCurrentLocaleTimeStampFmtSep { ~ }
+ }
+\newcommand \DTLGGLocaleHook
+ {
+ \datatoolGGSetNumberChars
+ \datatoolGGSetCurrency
+ \datatoolGGSetTemporalParsers
+ \datatoolGGSetTemporalFormatters
+ \tl_set:Nn \l_datatool_current_region_tl { GG }
+ }
+\ExplSyntaxOff
+\endinput
+%%
+%% End of file `datatool-GG.ldf'.
Property changes on: trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-GG.ldf
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-GI.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-GI.ldf (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-GI.ldf 2025-03-02 21:37:12 UTC (rev 74393)
@@ -0,0 +1,459 @@
+%%
+%% This is file `datatool-GI.ldf',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% datatool-regions.dtx (with options: `datatool-GI.ldf,package')
+%%
+%% datatool-regions.dtx
+%% Copyright 2025 Nicola Talbot
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Nicola Talbot.
+%%
+%% This work consists of the files datatool-regions.dtx and datatool-regions.ins and the derived files datatool-AU.ldf, datatool-BE.ldf, datatool-CA.ldf, datatool-FK.ldf, datatool-GB.ldf, datatool-GG.ldf, datatool-GI.ldf, datatool-IE.ldf, datatool-IM.ldf, datatool-JE.ldf, datatool-NZ.ldf, datatool-US.ldf, datatool-ZA.ldf.
+%%
+%% \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 \~}
+\TrackLangProvidesResource{GI}[2025/03/01 v1.0]
+\ExplSyntaxOn
+\cs_new:Nn \datatool_GI_set_numberchars_official:
+ {
+ \datatool_set_numberchars:nn { , } { . }
+ }
+\cs_new:Nn \datatool_GI_set_numberchars_unofficial:
+ {
+ \datatool_set_thinspace_group_decimal_char:n { . }
+ }
+\newcommand \datatoolGISetNumberChars
+ {
+ \bool_if:NT \l_datatool_region_set_numberchars_bool
+ {
+ \datatool_GI_set_numberchars_official:
+ }
+ }
+\cs_new:Nn \datatool_GI_currency_position:nn
+ {
+ \dtlcurrprefixfmt { #1 } { #2 }
+ }
+\tl_new:N \l_datatool_GI_sym_sep_tl
+\newcommand \datatoolGIcurrencyfmt [ 2 ]
+ {
+ \datatool_GI_currency_position:nn
+ {
+ \datatoolGIsymbolprefix { GI }
+ #1
+ }
+ { #2 }
+ }
+\newcommand \datatoolGIsymbolprefix [ 1 ] { }
+\datatool_def_currency:nnnV
+ { \datatoolGIcurrencyfmt }
+ { GIP }
+ { \pounds }
+ \l_datatool_pound_tl
+\datatool_register_regional_currency_code:nn { GI } { GIP }
+\newcommand \datatoolGISetCurrency
+ {
+ \bool_if:NT \l_datatool_region_set_currency_bool
+ {
+ \DTLsetdefaultcurrency { GIP }
+ \renewcommand \DTLCurrentLocaleCurrencyDP { 2 }
+ \renewcommand \dtlcurrfmtsymsep { \l_datatool_GI_sym_sep_tl }
+ }
+ }
+\tl_new:N \l__datatool_GI_datevariant_tl
+\tl_set:Nn \l__datatool_GI_datevariant_tl { slash }
+\tl_new:N \l__datatool_GI_datestyle_tl
+\tl_set:Nn \l__datatool_GI_datestyle_tl { ddmmyyyy }
+\tl_new:N \l__datatool_GI_timevariant_tl
+\tl_set:Nn \l__datatool_GI_timevariant_tl { colon }
+\cs_new:Nn \datatool_GI_parse_timestamp:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_GI_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_GI_datevariant_tl
+ _
+ \l__datatool_GI_datestyle_tl
+ _date_regex
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_GI_timevariant_tl
+ _hhmmss_time_regex
+ }
+ {
+ \use:c
+ {
+ datatool_
+ \l__datatool_GI_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_GI_datevariant_tl
+ _
+ \l__datatool_GI_datestyle_tl
+ _date_regex
+ }
+ {
+ c_datatool_
+ \l__datatool_GI_timevariant_tl
+ _hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_GI_timevariant_tl
+ { datatool-GI }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_GI_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_GI_timevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_GI_datevariant_tl
+ { datatool-GI }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_GI_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_GI_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_GI_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-GI }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_GI_datestyle_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_GI_parse_date:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_GI_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_GI_datevariant_tl
+ _anchored_
+ \l__datatool_GI_datestyle_tl
+ _date_regex
+ }
+ {
+ \exp_args:cc
+ {
+ datatool_
+ \l__datatool_GI_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_GI_datevariant_tl
+ _anchored_
+ \l__datatool_GI_datestyle_tl
+ _date_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_GI_datevariant_tl
+ { datatool-GI }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_GI_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_GI_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_GI_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-GI }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_GI_datestyle_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_GI_parse_time:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_GI_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ {
+ \datatool_hhmmss_parse_time:cNnTF
+ {
+ c_datatool_
+ \l__datatool_GI_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_GI_timevariant_tl
+ { datatool-GI }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_GI_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_GI_timevariant_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_GI_get_timezone_map:n
+ {
+ \datatool_region_get_timezone_map:n { GI / #1 }
+ }
+\datatool_region_set_timezone_map:nn { GI / CEST } { +02:00 }
+\datatool_region_set_timezone_map:nn { GI / BST } { +01:00 }
+\datatool_region_set_timezone_map:nn { GI / CET } { +01:00 }
+\datatool_region_set_timezone_map:nn { GI / GMT } { +00:00 }
+\datatool_locale_define_keys:nn { GI }
+ {
+ number-style .choices:nn =
+ { official, unofficial }
+ {
+ \exp_args:NNe \renewcommand
+ \datatoolGISetNumberChars
+ {
+ \exp_not:N \bool_if:NT
+ \exp_not:N \l_datatool_region_set_numberchars_bool
+ {
+ \exp_not:c { datatool_GI_set_numberchars_ \l_keys_choice_tl : }
+ }
+ }
+ \tl_if_eq:NnT \l_datatool_current_region_tl { GI }
+ {
+ \datatoolGISetNumberChars
+ }
+ } ,
+ currency-symbol-position .choice: ,
+ currency-symbol-position / before .code:n =
+ {
+ \cs_set_eq:NN \datatool_GI_currency_position:nn \dtlcurrprefixfmt
+ } ,
+ currency-symbol-position / after .code:n =
+ {
+ \cs_set_eq:NN \datatool_GI_currency_position:nn \dtlcurrsuffixfmt
+ } ,
+ currency-symbol-prefix .choice: ,
+ currency-symbol-prefix / false .code:n =
+ {
+ \cs_set_eq:NN \datatoolGIsymbolprefix \use_none:n
+ } ,
+ currency-symbol-prefix / true .code:n =
+ {
+ \cs_set_eq:NN
+ \datatoolGIsymbolprefix
+ \datatool_currency_symbol_region_prefix:n
+ } ,
+ currency-symbol-prefix .default:n = { true } ,
+ currency-symbol-sep .choice: ,
+ currency-symbol-sep / none .code:n =
+ {
+ \tl_clear:N \l_datatool_GI_sym_sep_tl
+ } ,
+ currency-symbol-sep / thin-space .code:n =
+ {
+ \tl_set:Nn \l_datatool_GI_sym_sep_tl { \, }
+ } ,
+ currency-symbol-sep / space .code:n =
+ {
+ \tl_set:Nn \l_datatool_GI_sym_sep_tl { ~ }
+ } ,
+ currency-symbol-sep / nbsp .code:n =
+ {
+ \tl_set:Nn \l_datatool_GI_sym_sep_tl { \nobreakspace }
+ } ,
+ currency-symbol-sep . initial:n = { none } ,
+ date-style .choice: ,
+ date-style / dmyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_GI_datestyle_tl { ddmmyyyy }
+ } ,
+ date-style / mdyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_GI_datestyle_tl { mmddyyyy }
+ } ,
+ date-style / yyyymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_GI_datestyle_tl { yyyymmdd }
+ } ,
+ date-style / dmyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_GI_datestyle_tl { ddmmyy }
+ } ,
+ date-style / mdyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_GI_datestyle_tl { mmddyy }
+ } ,
+ date-style / yymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_GI_datestyle_tl { yymmdd }
+ } ,
+ date-variant .choice: ,
+ date-variant / slash .code:n =
+ {
+ \tl_set:Nn \l__datatool_GI_datevariant_tl { slash }
+ } ,
+ date-variant / hyphen .code:n =
+ {
+ \tl_set:Nn \l__datatool_GI_datevariant_tl { hyphen }
+ } ,
+ date-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_GI_datevariant_tl { dot }
+ } ,
+ date-variant / dialect .code:n =
+ {
+ \tl_set:Nn \l__datatool_GI_datevariant_tl
+ { \l_datatool_current_language_tl }
+ } ,
+ time-variant .choice: ,
+ time-variant / colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_GI_timevariant_tl { colon }
+ } ,
+ time-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_GI_timevariant_tl { dot }
+ } ,
+ time-variant / dialect .code:n =
+ {
+ \tl_if_eq:NnTF \l__datatool_GI_timevariant_tl { dot }
+ {
+ \tl_set:Nn \l__datatool_GI_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ }
+ {
+ \tl_if_in:NnF
+ \l__datatool_GI_timevariant_tl
+ { \l_datatool_current_language_tl }
+ {
+ \tl_set:Nn \l__datatool_GI_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ }
+ }
+ } ,
+ time-variant / dialect-colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_GI_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ } ,
+ time-variant / dialect-dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_GI_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ } ,
+ }
+\newcommand \datatoolGISetTemporalParsers
+ {
+ \renewcommand \DTLCurrentLocaleParseTimeStamp
+ { \datatool_GI_parse_timestamp:NnTF }
+ \renewcommand \DTLCurrentLocaleParseDate
+ { \datatool_GI_parse_date:NnTF }
+ \renewcommand \DTLCurrentLocaleParseTime
+ { \datatool_GI_parse_time:NnTF }
+ \let
+ \DTLCurrentLocaleGetTimeZoneMap
+ \datatool_GI_get_timezone_map:n
+ }
+\newcommand \datatoolGISetTemporalFormatters
+ {
+ \let
+ \DTLCurrentLocaleFormatDate
+ \datatool_default_date_fmt:nnnn
+ \let
+ \DTLCurrentLocaleFormatTime
+ \datatool_default_time_fmt:nnn
+ \let
+ \DTLCurrentLocaleFormatTimeZone
+ \datatool_default_timezone_fmt:nn
+ \let
+ \DTLCurrentLocaleFormatTimeStampNoZone
+ \datatool_default_timestamp_fmt:nnnnnnn
+ \let
+ \DTLCurrentLocaleFormatTimeStampWithZone
+ \datatool_default_timestamp_fmt:nnnnnnnnn
+ \renewcommand \DTLCurrentLocaleTimeStampFmtSep { ~ }
+ }
+\newcommand \DTLGILocaleHook
+ {
+ \datatoolGISetNumberChars
+ \datatoolGISetCurrency
+ \datatoolGISetTemporalParsers
+ \datatoolGISetTemporalFormatters
+ \tl_set:Nn \l_datatool_current_region_tl { GI }
+ }
+\ExplSyntaxOff
+\endinput
+%%
+%% End of file `datatool-GI.ldf'.
Property changes on: trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-GI.ldf
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-IE.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-IE.ldf (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-IE.ldf 2025-03-02 21:37:12 UTC (rev 74393)
@@ -0,0 +1,435 @@
+%%
+%% This is file `datatool-IE.ldf',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% datatool-regions.dtx (with options: `datatool-IE.ldf,package')
+%%
+%% datatool-regions.dtx
+%% Copyright 2025 Nicola Talbot
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Nicola Talbot.
+%%
+%% This work consists of the files datatool-regions.dtx and datatool-regions.ins and the derived files datatool-AU.ldf, datatool-BE.ldf, datatool-CA.ldf, datatool-FK.ldf, datatool-GB.ldf, datatool-GG.ldf, datatool-GI.ldf, datatool-IE.ldf, datatool-IM.ldf, datatool-JE.ldf, datatool-NZ.ldf, datatool-US.ldf, datatool-ZA.ldf.
+%%
+%% \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 \~}
+\TrackLangProvidesResource{IE}[2025/03/01 v1.0]
+\ExplSyntaxOn
+\cs_new:Nn \datatool_IE_set_numberchars_official:
+ {
+ \datatool_set_numberchars:nn { , } { . }
+ }
+\cs_new:Nn \datatool_IE_set_numberchars_unofficial:
+ {
+ \datatool_set_thinspace_group_decimal_char:n { . }
+ }
+\newcommand \datatoolIESetNumberChars
+ {
+ \bool_if:NT \l_datatool_region_set_numberchars_bool
+ {
+ \datatool_IE_set_numberchars_official:
+ }
+ }
+\datatool_register_regional_currency_code:nn { IE } { EUR }
+\cs_new:Nn \datatool_IE_currency_position:nn
+ {
+ \dtlcurrprefixfmt { #1 } { #2 }
+ }
+\tl_new:N \l_datatool_IE_sym_sep_tl
+\newcommand \datatoolIESetCurrency
+ {
+ \bool_if:NT \l_datatool_region_set_currency_bool
+ {
+ \DTLsetdefaultcurrency { EUR }
+ \renewcommand \DTLCurrentLocaleCurrencyDP { 2 }
+ \renewcommand \DTLdefaultEURcurrencyfmt
+ { \datatool_IE_currency_position:nn }
+ \renewcommand \dtlcurrfmtsymsep { \l_datatool_IE_sym_sep_tl }
+ }
+ }
+\tl_new:N \l__datatool_IE_datevariant_tl
+\tl_set:Nn \l__datatool_IE_datevariant_tl { slash }
+\tl_new:N \l__datatool_IE_datestyle_tl
+\tl_set:Nn \l__datatool_IE_datestyle_tl { ddmmyyyy }
+\tl_new:N \l__datatool_IE_timevariant_tl
+\tl_set:Nn \l__datatool_IE_timevariant_tl { colon }
+\cs_new:Nn \datatool_IE_parse_timestamp:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_IE_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_IE_datevariant_tl
+ _
+ \l__datatool_IE_datestyle_tl
+ _date_regex
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_IE_timevariant_tl
+ _hhmmss_time_regex
+ }
+ {
+ \use:c
+ {
+ datatool_
+ \l__datatool_IE_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_IE_datevariant_tl
+ _
+ \l__datatool_IE_datestyle_tl
+ _date_regex
+ }
+ {
+ c_datatool_
+ \l__datatool_IE_timevariant_tl
+ _hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_IE_timevariant_tl
+ { datatool-IE }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_IE_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_IE_timevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_IE_datevariant_tl
+ { datatool-IE }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_IE_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_IE_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_IE_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-IE }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_IE_datestyle_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_IE_parse_date:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_IE_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_IE_datevariant_tl
+ _anchored_
+ \l__datatool_IE_datestyle_tl
+ _date_regex
+ }
+ {
+ \exp_args:cc
+ {
+ datatool_
+ \l__datatool_IE_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_IE_datevariant_tl
+ _anchored_
+ \l__datatool_IE_datestyle_tl
+ _date_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_IE_datevariant_tl
+ { datatool-IE }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_IE_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_IE_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_IE_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-IE }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_IE_datestyle_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_IE_parse_time:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_IE_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ {
+ \datatool_hhmmss_parse_time:cNnTF
+ {
+ c_datatool_
+ \l__datatool_IE_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_IE_timevariant_tl
+ { datatool-IE }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_IE_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_IE_timevariant_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_IE_get_timezone_map:n
+ {
+ \datatool_region_get_timezone_map:n { IE / #1 }
+ }
+\datatool_region_set_timezone_map:nn { IE / IST } { +01:00 }
+\datatool_region_set_timezone_map:nn { IE / GMT } { +00:00 }
+\datatool_region_set_timezone_map:nn { IE / CEST } { +02:00 }
+\datatool_region_set_timezone_map:nn { IE / CET } { +01:00 }
+\datatool_locale_define_keys:nn { IE }
+ {
+ number-style .choices:nn =
+ { official, unofficial }
+ {
+ \exp_args:NNe \renewcommand
+ \datatoolIESetNumberChars
+ {
+ \exp_not:N \bool_if:NT
+ \exp_not:N \l_datatool_region_set_numberchars_bool
+ {
+ \exp_not:c { datatool_IE_set_numberchars_ \l_keys_choice_tl : }
+ }
+ }
+ \tl_if_eq:NnT \l_datatool_current_region_tl { IE }
+ {
+ \datatoolIESetNumberChars
+ }
+ } ,
+ currency-symbol-position .choice: ,
+ currency-symbol-position / before .code:n =
+ {
+ \cs_set_eq:NN \datatool_IE_currency_position:nn \dtlcurrprefixfmt
+ } ,
+ currency-symbol-position / after .code:n =
+ {
+ \cs_set_eq:NN \datatool_IE_currency_position:nn \dtlcurrsuffixfmt
+ } ,
+ currency-symbol-sep .choice: ,
+ currency-symbol-sep / none .code:n =
+ {
+ \tl_clear:N \l_datatool_IE_sym_sep_tl
+ } ,
+ currency-symbol-sep / thin-space .code:n =
+ {
+ \tl_set:Nn \l_datatool_IE_sym_sep_tl { \, }
+ } ,
+ currency-symbol-sep / space .code:n =
+ {
+ \tl_set:Nn \l_datatool_IE_sym_sep_tl { ~ }
+ } ,
+ currency-symbol-sep / nbsp .code:n =
+ {
+ \tl_set:Nn \l_datatool_IE_sym_sep_tl { \nobreakspace }
+ } ,
+ currency-symbol-sep .initial:n = { none } ,
+ date-style .choice: ,
+ date-style / dmyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_IE_datestyle_tl { ddmmyyyy }
+ } ,
+ date-style / mdyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_IE_datestyle_tl { mmddyyyy }
+ } ,
+ date-style / yyyymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_IE_datestyle_tl { yyyymmdd }
+ } ,
+ date-style / dmyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_IE_datestyle_tl { ddmmyy }
+ } ,
+ date-style / mdyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_IE_datestyle_tl { mmddyy }
+ } ,
+ date-style / yymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_IE_datestyle_tl { yymmdd }
+ } ,
+ date-variant .choice: ,
+ date-variant / slash .code:n =
+ {
+ \tl_set:Nn \l__datatool_IE_datevariant_tl { slash }
+ } ,
+ date-variant / hyphen .code:n =
+ {
+ \tl_set:Nn \l__datatool_IE_datevariant_tl { hyphen }
+ } ,
+ date-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_IE_datevariant_tl { dot }
+ } ,
+ date-variant / dialect .code:n =
+ {
+ \tl_set:Nn \l__datatool_IE_datevariant_tl
+ { \l_datatool_current_language_tl }
+ } ,
+ time-variant .choice: ,
+ time-variant / colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_IE_timevariant_tl { colon }
+ } ,
+ time-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_IE_timevariant_tl { dot }
+ } ,
+ time-variant / dialect .code:n =
+ {
+ \tl_if_eq:NnTF \l__datatool_IE_timevariant_tl { dot }
+ {
+ \tl_set:Nn \l__datatool_IE_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ }
+ {
+ \tl_if_in:NnF
+ \l__datatool_IE_timevariant_tl
+ { \l_datatool_current_language_tl }
+ {
+ \tl_set:Nn \l__datatool_IE_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ }
+ }
+ } ,
+ time-variant / dialect-colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_IE_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ } ,
+ time-variant / dialect-dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_IE_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ } ,
+ }
+\newcommand \datatoolIESetTemporalParsers
+ {
+ \renewcommand \DTLCurrentLocaleParseTimeStamp
+ { \datatool_IE_parse_timestamp:NnTF }
+ \renewcommand \DTLCurrentLocaleParseDate
+ { \datatool_IE_parse_date:NnTF }
+ \renewcommand \DTLCurrentLocaleParseTime
+ { \datatool_IE_parse_time:NnTF }
+ \let
+ \DTLCurrentLocaleGetTimeZoneMap
+ \datatool_IE_get_timezone_map:n
+ }
+\newcommand \datatoolIESetTemporalFormatters
+ {
+ \let
+ \DTLCurrentLocaleFormatDate
+ \datatool_default_date_fmt:nnnn
+ \let
+ \DTLCurrentLocaleFormatTime
+ \datatool_default_time_fmt:nnn
+ \let
+ \DTLCurrentLocaleFormatTimeZone
+ \datatool_default_timezone_fmt:nn
+ \let
+ \DTLCurrentLocaleFormatTimeStampNoZone
+ \datatool_default_timestamp_fmt:nnnnnnn
+ \let
+ \DTLCurrentLocaleFormatTimeStampWithZone
+ \datatool_default_timestamp_fmt:nnnnnnnnn
+ \renewcommand \DTLCurrentLocaleTimeStampFmtSep { ~ }
+ }
+
+\newcommand \DTLIELocaleHook
+ {
+ \datatoolIESetNumberChars
+ \datatoolIESetCurrency
+ \datatoolIESetTemporalParsers
+ \datatoolIESetTemporalFormatters
+ \tl_set:Nn \l_datatool_current_region_tl { IE }
+ }
+\ExplSyntaxOff
+\endinput
+%%
+%% End of file `datatool-IE.ldf'.
Property changes on: trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-IE.ldf
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-IM.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-IM.ldf (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-IM.ldf 2025-03-02 21:37:12 UTC (rev 74393)
@@ -0,0 +1,459 @@
+%%
+%% This is file `datatool-IM.ldf',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% datatool-regions.dtx (with options: `datatool-IM.ldf,package')
+%%
+%% datatool-regions.dtx
+%% Copyright 2025 Nicola Talbot
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Nicola Talbot.
+%%
+%% This work consists of the files datatool-regions.dtx and datatool-regions.ins and the derived files datatool-AU.ldf, datatool-BE.ldf, datatool-CA.ldf, datatool-FK.ldf, datatool-GB.ldf, datatool-GG.ldf, datatool-GI.ldf, datatool-IE.ldf, datatool-IM.ldf, datatool-JE.ldf, datatool-NZ.ldf, datatool-US.ldf, datatool-ZA.ldf.
+%%
+%% \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 \~}
+\TrackLangProvidesResource{IM}[2025/03/01 v1.0]
+\ExplSyntaxOn
+\cs_new:Nn \datatool_IM_set_numberchars_official:
+ {
+ \datatool_set_numberchars:nn { , } { . }
+ }
+\cs_new:Nn \datatool_IM_set_numberchars_unofficial:
+ {
+ \datatool_set_thinspace_group_decimal_char:n { . }
+ }
+\newcommand \datatoolIMSetNumberChars
+ {
+ \bool_if:NT \l_datatool_region_set_numberchars_bool
+ {
+ \datatool_IM_set_numberchars_official:
+ }
+ }
+\cs_new:Nn \datatool_IM_currency_position:nn
+ {
+ \dtlcurrprefixfmt { #1 } { #2 }
+ }
+\tl_new:N \l_datatool_IM_sym_sep_tl
+\newcommand \datatoolIMcurrencyfmt [ 2 ]
+ {
+ \datatool_IM_currency_position:nn
+ {
+ \datatoolIMsymbolprefix { IM }
+ #1
+ }
+ { #2 }
+ }
+\newcommand \datatoolIMsymbolprefix [ 1 ] { }
+\datatool_def_currency:nnnV
+ { \datatoolIMcurrencyfmt }
+ { IMP }
+ { \pounds }
+ \l_datatool_pound_tl
+\datatool_register_regional_currency_code:nn { IM } { IMP }
+\newcommand \datatoolIMSetCurrency
+ {
+ \bool_if:NT \l_datatool_region_set_currency_bool
+ {
+ \DTLsetdefaultcurrency { IMP }
+ \renewcommand \DTLCurrentLocaleCurrencyDP { 2 }
+ \renewcommand \dtlcurrfmtsymsep { \l_datatool_IM_sym_sep_tl }
+ }
+ }
+\tl_new:N \l__datatool_IM_datevariant_tl
+\tl_set:Nn \l__datatool_IM_datevariant_tl { slash }
+\tl_new:N \l__datatool_IM_datestyle_tl
+\tl_set:Nn \l__datatool_IM_datestyle_tl { ddmmyyyy }
+\tl_new:N \l__datatool_IM_timevariant_tl
+\tl_set:Nn \l__datatool_IM_timevariant_tl { colon }
+\cs_new:Nn \datatool_IM_parse_timestamp:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_IM_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_IM_datevariant_tl
+ _
+ \l__datatool_IM_datestyle_tl
+ _date_regex
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_IM_timevariant_tl
+ _hhmmss_time_regex
+ }
+ {
+ \use:c
+ {
+ datatool_
+ \l__datatool_IM_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_IM_datevariant_tl
+ _
+ \l__datatool_IM_datestyle_tl
+ _date_regex
+ }
+ {
+ c_datatool_
+ \l__datatool_IM_timevariant_tl
+ _hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_IM_timevariant_tl
+ { datatool-IM }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_IM_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_IM_timevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_IM_datevariant_tl
+ { datatool-IM }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_IM_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_IM_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_IM_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-IM }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_IM_datestyle_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_IM_parse_date:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_IM_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_IM_datevariant_tl
+ _anchored_
+ \l__datatool_IM_datestyle_tl
+ _date_regex
+ }
+ {
+ \exp_args:cc
+ {
+ datatool_
+ \l__datatool_IM_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_IM_datevariant_tl
+ _anchored_
+ \l__datatool_IM_datestyle_tl
+ _date_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_IM_datevariant_tl
+ { datatool-IM }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_IM_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_IM_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_IM_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-IM }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_IM_datestyle_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_IM_parse_time:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_IM_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ {
+ \datatool_hhmmss_parse_time:cNnTF
+ {
+ c_datatool_
+ \l__datatool_IM_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_IM_timevariant_tl
+ { datatool-IM }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_IM_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_IM_timevariant_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_IM_get_timezone_map:n
+ {
+ \datatool_region_get_timezone_map:n { IM / #1 }
+ }
+\datatool_region_set_timezone_map:nn { IM / CET } { +01:00 }
+\datatool_region_set_timezone_map:nn { IM / GMT } { +00:00 }
+\datatool_region_set_timezone_map:nn { IM / BST } { +01:00 }
+\datatool_region_set_timezone_map:nn { IM / CEST } { +02:00 }
+\datatool_locale_define_keys:nn { IM }
+ {
+ number-style .choices:nn =
+ { official, unofficial }
+ {
+ \exp_args:NNe \renewcommand
+ \datatoolIMSetNumberChars
+ {
+ \exp_not:N \bool_if:NT
+ \exp_not:N \l_datatool_region_set_numberchars_bool
+ {
+ \exp_not:c { datatool_IM_set_numberchars_ \l_keys_choice_tl : }
+ }
+ }
+ \tl_if_eq:NnT \l_datatool_current_region_tl { IM }
+ {
+ \datatoolIMSetNumberChars
+ }
+ } ,
+ currency-symbol-position .choice: ,
+ currency-symbol-position / before .code:n =
+ {
+ \cs_set_eq:NN \datatool_IM_currency_position:nn \dtlcurrprefixfmt
+ } ,
+ currency-symbol-position / after .code:n =
+ {
+ \cs_set_eq:NN \datatool_IM_currency_position:nn \dtlcurrsuffixfmt
+ } ,
+ currency-symbol-prefix .choice: ,
+ currency-symbol-prefix / false .code:n =
+ {
+ \cs_set_eq:NN \datatoolIMsymbolprefix \use_none:n
+ } ,
+ currency-symbol-prefix / true .code:n =
+ {
+ \cs_set_eq:NN
+ \datatoolIMsymbolprefix
+ \datatool_currency_symbol_region_prefix:n
+ } ,
+ currency-symbol-prefix .default:n = { true } ,
+ currency-symbol-sep .choice: ,
+ currency-symbol-sep / none .code:n =
+ {
+ \tl_clear:N \l_datatool_IM_sym_sep_tl
+ } ,
+ currency-symbol-sep / thin-space .code:n =
+ {
+ \tl_set:Nn \l_datatool_IM_sym_sep_tl { \, }
+ } ,
+ currency-symbol-sep / space .code:n =
+ {
+ \tl_set:Nn \l_datatool_IM_sym_sep_tl { ~ }
+ } ,
+ currency-symbol-sep / nbsp .code:n =
+ {
+ \tl_set:Nn \l_datatool_IM_sym_sep_tl { \nobreakspace }
+ } ,
+ currency-symbol-sep . initial:n = { none } ,
+ date-style .choice: ,
+ date-style / dmyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_IM_datestyle_tl { ddmmyyyy }
+ } ,
+ date-style / mdyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_IM_datestyle_tl { mmddyyyy }
+ } ,
+ date-style / yyyymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_IM_datestyle_tl { yyyymmdd }
+ } ,
+ date-style / dmyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_IM_datestyle_tl { ddmmyy }
+ } ,
+ date-style / mdyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_IM_datestyle_tl { mmddyy }
+ } ,
+ date-style / yymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_IM_datestyle_tl { yymmdd }
+ } ,
+ date-variant .choice: ,
+ date-variant / slash .code:n =
+ {
+ \tl_set:Nn \l__datatool_IM_datevariant_tl { slash }
+ } ,
+ date-variant / hyphen .code:n =
+ {
+ \tl_set:Nn \l__datatool_IM_datevariant_tl { hyphen }
+ } ,
+ date-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_IM_datevariant_tl { dot }
+ } ,
+ date-variant / dialect .code:n =
+ {
+ \tl_set:Nn \l__datatool_IM_datevariant_tl
+ { \l_datatool_current_language_tl }
+ } ,
+ time-variant .choice: ,
+ time-variant / colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_IM_timevariant_tl { colon }
+ } ,
+ time-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_IM_timevariant_tl { dot }
+ } ,
+ time-variant / dialect .code:n =
+ {
+ \tl_if_eq:NnTF \l__datatool_IM_timevariant_tl { dot }
+ {
+ \tl_set:Nn \l__datatool_IM_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ }
+ {
+ \tl_if_in:NnF
+ \l__datatool_IM_timevariant_tl
+ { \l_datatool_current_language_tl }
+ {
+ \tl_set:Nn \l__datatool_IM_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ }
+ }
+ } ,
+ time-variant / dialect-colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_IM_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ } ,
+ time-variant / dialect-dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_IM_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ } ,
+ }
+\newcommand \datatoolIMSetTemporalParsers
+ {
+ \renewcommand \DTLCurrentLocaleParseTimeStamp
+ { \datatool_IM_parse_timestamp:NnTF }
+ \renewcommand \DTLCurrentLocaleParseDate
+ { \datatool_IM_parse_date:NnTF }
+ \renewcommand \DTLCurrentLocaleParseTime
+ { \datatool_IM_parse_time:NnTF }
+ \let
+ \DTLCurrentLocaleGetTimeZoneMap
+ \datatool_IM_get_timezone_map:n
+ }
+\newcommand \datatoolIMSetTemporalFormatters
+ {
+ \let
+ \DTLCurrentLocaleFormatDate
+ \datatool_default_date_fmt:nnnn
+ \let
+ \DTLCurrentLocaleFormatTime
+ \datatool_default_time_fmt:nnn
+ \let
+ \DTLCurrentLocaleFormatTimeZone
+ \datatool_default_timezone_fmt:nn
+ \let
+ \DTLCurrentLocaleFormatTimeStampNoZone
+ \datatool_default_timestamp_fmt:nnnnnnn
+ \let
+ \DTLCurrentLocaleFormatTimeStampWithZone
+ \datatool_default_timestamp_fmt:nnnnnnnnn
+ \renewcommand \DTLCurrentLocaleTimeStampFmtSep { ~ }
+ }
+\newcommand \DTLIMLocaleHook
+ {
+ \datatoolIMSetNumberChars
+ \datatoolIMSetCurrency
+ \datatoolIMSetTemporalParsers
+ \datatoolIMSetTemporalFormatters
+ \tl_set:Nn \l_datatool_current_region_tl { IM }
+ }
+\ExplSyntaxOff
+\endinput
+%%
+%% End of file `datatool-IM.ldf'.
Property changes on: trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-IM.ldf
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-JE.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-JE.ldf (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-JE.ldf 2025-03-02 21:37:12 UTC (rev 74393)
@@ -0,0 +1,459 @@
+%%
+%% This is file `datatool-JE.ldf',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% datatool-regions.dtx (with options: `datatool-JE.ldf,package')
+%%
+%% datatool-regions.dtx
+%% Copyright 2025 Nicola Talbot
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Nicola Talbot.
+%%
+%% This work consists of the files datatool-regions.dtx and datatool-regions.ins and the derived files datatool-AU.ldf, datatool-BE.ldf, datatool-CA.ldf, datatool-FK.ldf, datatool-GB.ldf, datatool-GG.ldf, datatool-GI.ldf, datatool-IE.ldf, datatool-IM.ldf, datatool-JE.ldf, datatool-NZ.ldf, datatool-US.ldf, datatool-ZA.ldf.
+%%
+%% \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 \~}
+\TrackLangProvidesResource{JE}[2025/03/01 v1.0]
+\ExplSyntaxOn
+\cs_new:Nn \datatool_JE_set_numberchars_official:
+ {
+ \datatool_set_numberchars:nn { , } { . }
+ }
+\cs_new:Nn \datatool_JE_set_numberchars_unofficial:
+ {
+ \datatool_set_thinspace_group_decimal_char:n { . }
+ }
+\newcommand \datatoolJESetNumberChars
+ {
+ \bool_if:NT \l_datatool_region_set_numberchars_bool
+ {
+ \datatool_JE_set_numberchars_official:
+ }
+ }
+\cs_new:Nn \datatool_JE_currency_position:nn
+ {
+ \dtlcurrprefixfmt { #1 } { #2 }
+ }
+\tl_new:N \l_datatool_JE_sym_sep_tl
+\newcommand \datatoolJEcurrencyfmt [ 2 ]
+ {
+ \datatool_JE_currency_position:nn
+ {
+ \datatoolJEsymbolprefix { JE }
+ #1
+ }
+ { #2 }
+ }
+\newcommand \datatoolJEsymbolprefix [ 1 ] { }
+\datatool_def_currency:nnnV
+ { \datatoolJEcurrencyfmt }
+ { JEP }
+ { \pounds }
+ \l_datatool_pound_tl
+\datatool_register_regional_currency_code:nn { JE } { JEP }
+\newcommand \datatoolJESetCurrency
+ {
+ \bool_if:NT \l_datatool_region_set_currency_bool
+ {
+ \DTLsetdefaultcurrency { JEP }
+ \renewcommand \DTLCurrentLocaleCurrencyDP { 2 }
+ \renewcommand \dtlcurrfmtsymsep { \l_datatool_JE_sym_sep_tl }
+ }
+ }
+\tl_new:N \l__datatool_JE_datevariant_tl
+\tl_set:Nn \l__datatool_JE_datevariant_tl { slash }
+\tl_new:N \l__datatool_JE_datestyle_tl
+\tl_set:Nn \l__datatool_JE_datestyle_tl { ddmmyyyy }
+\tl_new:N \l__datatool_JE_timevariant_tl
+\tl_set:Nn \l__datatool_JE_timevariant_tl { colon }
+\cs_new:Nn \datatool_JE_parse_timestamp:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_JE_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_JE_datevariant_tl
+ _
+ \l__datatool_JE_datestyle_tl
+ _date_regex
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_JE_timevariant_tl
+ _hhmmss_time_regex
+ }
+ {
+ \use:c
+ {
+ datatool_
+ \l__datatool_JE_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_JE_datevariant_tl
+ _
+ \l__datatool_JE_datestyle_tl
+ _date_regex
+ }
+ {
+ c_datatool_
+ \l__datatool_JE_timevariant_tl
+ _hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_JE_timevariant_tl
+ { datatool-JE }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_JE_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_JE_timevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_JE_datevariant_tl
+ { datatool-JE }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_JE_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_JE_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_JE_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-JE }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_JE_datestyle_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_JE_parse_date:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_JE_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_JE_datevariant_tl
+ _anchored_
+ \l__datatool_JE_datestyle_tl
+ _date_regex
+ }
+ {
+ \exp_args:cc
+ {
+ datatool_
+ \l__datatool_JE_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_JE_datevariant_tl
+ _anchored_
+ \l__datatool_JE_datestyle_tl
+ _date_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_JE_datevariant_tl
+ { datatool-JE }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_JE_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_JE_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_JE_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-JE }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_JE_datestyle_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_JE_parse_time:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_JE_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ {
+ \datatool_hhmmss_parse_time:cNnTF
+ {
+ c_datatool_
+ \l__datatool_JE_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_JE_timevariant_tl
+ { datatool-JE }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_JE_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_JE_timevariant_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_JE_get_timezone_map:n
+ {
+ \datatool_region_get_timezone_map:n { JE / #1 }
+ }
+\datatool_region_set_timezone_map:nn { JE / CEST } { +02:00 }
+\datatool_region_set_timezone_map:nn { JE / GMT } { +00:00 }
+\datatool_region_set_timezone_map:nn { JE / CET } { +01:00 }
+\datatool_region_set_timezone_map:nn { JE / BST } { +01:00 }
+\datatool_locale_define_keys:nn { JE }
+ {
+ number-style .choices:nn =
+ { official, unofficial }
+ {
+ \exp_args:NNe \renewcommand
+ \datatoolJESetNumberChars
+ {
+ \exp_not:N \bool_if:NT
+ \exp_not:N \l_datatool_region_set_numberchars_bool
+ {
+ \exp_not:c { datatool_JE_set_numberchars_ \l_keys_choice_tl : }
+ }
+ }
+ \tl_if_eq:NnT \l_datatool_current_region_tl { JE }
+ {
+ \datatoolJESetNumberChars
+ }
+ } ,
+ currency-symbol-position .choice: ,
+ currency-symbol-position / before .code:n =
+ {
+ \cs_set_eq:NN \datatool_JE_currency_position:nn \dtlcurrprefixfmt
+ } ,
+ currency-symbol-position / after .code:n =
+ {
+ \cs_set_eq:NN \datatool_JE_currency_position:nn \dtlcurrsuffixfmt
+ } ,
+ currency-symbol-prefix .choice: ,
+ currency-symbol-prefix / false .code:n =
+ {
+ \cs_set_eq:NN \datatoolJEsymbolprefix \use_none:n
+ } ,
+ currency-symbol-prefix / true .code:n =
+ {
+ \cs_set_eq:NN
+ \datatoolJEsymbolprefix
+ \datatool_currency_symbol_region_prefix:n
+ } ,
+ currency-symbol-prefix .default:n = { true } ,
+ currency-symbol-sep .choice: ,
+ currency-symbol-sep / none .code:n =
+ {
+ \tl_clear:N \l_datatool_JE_sym_sep_tl
+ } ,
+ currency-symbol-sep / thin-space .code:n =
+ {
+ \tl_set:Nn \l_datatool_JE_sym_sep_tl { \, }
+ } ,
+ currency-symbol-sep / space .code:n =
+ {
+ \tl_set:Nn \l_datatool_JE_sym_sep_tl { ~ }
+ } ,
+ currency-symbol-sep / nbsp .code:n =
+ {
+ \tl_set:Nn \l_datatool_JE_sym_sep_tl { \nobreakspace }
+ } ,
+ currency-symbol-sep . initial:n = { none } ,
+ date-style .choice: ,
+ date-style / dmyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_JE_datestyle_tl { ddmmyyyy }
+ } ,
+ date-style / mdyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_JE_datestyle_tl { mmddyyyy }
+ } ,
+ date-style / yyyymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_JE_datestyle_tl { yyyymmdd }
+ } ,
+ date-style / dmyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_JE_datestyle_tl { ddmmyy }
+ } ,
+ date-style / mdyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_JE_datestyle_tl { mmddyy }
+ } ,
+ date-style / yymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_JE_datestyle_tl { yymmdd }
+ } ,
+ date-variant .choice: ,
+ date-variant / slash .code:n =
+ {
+ \tl_set:Nn \l__datatool_JE_datevariant_tl { slash }
+ } ,
+ date-variant / hyphen .code:n =
+ {
+ \tl_set:Nn \l__datatool_JE_datevariant_tl { hyphen }
+ } ,
+ date-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_JE_datevariant_tl { dot }
+ } ,
+ date-variant / dialect .code:n =
+ {
+ \tl_set:Nn \l__datatool_JE_datevariant_tl
+ { \l_datatool_current_language_tl }
+ } ,
+ time-variant .choice: ,
+ time-variant / colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_JE_timevariant_tl { colon }
+ } ,
+ time-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_JE_timevariant_tl { dot }
+ } ,
+ time-variant / dialect .code:n =
+ {
+ \tl_if_eq:NnTF \l__datatool_JE_timevariant_tl { dot }
+ {
+ \tl_set:Nn \l__datatool_JE_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ }
+ {
+ \tl_if_in:NnF
+ \l__datatool_JE_timevariant_tl
+ { \l_datatool_current_language_tl }
+ {
+ \tl_set:Nn \l__datatool_JE_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ }
+ }
+ } ,
+ time-variant / dialect-colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_JE_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ } ,
+ time-variant / dialect-dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_JE_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ } ,
+ }
+\newcommand \datatoolJESetTemporalParsers
+ {
+ \renewcommand \DTLCurrentLocaleParseTimeStamp
+ { \datatool_JE_parse_timestamp:NnTF }
+ \renewcommand \DTLCurrentLocaleParseDate
+ { \datatool_JE_parse_date:NnTF }
+ \renewcommand \DTLCurrentLocaleParseTime
+ { \datatool_JE_parse_time:NnTF }
+ \let
+ \DTLCurrentLocaleGetTimeZoneMap
+ \datatool_JE_get_timezone_map:n
+ }
+\newcommand \datatoolJESetTemporalFormatters
+ {
+ \let
+ \DTLCurrentLocaleFormatDate
+ \datatool_default_date_fmt:nnnn
+ \let
+ \DTLCurrentLocaleFormatTime
+ \datatool_default_time_fmt:nnn
+ \let
+ \DTLCurrentLocaleFormatTimeZone
+ \datatool_default_timezone_fmt:nn
+ \let
+ \DTLCurrentLocaleFormatTimeStampNoZone
+ \datatool_default_timestamp_fmt:nnnnnnn
+ \let
+ \DTLCurrentLocaleFormatTimeStampWithZone
+ \datatool_default_timestamp_fmt:nnnnnnnnn
+ \renewcommand \DTLCurrentLocaleTimeStampFmtSep { ~ }
+ }
+\newcommand \DTLJELocaleHook
+ {
+ \datatoolJESetNumberChars
+ \datatoolJESetCurrency
+ \datatoolJESetTemporalParsers
+ \datatoolJESetTemporalFormatters
+ \tl_set:Nn \l_datatool_current_region_tl { JE }
+ }
+\ExplSyntaxOff
+\endinput
+%%
+%% End of file `datatool-JE.ldf'.
Property changes on: trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-JE.ldf
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-NZ.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-NZ.ldf (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-NZ.ldf 2025-03-02 21:37:12 UTC (rev 74393)
@@ -0,0 +1,459 @@
+%%
+%% This is file `datatool-NZ.ldf',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% datatool-regions.dtx (with options: `datatool-NZ.ldf,package')
+%%
+%% datatool-regions.dtx
+%% Copyright 2025 Nicola Talbot
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Nicola Talbot.
+%%
+%% This work consists of the files datatool-regions.dtx and datatool-regions.ins and the derived files datatool-AU.ldf, datatool-BE.ldf, datatool-CA.ldf, datatool-FK.ldf, datatool-GB.ldf, datatool-GG.ldf, datatool-GI.ldf, datatool-IE.ldf, datatool-IM.ldf, datatool-JE.ldf, datatool-NZ.ldf, datatool-US.ldf, datatool-ZA.ldf.
+%%
+%% \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 \~}
+\TrackLangProvidesResource{NZ}[2025/03/01 v1.0]
+\ExplSyntaxOn
+\cs_new:Nn \datatool_NZ_set_numberchars_official:
+ {
+ \datatool_set_numberchars:nn { , } { . }
+ }
+\cs_new:Nn \datatool_NZ_set_numberchars_unofficial:
+ {
+ \datatool_set_thinspace_group_decimal_char:n { . }
+ }
+\newcommand \datatoolNZSetNumberChars
+ {
+ \bool_if:NT \l_datatool_region_set_numberchars_bool
+ {
+ \datatool_NZ_set_numberchars_official:
+ }
+ }
+\cs_new:Nn \datatool_NZ_currency_position:nn
+ {
+ \dtlcurrprefixfmt { #1 } { #2 }
+ }
+\tl_new:N \l_datatool_NZ_sym_sep_tl
+\newcommand \datatoolNZcurrencyfmt [ 2 ]
+ {
+ \datatool_NZ_currency_position:nn
+ {
+ \datatoolNZsymbolprefix { NZ }
+ #1
+ }
+ { #2 }
+ }
+\newcommand \datatoolNZsymbolprefix [ 1 ] { }
+\datatool_def_currency:nnnV
+ { \datatoolNZcurrencyfmt }
+ { NZD }
+ { \$ }
+ \c_dollar_str
+\datatool_register_regional_currency_code:nn { NZ } { NZD }
+\newcommand \datatoolNZSetCurrency
+ {
+ \bool_if:NT \l_datatool_region_set_currency_bool
+ {
+ \DTLsetdefaultcurrency { NZD }
+ \renewcommand \DTLCurrentLocaleCurrencyDP { 2 }
+ \renewcommand \dtlcurrfmtsymsep { \l_datatool_NZ_sym_sep_tl }
+ }
+ }
+\tl_new:N \l__datatool_NZ_datevariant_tl
+\tl_set:Nn \l__datatool_NZ_datevariant_tl { slash }
+\tl_new:N \l__datatool_NZ_datestyle_tl
+\tl_set:Nn \l__datatool_NZ_datestyle_tl { ddmmyyyy }
+\tl_new:N \l__datatool_NZ_timevariant_tl
+\tl_set:Nn \l__datatool_NZ_timevariant_tl { colon }
+\cs_new:Nn \datatool_NZ_parse_timestamp:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_NZ_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_NZ_datevariant_tl
+ _
+ \l__datatool_NZ_datestyle_tl
+ _date_regex
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_NZ_timevariant_tl
+ _hhmmss_time_regex
+ }
+ {
+ \use:c
+ {
+ datatool_
+ \l__datatool_NZ_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_NZ_datevariant_tl
+ _
+ \l__datatool_NZ_datestyle_tl
+ _date_regex
+ }
+ {
+ c_datatool_
+ \l__datatool_NZ_timevariant_tl
+ _hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_NZ_timevariant_tl
+ { datatool-NZ }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_NZ_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_NZ_timevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_NZ_datevariant_tl
+ { datatool-NZ }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_NZ_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_NZ_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_NZ_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-NZ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_NZ_datestyle_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_NZ_parse_date:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_NZ_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_NZ_datevariant_tl
+ _anchored_
+ \l__datatool_NZ_datestyle_tl
+ _date_regex
+ }
+ {
+ \exp_args:cc
+ {
+ datatool_
+ \l__datatool_NZ_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_NZ_datevariant_tl
+ _anchored_
+ \l__datatool_NZ_datestyle_tl
+ _date_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_NZ_datevariant_tl
+ { datatool-NZ }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_NZ_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_NZ_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_NZ_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-NZ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_NZ_datestyle_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_NZ_parse_time:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_NZ_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ {
+ \datatool_hhmmss_parse_time:cNnTF
+ {
+ c_datatool_
+ \l__datatool_NZ_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_NZ_timevariant_tl
+ { datatool-NZ }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_NZ_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_NZ_timevariant_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_NZ_get_timezone_map:n
+ {
+ \datatool_region_get_timezone_map:n { NZ / #1 }
+ }
+\datatool_region_set_timezone_map:nn { NZ / NZST } { +12:00 }
+\datatool_region_set_timezone_map:nn { NZ / CHADT } { +13:45 }
+\datatool_region_set_timezone_map:nn { NZ / NZDT } { +13:00 }
+\datatool_region_set_timezone_map:nn { NZ / CHAST } { +12:45 }
+\datatool_locale_define_keys:nn { NZ }
+ {
+ number-style .choices:nn =
+ { official, unofficial }
+ {
+ \exp_args:NNe \renewcommand
+ \datatoolNZSetNumberChars
+ {
+ \exp_not:N \bool_if:NT
+ \exp_not:N \l_datatool_region_set_numberchars_bool
+ {
+ \exp_not:c { datatool_NZ_set_numberchars_ \l_keys_choice_tl : }
+ }
+ }
+ \tl_if_eq:NnT \l_datatool_current_region_tl { NZ }
+ {
+ \datatoolNZSetNumberChars
+ }
+ } ,
+ currency-symbol-position .choice: ,
+ currency-symbol-position / before .code:n =
+ {
+ \cs_set_eq:NN \datatool_NZ_currency_position:nn \dtlcurrprefixfmt
+ } ,
+ currency-symbol-position / after .code:n =
+ {
+ \cs_set_eq:NN \datatool_NZ_currency_position:nn \dtlcurrsuffixfmt
+ } ,
+ currency-symbol-prefix .choice: ,
+ currency-symbol-prefix / false .code:n =
+ {
+ \cs_set_eq:NN \datatoolNZsymbolprefix \use_none:n
+ } ,
+ currency-symbol-prefix / true .code:n =
+ {
+ \cs_set_eq:NN
+ \datatoolNZsymbolprefix
+ \datatool_currency_symbol_region_prefix:n
+ } ,
+ currency-symbol-prefix .default:n = { true } ,
+ currency-symbol-sep .choice: ,
+ currency-symbol-sep / none .code:n =
+ {
+ \tl_clear:N \l_datatool_NZ_sym_sep_tl
+ } ,
+ currency-symbol-sep / thin-space .code:n =
+ {
+ \tl_set:Nn \l_datatool_NZ_sym_sep_tl { \, }
+ } ,
+ currency-symbol-sep / space .code:n =
+ {
+ \tl_set:Nn \l_datatool_NZ_sym_sep_tl { ~ }
+ } ,
+ currency-symbol-sep / nbsp .code:n =
+ {
+ \tl_set:Nn \l_datatool_NZ_sym_sep_tl { \nobreakspace }
+ } ,
+ currency-symbol-sep . initial:n = { none } ,
+ date-style .choice: ,
+ date-style / dmyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_NZ_datestyle_tl { ddmmyyyy }
+ } ,
+ date-style / mdyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_NZ_datestyle_tl { mmddyyyy }
+ } ,
+ date-style / yyyymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_NZ_datestyle_tl { yyyymmdd }
+ } ,
+ date-style / dmyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_NZ_datestyle_tl { ddmmyy }
+ } ,
+ date-style / mdyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_NZ_datestyle_tl { mmddyy }
+ } ,
+ date-style / yymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_NZ_datestyle_tl { yymmdd }
+ } ,
+ date-variant .choice: ,
+ date-variant / slash .code:n =
+ {
+ \tl_set:Nn \l__datatool_NZ_datevariant_tl { slash }
+ } ,
+ date-variant / hyphen .code:n =
+ {
+ \tl_set:Nn \l__datatool_NZ_datevariant_tl { hyphen }
+ } ,
+ date-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_NZ_datevariant_tl { dot }
+ } ,
+ date-variant / dialect .code:n =
+ {
+ \tl_set:Nn \l__datatool_NZ_datevariant_tl
+ { \l_datatool_current_language_tl }
+ } ,
+ time-variant .choice: ,
+ time-variant / colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_NZ_timevariant_tl { colon }
+ } ,
+ time-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_NZ_timevariant_tl { dot }
+ } ,
+ time-variant / dialect .code:n =
+ {
+ \tl_if_eq:NnTF \l__datatool_NZ_timevariant_tl { dot }
+ {
+ \tl_set:Nn \l__datatool_NZ_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ }
+ {
+ \tl_if_in:NnF
+ \l__datatool_NZ_timevariant_tl
+ { \l_datatool_current_language_tl }
+ {
+ \tl_set:Nn \l__datatool_NZ_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ }
+ }
+ } ,
+ time-variant / dialect-colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_NZ_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ } ,
+ time-variant / dialect-dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_NZ_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ } ,
+ }
+\newcommand \datatoolNZSetTemporalParsers
+ {
+ \renewcommand \DTLCurrentLocaleParseTimeStamp
+ { \datatool_NZ_parse_timestamp:NnTF }
+ \renewcommand \DTLCurrentLocaleParseDate
+ { \datatool_NZ_parse_date:NnTF }
+ \renewcommand \DTLCurrentLocaleParseTime
+ { \datatool_NZ_parse_time:NnTF }
+ \let
+ \DTLCurrentLocaleGetTimeZoneMap
+ \datatool_NZ_get_timezone_map:n
+ }
+\newcommand \datatoolNZSetTemporalFormatters
+ {
+ \let
+ \DTLCurrentLocaleFormatDate
+ \datatool_default_date_fmt:nnnn
+ \let
+ \DTLCurrentLocaleFormatTime
+ \datatool_default_time_fmt:nnn
+ \let
+ \DTLCurrentLocaleFormatTimeZone
+ \datatool_default_timezone_fmt:nn
+ \let
+ \DTLCurrentLocaleFormatTimeStampNoZone
+ \datatool_default_timestamp_fmt:nnnnnnn
+ \let
+ \DTLCurrentLocaleFormatTimeStampWithZone
+ \datatool_default_timestamp_fmt:nnnnnnnnn
+ \renewcommand \DTLCurrentLocaleTimeStampFmtSep { ~ }
+ }
+\newcommand \DTLNZLocaleHook
+ {
+ \datatoolNZSetNumberChars
+ \datatoolNZSetCurrency
+ \datatoolNZSetTemporalParsers
+ \datatoolNZSetTemporalFormatters
+ \tl_set:Nn \l_datatool_current_region_tl { NZ }
+ }
+\ExplSyntaxOff
+\endinput
+%%
+%% End of file `datatool-NZ.ldf'.
Property changes on: trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-NZ.ldf
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-US.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-US.ldf (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-US.ldf 2025-03-02 21:37:12 UTC (rev 74393)
@@ -0,0 +1,471 @@
+%%
+%% This is file `datatool-US.ldf',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% datatool-regions.dtx (with options: `datatool-US.ldf,package')
+%%
+%% datatool-regions.dtx
+%% Copyright 2025 Nicola Talbot
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Nicola Talbot.
+%%
+%% This work consists of the files datatool-regions.dtx and datatool-regions.ins and the derived files datatool-AU.ldf, datatool-BE.ldf, datatool-CA.ldf, datatool-FK.ldf, datatool-GB.ldf, datatool-GG.ldf, datatool-GI.ldf, datatool-IE.ldf, datatool-IM.ldf, datatool-JE.ldf, datatool-NZ.ldf, datatool-US.ldf, datatool-ZA.ldf.
+%%
+%% \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 \~}
+\TrackLangProvidesResource{US}[2025/03/01 v1.0]
+\ExplSyntaxOn
+\cs_new:Nn \datatool_US_set_numberchars_official:
+ {
+ \datatool_set_numberchars:nn { , } { . }
+ }
+\cs_new:Nn \datatool_US_set_numberchars_unofficial:
+ {
+ \datatool_set_thinspace_group_decimal_char:n { . }
+ }
+\newcommand \datatoolUSSetNumberChars
+ {
+ \bool_if:NT \l_datatool_region_set_numberchars_bool
+ {
+ \datatool_US_set_numberchars_official:
+ }
+ }
+\cs_new:Nn \datatool_US_currency_position:nn
+ {
+ \dtlcurrprefixfmt { #1 } { #2 }
+ }
+\tl_new:N \l_datatool_US_sym_sep_tl
+\newcommand \datatoolUScurrencyfmt [ 2 ]
+ {
+ \datatool_US_currency_position:nn
+ {
+ \datatoolUSsymbolprefix { US }
+ #1
+ }
+ { #2 }
+ }
+\newcommand \datatoolUSsymbolprefix [ 1 ] { }
+\datatool_def_currency:nnnV
+ { \datatoolUScurrencyfmt }
+ { USD }
+ { \$ }
+ \c_dollar_str
+\datatool_register_regional_currency_code:nn { US } { USD }
+\newcommand \datatoolUSSetCurrency
+ {
+ \bool_if:NT \l_datatool_region_set_currency_bool
+ {
+ \DTLsetdefaultcurrency { USD }
+ \renewcommand \DTLCurrentLocaleCurrencyDP { 2 }
+ \renewcommand \dtlcurrfmtsymsep { \l_datatool_US_sym_sep_tl }
+ }
+ }
+\tl_new:N \l__datatool_US_datevariant_tl
+\tl_set:Nn \l__datatool_US_datevariant_tl { slash }
+\tl_new:N \l__datatool_US_datestyle_tl
+\tl_set:Nn \l__datatool_US_datestyle_tl { mmddyyyy }
+\tl_new:N \l__datatool_US_timevariant_tl
+\tl_set:Nn \l__datatool_US_timevariant_tl { colon }
+\cs_new:Nn \datatool_US_parse_timestamp:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_US_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_US_datevariant_tl
+ _
+ \l__datatool_US_datestyle_tl
+ _date_regex
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_US_timevariant_tl
+ _hhmmss_time_regex
+ }
+ {
+ \use:c
+ {
+ datatool_
+ \l__datatool_US_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_US_datevariant_tl
+ _
+ \l__datatool_US_datestyle_tl
+ _date_regex
+ }
+ {
+ c_datatool_
+ \l__datatool_US_timevariant_tl
+ _hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_US_timevariant_tl
+ { datatool-US }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_US_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_US_timevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_US_datevariant_tl
+ { datatool-US }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_US_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_US_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_US_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-US }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_US_datestyle_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_US_parse_date:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_US_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_US_datevariant_tl
+ _anchored_
+ \l__datatool_US_datestyle_tl
+ _date_regex
+ }
+ {
+ \exp_args:cc
+ {
+ datatool_
+ \l__datatool_US_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_US_datevariant_tl
+ _anchored_
+ \l__datatool_US_datestyle_tl
+ _date_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_US_datevariant_tl
+ { datatool-US }
+ {
+ No ~ language ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_US_datestyle_tl '
+ }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_US_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_US_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-US }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_US_datestyle_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_US_parse_time:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_US_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ {
+ \datatool_hhmmss_parse_time:cNnTF
+ {
+ c_datatool_
+ \l__datatool_US_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_warn_check_head_language_empty:Vnnn
+ \l__datatool_US_timevariant_tl
+ { datatool-US }
+ {
+ No ~ language ~ support ~ for ~ time ~ variant ~
+ ` \exp_args:Ne \tl_tail:n { \l__datatool_US_timevariant_tl } '
+ }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_US_timevariant_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_US_get_timezone_map:n
+ {
+ \datatool_region_get_timezone_map:n { US / #1 }
+ }
+\datatool_region_set_timezone_map:nn { US / AST } { -04:00 }
+\datatool_region_set_timezone_map:nn { US / ADT } { -03:00 }
+\datatool_region_set_timezone_map:nn { US / EST } { -05:00 }
+\datatool_region_set_timezone_map:nn { US / EDT } { -04:00 }
+\datatool_region_set_timezone_map:nn { US / CST } { -06:00 }
+\datatool_region_set_timezone_map:nn { US / CDT } { -05:00 }
+\datatool_region_set_timezone_map:nn { US / MST } { -07:00 }
+\datatool_region_set_timezone_map:nn { US / MDT } { -06:00 }
+\datatool_region_set_timezone_map:nn { US / PST } { -08:00 }
+\datatool_region_set_timezone_map:nn { US / PDT } { -07:00 }
+\datatool_region_set_timezone_map:nn { US / AKST } { -09:00 }
+\datatool_region_set_timezone_map:nn { US / AKDT } { -08:00 }
+\datatool_region_set_timezone_map:nn { US / HAST } { -10:00 }
+\datatool_region_set_timezone_map:nn { US / HADT } { -9:00 }
+\datatool_region_set_timezone_map:nn { US / SST } { -11:00 }
+\datatool_region_set_timezone_map:nn { US / ChST } { 10:00 }
+\datatool_locale_define_keys:nn { US }
+ {
+ number-style .choices:nn =
+ { official, unofficial }
+ {
+ \exp_args:NNe \renewcommand
+ \datatoolUSSetNumberChars
+ {
+ \exp_not:N \bool_if:NT
+ \exp_not:N \l_datatool_region_set_numberchars_bool
+ {
+ \exp_not:c { datatool_US_set_numberchars_ \l_keys_choice_tl : }
+ }
+ }
+ \tl_if_eq:NnT \l_datatool_current_region_tl { US }
+ {
+ \datatoolUSSetNumberChars
+ }
+ } ,
+ currency-symbol-position .choice: ,
+ currency-symbol-position / before .code:n =
+ {
+ \cs_set_eq:NN \datatool_US_currency_position:nn \dtlcurrprefixfmt
+ } ,
+ currency-symbol-position / after .code:n =
+ {
+ \cs_set_eq:NN \datatool_US_currency_position:nn \dtlcurrsuffixfmt
+ } ,
+ currency-symbol-prefix .choice: ,
+ currency-symbol-prefix / false .code:n =
+ {
+ \cs_set_eq:NN \datatoolUSsymbolprefix \use_none:n
+ } ,
+ currency-symbol-prefix / true .code:n =
+ {
+ \cs_set_eq:NN
+ \datatoolUSsymbolprefix
+ \datatool_currency_symbol_region_prefix:n
+ } ,
+ currency-symbol-prefix .default:n = { true } ,
+ currency-symbol-sep .choice: ,
+ currency-symbol-sep / none .code:n =
+ {
+ \tl_clear:N \l_datatool_US_sym_sep_tl
+ } ,
+ currency-symbol-sep / thin-space .code:n =
+ {
+ \tl_set:Nn \l_datatool_US_sym_sep_tl { \, }
+ } ,
+ currency-symbol-sep / space .code:n =
+ {
+ \tl_set:Nn \l_datatool_US_sym_sep_tl { ~ }
+ } ,
+ currency-symbol-sep / nbsp .code:n =
+ {
+ \tl_set:Nn \l_datatool_US_sym_sep_tl { \nobreakspace }
+ } ,
+ currency-symbol-sep . initial:n = { none } ,
+ date-style .choice: ,
+ date-style / dmyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_US_datestyle_tl { ddmmyyyy }
+ } ,
+ date-style / mdyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_US_datestyle_tl { mmddyyyy }
+ } ,
+ date-style / yyyymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_US_datestyle_tl { yyyymmdd }
+ } ,
+ date-style / dmyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_US_datestyle_tl { ddmmyy }
+ } ,
+ date-style / mdyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_US_datestyle_tl { mmddyy }
+ } ,
+ date-style / yymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_US_datestyle_tl { yymmdd }
+ } ,
+ date-variant .choice: ,
+ date-variant / slash .code:n =
+ {
+ \tl_set:Nn \l__datatool_US_datevariant_tl { slash }
+ } ,
+ date-variant / hyphen .code:n =
+ {
+ \tl_set:Nn \l__datatool_US_datevariant_tl { hyphen }
+ } ,
+ date-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_US_datevariant_tl { dot }
+ } ,
+ date-variant / dialect .code:n =
+ {
+ \tl_set:Nn \l__datatool_US_datevariant_tl
+ { \l_datatool_current_language_tl }
+ } ,
+ time-variant .choice: ,
+ time-variant / colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_US_timevariant_tl { colon }
+ } ,
+ time-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_US_timevariant_tl { dot }
+ } ,
+ time-variant / dialect .code:n =
+ {
+ \tl_if_eq:NnTF \l__datatool_US_timevariant_tl { dot }
+ {
+ \tl_set:Nn \l__datatool_US_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ }
+ {
+ \tl_if_in:NnF
+ \l__datatool_US_timevariant_tl
+ { \l_datatool_current_language_tl }
+ {
+ \tl_set:Nn \l__datatool_US_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ }
+ }
+ } ,
+ time-variant / dialect-colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_US_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ } ,
+ time-variant / dialect-dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_US_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ } ,
+ }
+\newcommand \datatoolUSSetTemporalParsers
+ {
+ \renewcommand \DTLCurrentLocaleParseTimeStamp
+ { \datatool_US_parse_timestamp:NnTF }
+ \renewcommand \DTLCurrentLocaleParseDate
+ { \datatool_US_parse_date:NnTF }
+ \renewcommand \DTLCurrentLocaleParseTime
+ { \datatool_US_parse_time:NnTF }
+ \let
+ \DTLCurrentLocaleGetTimeZoneMap
+ \datatool_US_get_timezone_map:n
+ }
+\newcommand \datatoolUSSetTemporalFormatters
+ {
+ \let
+ \DTLCurrentLocaleFormatDate
+ \datatool_default_date_fmt:nnnn
+ \let
+ \DTLCurrentLocaleFormatTime
+ \datatool_default_time_fmt:nnn
+ \let
+ \DTLCurrentLocaleFormatTimeZone
+ \datatool_default_timezone_fmt:nn
+ \let
+ \DTLCurrentLocaleFormatTimeStampNoZone
+ \datatool_default_timestamp_fmt:nnnnnnn
+ \let
+ \DTLCurrentLocaleFormatTimeStampWithZone
+ \datatool_default_timestamp_fmt:nnnnnnnnn
+ \renewcommand \DTLCurrentLocaleTimeStampFmtSep { ~ }
+ }
+\newcommand \DTLUSLocaleHook
+ {
+ \datatoolUSSetNumberChars
+ \datatoolUSSetCurrency
+ \datatoolUSSetTemporalParsers
+ \datatoolUSSetTemporalFormatters
+ \tl_set:Nn \l_datatool_current_region_tl { US }
+ }
+\ExplSyntaxOff
+\endinput
+%%
+%% End of file `datatool-US.ldf'.
Property changes on: trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-US.ldf
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-ZA.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-ZA.ldf (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-ZA.ldf 2025-03-02 21:37:12 UTC (rev 74393)
@@ -0,0 +1,413 @@
+%%
+%% This is file `datatool-ZA.ldf',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% datatool-regions.dtx (with options: `datatool-ZA.ldf,package')
+%%
+%% datatool-regions.dtx
+%% Copyright 2025 Nicola Talbot
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Nicola Talbot.
+%%
+%% This work consists of the files datatool-regions.dtx and datatool-regions.ins and the derived files datatool-AU.ldf, datatool-BE.ldf, datatool-CA.ldf, datatool-FK.ldf, datatool-GB.ldf, datatool-GG.ldf, datatool-GI.ldf, datatool-IE.ldf, datatool-IM.ldf, datatool-JE.ldf, datatool-NZ.ldf, datatool-US.ldf, datatool-ZA.ldf.
+%%
+%% \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 \~}
+\TrackLangProvidesResource{ZA}[2025/03/01 v1.0]
+\ExplSyntaxOn
+\cs_new:Nn \datatool_ZA_set_numberchars_official:
+ {
+ \DTLsetnumberchars { . } { , }
+ }
+\cs_new:Nn \datatool_ZA_set_numberchars_dialect:
+ {
+ \cs_if_exist_use:cF
+ { datatool \l_datatool_current_language_tl ZASetNumberChars }
+ {
+ \datatool_ZA_set_numberchars_official:
+ }
+ }
+\newcommand \datatoolZASetNumberChars
+ {
+ \bool_if:NT \l_datatool_region_set_numberchars_bool
+ {
+ \datatool_ZA_set_numberchars_official:
+ }
+ }
+\cs_new:Nn \datatool_ZA_currency_position:nn
+ {
+ \dtlcurrprefixfmt { #1 } { #2 }
+ }
+\tl_new:N \l_datatool_ZA_sym_sep_tl
+\newcommand \datatoolZAcurrencyfmt { \datatool_ZA_currency_position:nn }
+\datatool_def_currency:nnnn
+ { \datatoolZAcurrencyfmt }
+ { ZAR } { R } { R }
+\datatool_register_regional_currency_code:nn { ZA } { ZAR }
+\newcommand \datatoolZASetCurrency
+ {
+ \bool_if:NT \l_datatool_region_set_currency_bool
+ {
+ \DTLsetdefaultcurrency { ZAR }
+ \renewcommand \DTLCurrentLocaleCurrencyDP { 2 }
+ \renewcommand \dtlcurrfmtsymsep { \l_datatool_ZA_sym_sep_tl }
+ }
+ }
+\tl_new:N \l__datatool_ZA_datevariant_tl
+\tl_set:Nn \l__datatool_ZA_datevariant_tl { hyphen }
+\tl_new:N \l__datatool_ZA_datestyle_tl
+\tl_set:Nn \l__datatool_ZA_datestyle_tl { yyyymmdd }
+\tl_new:N \l__datatool_ZA_timevariant_tl
+\tl_set:Nn \l__datatool_ZA_timevariant_tl { colon }
+\cs_new:Nn \datatool_ZA_parse_timestamp:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_ZA_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_ZA_datevariant_tl
+ _
+ \l__datatool_ZA_datestyle_tl
+ _date_regex
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_ZA_timevariant_tl
+ _hhmmss_time_regex
+ }
+ {
+ \use:c
+ {
+ datatool_
+ \l__datatool_ZA_datestyle_tl
+ _hhmmss_tz_parse_timestamp:ccNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_ZA_datevariant_tl
+ _
+ \l__datatool_ZA_datestyle_tl
+ _date_regex
+ }
+ {
+ c_datatool_
+ \l__datatool_ZA_timevariant_tl
+ _hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-ZA }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_ZA_timevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-ZA }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_ZA_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_ZA_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-ZA }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_ZA_datestyle_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_ZA_parse_date:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ datatool_
+ \l__datatool_ZA_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_ZA_datevariant_tl
+ _anchored_
+ \l__datatool_ZA_datestyle_tl
+ _date_regex
+ }
+ {
+ \exp_args:cc
+ {
+ datatool_
+ \l__datatool_ZA_datestyle_tl
+ _parse_date:NNnTF
+ }
+ {
+ c_datatool_
+ \l__datatool_ZA_datevariant_tl
+ _anchored_
+ \l__datatool_ZA_datestyle_tl
+ _date_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-ZA }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_ZA_datestyle_tl ' ~ with ~
+ variant ~
+ ` \l__datatool_ZA_datevariant_tl '
+ }
+ #4
+ }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-ZA }
+ {
+ No ~ support ~ for ~ date ~ style ~
+ ` \l__datatool_ZA_datestyle_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_ZA_parse_time:NnTF
+ {
+ \cs_if_exist:cTF
+ {
+ c_datatool_
+ \l__datatool_ZA_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ {
+ \datatool_hhmmss_parse_time:cNnTF
+ {
+ c_datatool_
+ \l__datatool_ZA_timevariant_tl
+ _anchored_hhmmss_time_regex
+ }
+ #1 { #2 } { #3 } { #4 }
+ }
+ {
+ \datatool_locale_warn:nn { datatool-ZA }
+ {
+ No ~ support ~ for ~ time ~ variant ~
+ ` \l__datatool_ZA_timevariant_tl '
+ }
+ #4
+ }
+ }
+\cs_new:Nn \datatool_ZA_get_timezone_map:n
+ {
+ \datatool_region_get_timezone_map:n { ZA / #1 }
+ }
+\datatool_region_set_timezone_map:nn { ZA / SAST } { +02:00 }
+\datatool_locale_define_keys:nn { ZA }
+ {
+ number-style .choices:nn =
+ { official , dialect }
+ {
+ \exp_args:NNe \renewcommand
+ \datatoolZASetNumberChars
+ {
+ \exp_not:N \bool_if:NT
+ \exp_not:N \l_datatool_region_set_numberchars_bool
+ {
+ \exp_not:c { datatool_ZA_set_numberchars_ \l_keys_choice_tl : }
+ }
+ }
+ \tl_if_eq:NnT \l_datatool_current_region_tl { ZA }
+ {
+ \datatoolZASetNumberChars
+ }
+ } ,
+ currency-symbol-position .choice: ,
+ currency-symbol-position / before .code:n =
+ {
+ \cs_set_eq:NN \datatool_ZA_currency_position:nn \dtlcurrprefixfmt
+ } ,
+ currency-symbol-position / after .code:n =
+ {
+ \cs_set_eq:NN \datatool_ZA_currency_position:nn \dtlcurrsuffixfmt
+ } ,
+ currency-symbol-sep .choice: ,
+ currency-symbol-sep / none .code:n =
+ {
+ \tl_clear:N \l_datatool_ZA_sym_sep_tl
+ } ,
+ currency-symbol-sep / thin-space .code:n =
+ {
+ \tl_set:Nn \l_datatool_ZA_sym_sep_tl { \, }
+ } ,
+ currency-symbol-sep / space .code:n =
+ {
+ \tl_set:Nn \l_datatool_ZA_sym_sep_tl { ~ }
+ } ,
+ currency-symbol-sep / nbsp .code:n =
+ {
+ \tl_set:Nn \l_datatool_ZA_sym_sep_tl { \nobreakspace }
+ } ,
+ currency-symbol-sep .initial:n = { none } ,
+ date-style .choice: ,
+ date-style / dmyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_ZA_datestyle_tl { ddmmyyyy }
+ } ,
+ date-style / mdyyyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_ZA_datestyle_tl { mmddyyyy }
+ } ,
+ date-style / yyyymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_ZA_datestyle_tl { yyyymmdd }
+ } ,
+ date-style / dmyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_ZA_datestyle_tl { ddmmyy }
+ } ,
+ date-style / mdyy .code: n =
+ {
+ \tl_set:Nn \l__datatool_ZA_datestyle_tl { mmddyy }
+ } ,
+ date-style / yymd .code: n =
+ {
+ \tl_set:Nn \l__datatool_ZA_datestyle_tl { yymmdd }
+ } ,
+ date-variant .choice: ,
+ date-variant / slash .code:n =
+ {
+ \tl_set:Nn \l__datatool_ZA_datevariant_tl { slash }
+ } ,
+ date-variant / hyphen .code:n =
+ {
+ \tl_set:Nn \l__datatool_ZA_datevariant_tl { hyphen }
+ } ,
+ date-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_ZA_datevariant_tl { dot }
+ } ,
+ date-variant / dialect .code:n =
+ {
+ \tl_set:Nn \l__datatool_ZA_datevariant_tl
+ { \l_datatool_current_language_tl }
+ } ,
+ time-variant .choice: ,
+ time-variant / colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_ZA_timevariant_tl { colon }
+ } ,
+ time-variant / dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_ZA_timevariant_tl { dot }
+ } ,
+ time-variant / dialect .code:n =
+ {
+ \tl_if_eq:NnTF \l__datatool_ZA_timevariant_tl { dot }
+ {
+ \tl_set:Nn \l__datatool_ZA_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ }
+ {
+ \tl_if_in:NnF
+ \l__datatool_ZA_timevariant_tl
+ { \l_datatool_current_language_tl }
+ {
+ \tl_set:Nn \l__datatool_ZA_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ }
+ }
+ } ,
+ time-variant / dialect-colon .code:n =
+ {
+ \tl_set:Nn \l__datatool_ZA_timevariant_tl
+ { \l_datatool_current_language_tl _colon }
+ } ,
+ time-variant / dialect-dot .code:n =
+ {
+ \tl_set:Nn \l__datatool_ZA_timevariant_tl
+ { \l_datatool_current_language_tl _dot }
+ } ,
+ }
+\newcommand \datatoolZASetTemporalParsers
+ {
+ \renewcommand \DTLCurrentLocaleParseTimeStamp
+ { \datatool_ZA_parse_timestamp:NnTF }
+ \renewcommand \DTLCurrentLocaleParseDate
+ { \datatool_ZA_parse_date:NnTF }
+ \renewcommand \DTLCurrentLocaleParseTime
+ { \datatool_ZA_parse_time:NnTF }
+ \let
+ \DTLCurrentLocaleGetTimeZoneMap
+ \datatool_ZA_get_timezone_map:n
+ }
+\newcommand \datatoolZASetTemporalFormatters
+ {
+ \let
+ \DTLCurrentLocaleFormatDate
+ \datatool_default_date_fmt:nnnn
+ \let
+ \DTLCurrentLocaleFormatTime
+ \datatool_default_time_fmt:nnn
+ \let
+ \DTLCurrentLocaleFormatTimeZone
+ \datatool_default_timezone_fmt:nn
+ \let
+ \DTLCurrentLocaleFormatTimeStampNoZone
+ \datatool_default_timestamp_fmt:nnnnnnn
+ \let
+ \DTLCurrentLocaleFormatTimeStampWithZone
+ \datatool_default_timestamp_fmt:nnnnnnnnn
+ \renewcommand \DTLCurrentLocaleTimeStampFmtSep { ~ }
+ }
+\newcommand \DTLZALocaleHook
+ {
+ \datatoolZASetNumberChars
+ \datatoolZASetCurrency
+ \datatoolZASetTemporalParsers
+ \datatoolZASetTemporalFormatters
+ \tl_set:Nn \l_datatool_current_region_tl { ZA }
+ }
+\ExplSyntaxOff
+\endinput
+%%
+%% End of file `datatool-ZA.ldf'.
Property changes on: trunk/Master/texmf-dist/tex/latex/datatool-regions/datatool-ZA.ldf
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check 2025-03-02 21:34:35 UTC (rev 74392)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check 2025-03-02 21:37:12 UTC (rev 74393)
@@ -252,7 +252,8 @@
custom-bib customdice customenvs cutwin cv cv4tw cvss cweb-latex
cyber cybercic cyklop cyrillic cyrillic-modern cyrplain
dad dancers dantelogo darkmode
- dashbox dashrule dashrulex dashundergaps dataref datax datatool
+ dashbox dashrule dashrulex dashundergaps
+ dataref datatool datatool-regions datax
dateiliste datenumber datestamp
datetime datetime2 datetime2-bahasai datetime2-basque
datetime2-breton datetime2-bulgarian datetime2-catalan
Modified: trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc 2025-03-02 21:34:35 UTC (rev 74392)
+++ trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc 2025-03-02 21:37:12 UTC (rev 74393)
@@ -315,6 +315,7 @@
depend dashundergaps
depend dataref
depend datatool
+depend datatool-regions
depend datax
depend dateiliste
depend datenumber
Added: trunk/Master/tlpkg/tlpsrc/datatool-regions.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/datatool-regions.tlpsrc (rev 0)
+++ trunk/Master/tlpkg/tlpsrc/datatool-regions.tlpsrc 2025-03-02 21:37:12 UTC (rev 74393)
@@ -0,0 +1 @@
+depend datatool
More information about the tex-live-commits
mailing list.