%\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) 2019 Nicola Talbot, all rights reserved.
% Copyright (C) 2019 Andrej Radović, all rights reserved.
% \fi
% \iffalse
%<*driver>
\documentclass[11pt]{ltxdoc}
\CheckSum{3809}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fontspec}

\usepackage{hologo}
\usepackage{graphicx}
\usepackage{multicol}
\usepackage[dvipsnames]{xcolor}
\usepackage[english]{babel}
\usepackage[colorlinks,
%draft, % hyperref's draft mode - disable all hypertext
% TOC settings
%
bookmarks,
linktocpage=true, % make page number, not text, be link on TOC
%
% link colors and other settings
pageanchor=true,%    give every page an anchor in its top left corner
%    necessary for many other options
plainpages=false,%    don't force Arabic anchor naming
breaklinks=true,%    allow breaking links over lines
colorlinks=true,%    enable link coloring
urlcolor=Maroon,%     url colors
linkcolor=MidnightBlue,%    color for normal, internal links
citecolor=PineGreen,%    bibliographical citation color
%frenchlinks=true %  use small caps instead of color for links
%pdfborder={1 0 0},% the color of boxes around links if colorlinks is
% not used
%
% PDF settings
%
unicode=true, % set PDF metadata to be unicode
pdfpagemode=UseNone, % don't open either bookmark or thumbnail sidebar
% alternately, UseOutlines shows bookmark sidebar
pdfstartview=FitV, % scale the PDF to fit the height on first open
bookmarksnumbered=true,% include section number in bookmarks
bookmarksopen=true,% expand bookmark tree in PDF viewer to a level
bookmarksopenlevel=1,% this is the level
hypertexnames=true, % guessable link names
pdfhighlight=/O,% links are outlined when selected, not /I for inverted
%
% PDF metadata
%
pdftitle={datetime2.sty Serbian Module}
pdfauthor={Andrej Radović},
pdfcreator={xdvipdfmx},%
pdfproducer={lualatex},%
hyperindex=false%
]{hyperref}
\usepackage{textcase}

\usepackage{enumitem}
\newlist{flushenumerate}{enumerate}{2}
\setlist[flushenumerate]{nosep,after=\vspace{\baselineskip}}
\setlist[flushenumerate, 1]{leftmargin=0pt, label=\arabic*}
\setlist[flushenumerate, 2]{leftmargin=*}
\newlist{optdescription}{description}{1}
\setlist[optdescription]{%
  align=right,
  labelindent=!,
  leftmargin=0pt,
  font=\small\normalfont\ttfamily}

\usepackage{acronym}
\renewcommand{\acsfont}[1]{{\scshape{#1}}}
\renewcommand*{\aclabelfont}[1]{{\acsfont{#1}}}

\renewcommand*{\usage}[1]{\hyperpage{#1}}
\renewcommand*{\main}[1]{\hyperpage{#1}}
\IndexPrologue{\section*{\indexname}\markboth{\indexname}{\indexname}}
\setcounter{IndexColumns}{2}
\setcounter{GlossaryColumns}{2}
\setlength{\columnsep}{2em}
\let\GlossaryParms\IndexParms%
\newcommand*{\indexitemst}[1]{{\bfseries\sffamily\normalsize{#1}}}

\newcommand*{\sty}[1]{{\textsf{#1}}}
\newcommand*{\opt}[1]{\texttt{#1}\index{#1=\texttt{#1}|main}}
\newcommand*{\subsubsectionopt}[1]{\subsubsection{#1}\index{#1=\texttt{#1}|main
  }}
\newcommand*{\itemopt}[1]{\item[#1]\index{#1=\texttt{#1}|main}}

\usepackage[final,tracking=true, protrusion=true, expansion=true]{microtype}

\usepackage[drafting=false,
  tocaligned=false,
  dottedtoc=false,
  eulerchapternumbers=false,
  linedheaders=false,
  floatperchapter=false,
  eulermath=false,
  beramono=false,
  palatino=false,
  style=arsclassica,
  nochapters=true%
]{classicthesis}

\pagestyle{plain}
\cfoot[\small\pagemark]{}% use a small centered page number in the footer
\ofoot[]{}% clear the outer footer

\usepackage[%showframe,
  top=3.25cm, bottom=3cm, marginpar=2cm]{geometry}

\defaultfontfeatures{Ligatures=TeX, Scale=MatchLowercase}
\setmainfont{XCharter}[Numbers=OldStyle]
\setmonofont{Inconsolata LGC}
\setsansfont{Fira Sans Book}[%
  Numbers=OldStyle,
  ItalicFont	 = {Fira Sans Book Italic},
  BoldFont	    = {Fira Sans SemiBold},
  BoldItalicFont = {Fira Sans SemiBold Italic}]
\newfontfamily\cyrillicfont{XCharter}

\RecordChanges%
\PageIndex%
\CodelineNumbered%

\begin{document}
\DocInput{datetime2-serbian.dtx}
\end{document}
%</driver>
%\fi
%
%\MakeShortVerb{"}
%
%\changes{2.0.0}{2019-11-07}{%
%   Restyled the documentation.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%
%
%\title{{\rmfamily\normalfont\spacedallcaps{%
%   Serbian Module for datetime\liningnums{2} Package}}\\%
%   {\large\url{https://gitlab.com/andrejr/datetime2-serbian}}}
%\author{%
%  \spacedlowsmallcaps{Andrej Radović}\\
%  \url{r.andrej@gmail.com}
%  \and
%  \spacedlowsmallcaps{Nicola L. C. Talbot} \\
%  {\textsf{(inactive)}}
%}
%\date{{\sffamily\scshape 2019-11-22 (v2.1.0)}}
%\maketitle
%
% \renewcommand{\abstractname}{\normalfont\normalsize\spacedlowsmallcaps{Abstract}}
%
%
%\begin{abstract}
%\noindent
%This is the Serbian language module for the \sty{datetime2}
%package. If you want to use the settings in this module you must
%install it in addition to installing \sty{datetime2}. If you use
%\sty{babel} or \sty{polyglossia}, you will need this module to
%prevent them from redefining \cs{today}. The \sty{datetime2}
% \opt{useregional} setting must be on (\texttt{text} or
% \texttt{numeric}) for the language styles to be set.
% Alternatively, you can set them in the document using
% \cs{DTMsetstyle}, but without the \opt{useregional} setting on the
% style will be changed by \cs{date}\meta{language}.
%\end{abstract}
%
%\changes{2.0.0}{2019-11-07}{%
%   Added a proper introduction.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.1.0}{2019-11-22}{Fixed version string.}
%
% \noindent
% As of version 2.0.0, there is support for both Ekavian and Ijekavian
% pronunciation in both Latin and Cyrillic, regions (Serbia, Bosnia and
% Herzegovina, Montenegro), numeric format variants (Roman month ordinals,
% optional leading zeros).
% The package provides two regionless styles, "serbian" (Latin) and "serbianc"
% (Cyrillic), as well as regional styles (explained in \autoref{sub:regions}).
%
% Neither month nor day of week abbreviations are supported.
% These aren't often used within dates in Serbian.
%
% \changes{2.1.0}{2019-11-22}{Mentioned starred \cs{DTMdate}}
% Thanks to the author of \sty{datetime2}, Dr Nicola L. C. Talbot,
% \sty{datetime2-serbian} now (since \sty{datetime2} v1.5.5 and
% \sty{datetime2-serbian} v1.1.0)  supports a peculiar aspect of Serbian date
% formatting: omission of year ordinal's trailing dot when the date is followed
% by a punctuation mark such as a comma.
% This is facilitated by the starred versions of \cs{DTMdate} and
% \cs{DTMDate} --- \cs{DTMdate*} and \cs{DTMDate*}.
% This is explained better in \autoref{sub:pecs}.
%
% \bigskip
%
% {\itshape
% \noindent
% The package is generated from (Jinja2) templates by a Python script before
% it's uploaded to CTAN, so don't try to send patches to files you find there.
% All development is done on Gitlab
% (\url{https://gitlab.com/andrejr/datetime2-serbian}).
%
% If you're developing other datetime2 localization modules (or
% localization modules in general), the way the package is generated might be
% of interest to you.
% I actually tried writing the package by hand, but it was way too tedious.
% Generating most of the package from templates seems like the best way to do
% it.
%\changes{2.1.0}{2019-11-22}{fixed \acsu{utf-8} shortcut.}
% Along the way, I also wrote a small utility for generating \acsu{ascii} --
% \acsu{licr} strings from \acsu{utf-8} strings, and it can be found here:
% \url{https://gitlab.com/andrejr/utf8_to_licr}.
% I might publish it to CTAN if there is interest.
%
% All of Serbian Cyrillic localization strings are also automatically generated
% from Serbian Latin strings using my
% \href{https://gitlab.com/andrejr/srtools}{srtools} Python package, available
% on \href{https://pypi.org/project/srtools/}{PyPI} and
% \href{https://aur.archlinux.org/packages/python-srtools/}{AUR}.
% }
%
% \tableofcontents
%
% \section{The Documentation}
%
%\changes{2.0.0}{2019-11-07}{%
%   Added installation guide.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%
% \subsection{Installation}
% Extract the language definition files first:
% \begin{enumerate}
%     \item
%     Run \hologo{LuaLaTeX} over the file \texttt{datetime2-serbian.ins}: \\
%     "lualatex datetime2-serbian.ins"
%     %
%     \item Move all \texttt{*.ldf} files to %
%       \nolinkurl{TEXMF/tex/latex/datetime2-contrib/datetime2-serbian/}
% \end{enumerate}
% Then, you can compile the documentation yourself by executing
%\begin{verbatim}
%lualatex datetime2-serbian.dtx
%makeindex -s ginddt2s.ist datetime2-serbian.idx
%makeindex -s gglodt2s.ist -o datetime2-serbian.gls datetime2-serbian.glo
%lualatex datetime2-serbian.dtx
%lualatex datetime2-serbian.dtx
%\end{verbatim}
% or just use the precompiled documentation shipped with the source files.
% In both cases, copy the files \texttt{datetime2-serbian.pdf} and
% \texttt{README.md} to
% \nolinkurl{TEXMF/doc/latex/datetime2-contrib/datetime2-serbian/}.
%
%
% \subsection{Setting up \sty{datetime2} with a language module}
%
% \subsubsection{Loading a language module}
% \emph{There are three different ways to load the required language module.
% See the \sty{datetime2} documentation for further detail.}
%
% \medskip
%
% \paragraph{Variant 1:}
% Request the desired language module explicitly by passing one of the
% region options to the \sty{datetime2} package, such as "serbian", "serbianc",
% "sr-Cyrl-ME", \ldots{} (the full list can be found in \autoref{sub:regions}).%
%
%\begin{verbatim}
%\documentclass{article}
%\usepackage[serbian]{datetime2}
%\begin{document}
%\today
%\end{document}
%\end{verbatim}
%
% \paragraph{Variant 2:}
% Load \sty{babel} and pass the "serbian" or "serbianc" option to the
% \cs{documentclass} command (or to \sty{babel} directly).
% If you now pass the \opt{useregional} option to \sty{datetime2}, the language
% module suitable to the one specified with \sty{babel} is loaded:
%\begin{verbatim}
%\documentclass[serbian]{article}
%\usepackage{babel}
%\usepackage[useregional]{datetime2}
%\begin{document}
%\today
%\end{document}
%\end{verbatim}
%
% \paragraph{Variant 3:}
% When using \sty{polyglossia}, you should request the desired language module
% by passing one of the previously mentioned options to the \sty{datetime2}
% package:
%\begin{verbatim}
%\documentclass{article}
%\usepackage{polyglossia}
%\setmainlanguage{serbian}
%\usepackage[serbian]{datetime2}
%\begin{document}
%\today
%\end{document}
%\end{verbatim}
%
%\changes{2.0.0}{2019-11-07}{%
%   Added regions and documented their use.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% \subsection{Regions and scripts}\label{sub:regions}
%
% Serbian language is a rare example of synchronic digraphia --- a situation
% where all literate members of a society use two interchangeable writing
% systems (Cyrillic and Latin).
% This is true in all regions Serbian is spoken in (Serbia, Bosnia and
% Herzegovina, Montenegro).
% This is why every region has a Cyrillic and Latin variant, as well as the
% regionless styles ("serbian" and "serbianc").
%
% The only other difference between the regions is the default value of
% \hyperref[sub:pronu]{\opt{pronunciation}}, which is Ekavian by default for
% "serbian", "serbianc", "sr-*-RS" and Ijekavian for the rest.
%
% The full list of regions (and regionless styles, on top) is as follows:
%\begin{multicols}{2}
%\begin{verbatim}
%serbian
%sr-Latn
%sr-Latn-RS
%sr-Latn-ME
%sr-Latn-BA
%serbianc
%sr-Cyrl
%sr-Cyrl-RS
%sr-Cyrl-ME
%sr-Cyrl-BA
%\end{verbatim}
%\end{multicols}
%
%
% \subsection{Settings (Serbian-related)}
%\changes{2.0.0}{2019-11-07}{%
%   Added documentation for new settings.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%
% These settings can be changed using \sty{\\DTMlangsetup}.
% Here's an example showing how to set both multiple--choice and boolean
% settings.
%\begin{verbatim}
%\DTMlangsetup[serbian]{pronunciation=ijekavian, monthi}
%\end{verbatim}
%
%
% \subsubsectionopt{pronunciation}\label{sub:pronu}
%\changes{2.0.0}{2019-11-07}{%
%   Added a way to switch between Ekavian and Ijekavian pronunciation.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% May take values "ekavian" and "ijekavian", which denote the two most
% frequently used pronunciations in Serbian language.
% The only difference is in the way weekdays are written.
%
% The default value is Ekavian by default for "serbian", "serbianc", "sr-*-RS"
% and Ijekavian for the rest of the regions.
%
% \changes{2.0.1}{2019-11-11}{Fixed paragraph indentation.}
% \bigskip
% \noindent
% ponedeljak, 4. novembar 2019. \hfill \emph{Ekavian pronunciation} \\
% ponedjeljak, 4. novembar 2019. \hfill \emph{Ijekavian pronunciation}
%
%
% \subsubsectionopt{monthi}
%\changes{2.0.0}{2019-11-07}{%
%   Added a way to switch June, July alternate spellings.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% This is a boolean key.
% If "false" (the default), the months June and July are spelled as \emph{Jun}
% and \emph{Jul}.
% If "true", the months June and July are spelled as \emph{Juni} and
% \emph{Juli}.
%
% \changes{2.0.1}{2019-11-11}{Fixed paragraph indentation.}
% \bigskip
% \noindent
% 15. juni 1389. \hfill "monthi=true" \\
% 15. jun 1389. \hfill "monthi=false"
%
% \subsubsectionopt{leadingzero}\label{sub:leadingzero}
%\changes{2.0.0}{2019-11-07}{%
%   Added a switch for toggling leading zeroes in day and month ordinals.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% This is a boolean key.
% If "false" (the default), there is no leading zero for hours, days or months.
% If "true", there is.
%
% \changes{2.0.1}{2019-11-11}{Fixed paragraph indentation.}
% \bigskip
% \noindent
% уторак, 2. 4. 2019. 8.03 CET \hfill "leadingzero=false" \\
% уторак, 02. 04. 2019. 08.03 CET \hfill "leadingzero=true"
%
% \subsubsectionopt{monthord}
%\changes{2.0.0}{2019-11-07}{%
%   Added a switch between multiple numeric month ordinal formats used in
%   Serbian.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.1}{2019-11-11}{Changed colon \rightarrow{} period.}
% This key defines the way the month ordinal is written in Serbian "*-numeric"
% formats.
% This key defines the way the month ordinal is written in Serbian "*-numeric"
% It takes values "arabic" (the default), "roman" and "romanlsc".
% The "arabic" setting results in an arabic numeral (subject to
% \nameref{sub:leadingzero}) followed by a period.
%
% The "roman" setting results in an uppercase Roman numeral without a period
% suffix.
% The "romansc" setting results in a lowercase small caps Roman numeral without
% a period suffix (this looks better than regular uppercase when usign old
% style figures).
%
% \changes{2.0.1}{2019-11-11}{Fixed paragraph indentation.}
% \changes{2.0.1}{2019-11-11}{Fixed wrong example.}
% \bigskip
% \noindent
% уторак, 2. 4. 2019. 8.03 CET \hfill "monthord=arabic" \\
% \liningnums{уторак, 2. IV 2019. 8.03 CET} \hfill "monthord=roman" with
% \cs{liningnums} \\
% \oldstylenums{уторак, 2. \textsc{iv} 2019. 8.03 CET} \hfill
% "monthord=romanlsc" with \cs{oldstylenums}
%
% \subsection{Peculiarities of Serbian date formatting}\label{sub:pecs}
% \changes{2.1.0}{2019-11-22}{Mentioned starred \cs{DTMdate}}
% \marginpar{%
% All numbers in a date are considered to be ordinals in Serbian.
% Hence, the dots in Serbian dates aren't seen as mere separators, but
% ordinal designations.
% }
% Date rules in Serbian language feature a dot after the year (the ordinal dot)
% in \emph{almost} every case.
% When the date is followed by a punctuation mark, the trailing dot is omitted.
% When a sentence ends with a date, the date's trailing dot is also omitted, so
% the sentence ends in a single period (or question or exclamation mark).
%
% \smallskip
% \noindent
% Here are some examples:
%
% \begin{flushenumerate}
%    \item Za 21. 2. 2019. i 3. 10. 2019. smo zakazali okupljanja.
%    \item Prva verzija je izašla 17. 9. 1991, nakon nepune godine razvoja.
%    \item Da li svima odgovara 21. februar 2019?
%    \item Konferencija je održana 6. 8. 2013.
% \end{flushenumerate}
%
% To facilitate this, \sty{datetime2} and \sty{datetime2-serbian} provide
% starred alternatives for \cs{DTMdate} and \cs{DTMDate}, which omit the
% trailing dot.
% Such alternatives for \cs{DTMdisplaydate}, \cs{today}, etc.\ are not
% possible, since they would prevent said macros from working in expandable
% contexts (such as \acsu{pdf} bookmarks).
% It is the primary design feature of these commands to work in expandable
% contexts.
% Still, \cs{DTMdate*} and \cs{DTMDate} should cover most of our needs.
%
% Now, here's how we'd write example from above:
%\begin{verbatim}
% Za \DTMdate{2019-02-21} i \DTMdate{2019-10-03} smo zakazali okupljanja.
% Prva verzija je izašla \DTMdate*{1991-09-17}, nakon nepune godine razvoja.
% Da li svima odgovara \DTMdate*{2019-02-21}?
% Konferencija je održana \DTMdate*{2013-08-06}.
%\end{verbatim}
%
% \subsection{Other features and settings}
%
% \subsubsection{Showing the weekday}
%\changes{2.0.0}{2019-11-07}{%
%   Added weekday names.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% All language modules shipped with \sty{datetime2-serbian} support showing the
% weekday.
% To enable this feature, pass the \opt{showdow} option to the \sty{datetime2}
% package.
%
% \subsubsection{Generic customization of styles}
% There are a number of settings provided that can be used in \cs{DTMlangsetup}
% to modify the date-time style.
% These should be present in all "datetime2-*" packages and are present in
% all Serbian regionless and regional styles
%
% These are:
% \begin{optdescription}
%	\itemopt{dowdaysep}%
%	The separator between the day of week name and the day of month number.
%
%	\itemopt{daymonthsep}%
%	The separator between the day and the month name.
%
%	\itemopt{monthyearsep}%
%	The separator between the month name and year.
%
%	\itemopt{datesep}%
%	The separator between the date numbers in the numeric styles.
%
%	\itemopt{timesep}%
%	The separator between hours, minutes and seconds.
%
%	\itemopt{datetimesep}%
%	The separator between the date and time for the full date-time format.
%
%	\itemopt{timezonesep}%
%	The separator between the time and zone for the full date-time format.
%
%	\itemopt{mapzone}%
%	This is a boolean key. If true, the time zone mappings are applied.
%
%	\itemopt{showdayofmonth}%
%	A boolean key that determines whether or not to show the day of the month.
%
%	\itemopt{showyear}%
%	A boolean key that determines whether or not to show the year.
%\end{optdescription}
%
% Although the keys listed here are \emph{defined} for all variant styles, it
% depends on \sty{datetime2}'s setup and the requested styles whether they're
% \emph{used}. \\
% For more information about the \cs{DTMlangsetup} command see the documentation
% of the main \sty{datetime2} package.
%
%
% \subsection{License}
% This material is subject to the \LaTeX\ Project Public License, Version 1.3c or later. \\
% See the copyright headers of the single files for further details.
%
%\StopEventually{%
%  \clearpage
%  \section*{Acronyms}
%  \addcontentsline{toc}{section}{Acronyms}%
%  \begin{acronym}[asciim]
%    \acro{ascii}{American Standard Code for Information
%    Interchange\acroextra{, legacy 7-bit text encoding used on American
%    computers since the 1960s.
%    It fails to encode non-English characters.
%    The mainstream encoding used when \hologo{TeX} was concieved.
%    }}
%    \acro{utf-8}{Unicode Transformation Format -- 8-bit\acroextra{,
%    modern variable width character encoding that's backward-compatible with
%    \acs*{ascii} for all \acs*{ascii} characters, yet provides full coverage
%    for almost every spoken language.}}
%    \acro{licr}{\LaTeX{} Internal Character Representation\acroextra{, a set
%    of macros that help define non-\acs*{ascii} characters for typesetting in
%    \LaTeX{} even in engines that only support \acs*{ascii}.}}
%    \acro{pdf}{Portable Document Format}
%  \end{acronym}
%  \phantomsection
%  \addcontentsline{toc}{section}{Change History}%
%  \PrintChanges
%  \addcontentsline{toc}{section}{\indexname}%
%  \PrintIndex
%}
%
%\newgeometry{left=5cm,right=2.75cm,top=3.25cm,bottom=3cm}
%
%\section{The Code}
%
%\iffalse
%    \begin{macrocode}
%<*datetime2-serbian-base.ldf>
%    \end{macrocode}
%\fi
%\subsection{Base package localization strings}
%
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraphs.}
% This file contains the code common to all the Serbian regional
% variations.
% The localization strings are later imported with the appropriate encoding.
%
%\changes{1.0}{2015-03-31}{Initial release}
%\changes{2.0.0}{2019-11-07}{%
%   Separated the base package from the regionless style.
%   The base package now only declares common localization strings and includes
%   adequately encoded localization strings from their respective packages.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%
%    \begin{macrocode}
\ProvidesDateTimeModule{serbian-base}[2019/11/22 v2.1.0]
%    \end{macrocode}
%
%
%\begin{macro}{\DTMserbianordinalROMAN}
% Uppercase Roman numerals.
%    \begin{macrocode}
\newcommand*{\DTMserbianordinalROMAN}[1]{%
  \ifcase#1
  \or%
    I%
  \or%
    II%
  \or%
    III%
  \or%
    IV%
  \or%
    V%
  \or%
    VI%
  \or%
    VII%
  \or%
    VIII%
  \or%
    IX%
  \or%
    X%
  \or%
    XI%
  \or%
    XII%
  \fi
}
%    \end{macrocode}
%\end{macro}
%
%
%\begin{macro}{\DTMserbianordinalroman}
% Lowercase Roman numerals.
%    \begin{macrocode}
\newcommand*{\DTMserbianordinalroman}[1]{%
  \ifcase#1
  \or%
    i%
  \or%
    ii%
  \or%
    iii%
  \or%
    iv%
  \or%
    v%
  \or%
    vi%
  \or%
    vii%
  \or%
    viii%
  \or%
    ix%
  \or%
    x%
  \or%
    xi%
  \or%
    xii%
  \fi
}
%    \end{macrocode}
%\end{macro}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% We will now include the appropriate localization data.
%
% Packages \sty{ifxetex} and \sty{ifluatex} provide a way to determine if the
% currently used \LaTeX{} engine is \hologo{XeLaTeX} or \hologo{LuaLaTeX},
% respectively.
%    \begin{macrocode}
\RequirePackage{ifxetex,ifluatex}
%    \end{macrocode}
% Load \texttt{serbian-utf8} if either \hologo{XeLaTeX} or \hologo{LuaLaTeX}
% are used, since these engines natively support utf-8.
% Otherwise load \texttt{serbian-ascii}, which provides support for legacy
% engines that only support \ac{licr}.
%    \begin{macrocode}
\ifxetex%
  \RequireDateTimeModule{serbian-base-utf8}
\else
  \ifluatex%
    \RequireDateTimeModule{serbian-base-utf8}
  \else
    \RequireDateTimeModule{serbian-base-ascii}
  \fi
\fi
%    \end{macrocode}
%
%\iffalse
%    \begin{macrocode}
%</datetime2-serbian-base.ldf>
%    \end{macrocode}
%\fi
%
%
%
%\iffalse
%    \begin{macrocode}
%<*datetime2-serbian-base-utf8.ldf>
%    \end{macrocode}
%\fi
%\subsection{Base Serbian \acs{utf-8} localization strings}
% This file contains the localization strings necessary for proper date
% formatting in \acs{utf-8} format.
% This file is loaded if \hologo{XeLaTeX} or \hologo{LuaLaTeX} are used.
%
%\changes{1.0}{2015-03-31}{Initial release}
%\changes{2.0.0}{2019-11-07}{%
%   All localization strings are now declared within the Python build script
%   and both the \acs{utf-8} and \acs{licr} encoded strings are generated from
%   said files on build, before uploading to CTAN.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%    \begin{macrocode}
\ProvidesDateTimeModule{serbian-base-utf8}[2019/11/22 v2.1.0]
%    \end{macrocode}
%
%\subsubsection{Latin month names}
%
%\begin{macro}{\DTMserbianlatnoimonthname}
% Serbian month names, Latin alphabet, no \sty{i} suffix for June and July,
% non-capitalized.
%    \begin{macrocode}
\newcommand*{\DTMserbianlatnoimonthname}[1]{%
  \ifcase#1
  \or%
    januar%
  \or%
    februar%
  \or%
    mart%
  \or%
    april%
  \or%
    maj%
  \or%
    jun%
  \or%
    jul%
  \or%
    avgust%
  \or%
    septembar%
  \or%
    oktobar%
  \or%
    novembar%
  \or%
    decembar%
  \fi
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMserbianlatnoiMonthname}
% Serbian month names, Latin alphabet, no \sty{i} suffix for June and July,
% capitalized.
%    \begin{macrocode}
\newcommand*{\DTMserbianlatnoiMonthname}[1]{%
  \ifcase#1
  \or%
    Januar%
  \or%
    Februar%
  \or%
    Mart%
  \or%
    April%
  \or%
    Maj%
  \or%
    Jun%
  \or%
    Jul%
  \or%
    Avgust%
  \or%
    Septembar%
  \or%
    Oktobar%
  \or%
    Novembar%
  \or%
    Decembar%
  \fi
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMserbianlatimonthname}
% Serbian month names, Latin alphabet, \sty{i} suffix for June and July,
% non-capitalized.
%    \begin{macrocode}
\newcommand*{\DTMserbianlatimonthname}[1]{%
  \ifnum#1=6%
    juni%
  \else\ifnum\#1=7%
      juli%
    \else
      \DTMserbianlatnoimonthname%
    \fi\fi
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMserbianlatiMonthname}
% Serbian month names, Latin alphabet, \sty{i} suffix for June and July,
% capitalized.
%    \begin{macrocode}
\newcommand*{\DTMserbianlatiMonthname}[1]{%
  \ifnum#1=6%
    Juni%
  \else\ifnum\#1=7%
  Juli%
    \else
      \DTMserbianlatnoimonthname%
    \fi\fi
}
%    \end{macrocode}
%\end{macro}
%
%\subsubsection{Latin days of week, Ekavian pronunciation}
%
%\begin{macro}{\DTMserbianlatekweekdayname}
% Serbian weekday names, Latin alphabet, Ekavian pronunciation,
% non-capitalized
%    \begin{macrocode}
\newcommand*{\DTMserbianlatekweekdayname}[1]{%
  \ifcase#1
    ponedeljak%
  \or%
    utorak%
  \or%
    sreda%
  \or%
    četvrtak%
  \or%
    petak%
  \or%
    subota%
  \or%
    nedelja%
  \fi%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMserbianlatekWeekdayname}
% Serbian weekday names, Latin alphabet, Ekavian pronunciation, capitalized
%    \begin{macrocode}
\newcommand*{\DTMserbianlatekWeekdayname}[1]{%
  \ifcase#1
    Ponedeljak%
  \or%
    Utorak%
  \or%
    Sreda%
  \or%
    Četvrtak%
  \or%
    Petak%
  \or%
    Subota%
  \or%
    Nedelja%
  \fi%
}
%    \end{macrocode}
%\end{macro}
%
%\subsubsection{Latin days of week, Ijekavian pronunciation}
%
%
%\begin{macro}{\DTMserbianlatijweekdayname}
% Serbian weekday names, Latin alphabet, Ijekavian pronunciation,
% non-capitalized
%    \begin{macrocode}
\newcommand*{\DTMserbianlatijweekdayname}[1]{%
  \ifcase#1
    ponedjeljak%
  \or%
    utorak%
  \or%
    srijeda%
  \or%
    četvrtak%
  \or%
    petak%
  \or%
    subota%
  \or%
    nedjelja%
  \fi%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMserbianlatijWeekdayname}
% Serbian weekday names, Latin alphabet, Ijekavian pronunciation,
% capitalized
%    \begin{macrocode}
\newcommand*{\DTMserbianlatijWeekdayname}[1]{%
  \ifcase#1
    Ponedjeljak%
  \or%
    Utorak%
  \or%
    Srijeda%
  \or%
    Četvrtak%
  \or%
    Petak%
  \or%
    Subota%
  \or%
    Nedjelja%
  \fi%
}
%    \end{macrocode}
%\end{macro}
%
%
%\subsubsection{Cyrillic month names}
%
%\begin{macro}{\DTMserbiancyrnoimonthname}
% Serbian month names, Cyrillic alphabet, no \sty{i} suffix for June and July,
% non-capitalized.
%    \begin{macrocode}
\newcommand*{\DTMserbiancyrnoimonthname}[1]{%
  \ifcase#1
  \or%
    јануар%
  \or%
    фебруар%
  \or%
    март%
  \or%
    април%
  \or%
    мај%
  \or%
    јун%
  \or%
    јул%
  \or%
    август%
  \or%
    септембар%
  \or%
    октобар%
  \or%
    новембар%
  \or%
    децембар%
  \fi
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMserbiancyrnoiMonthname}
% Serbian month names, Cyrillic alphabet, no \sty{i} suffix for June and July,
% capitalized.
%    \begin{macrocode}
\newcommand*{\DTMserbiancyrnoiMonthname}[1]{%
  \ifcase#1
  \or%
    Јануар%
  \or%
    Фебруар%
  \or%
    Март%
  \or%
    Април%
  \or%
    Мај%
  \or%
    Јун%
  \or%
    Јул%
  \or%
    Август%
  \or%
    Септембар%
  \or%
    Октобар%
  \or%
    Новембар%
  \or%
    Децембар%
  \fi
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMserbiancyrimonthname}
% Serbian month names, Cyrillic alphabet, \sty{i} suffix for June and July,
% non-capitalized.
%    \begin{macrocode}
\newcommand*{\DTMserbiancyrimonthname}[1]{%
  \ifnum#1=6%
    јуни%
  \else\ifnum\#1=7%
      јули%
    \else
      \DTMserbiancyrnoimonthname%
    \fi\fi
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMserbiancyriMonthname}
% Serbian month names, Cyrillic alphabet, \sty{i} suffix for June and July,
% capitalized.
%    \begin{macrocode}
\newcommand*{\DTMserbiancyriMonthname}[1]{%
  \ifnum#1=6%
    Јуни%
  \else\ifnum\#1=7%
  Јули%
    \else
      \DTMserbiancyrnoimonthname%
    \fi\fi
}
%    \end{macrocode}
%\end{macro}
%
%\subsubsection{Cyrillic days of week, Ekavian pronunciation}
%
%\begin{macro}{\DTMserbiancyrekweekdayname}
% Serbian weekday names, Cyrillic alphabet, Ekavian pronunciation,
% non-capitalized
%    \begin{macrocode}
\newcommand*{\DTMserbiancyrekweekdayname}[1]{%
  \ifcase#1
    понедељак%
  \or%
    уторак%
  \or%
    среда%
  \or%
    четвртак%
  \or%
    петак%
  \or%
    субота%
  \or%
    недеља%
  \fi%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMserbiancyrekWeekdayname}
% Serbian weekday names, Cyrillic alphabet, Ekavian pronunciation, capitalized
%    \begin{macrocode}
\newcommand*{\DTMserbiancyrekWeekdayname}[1]{%
  \ifcase#1
    Понедељак%
  \or%
    Уторак%
  \or%
    Среда%
  \or%
    Четвртак%
  \or%
    Петак%
  \or%
    Субота%
  \or%
    Недеља%
  \fi%
}
%    \end{macrocode}
%\end{macro}
%
%\subsubsection{Cyrillic days of week, Ijekavian pronunciation}
%
%
%\begin{macro}{\DTMserbiancyrijweekdayname}
% Serbian weekday names, Cyrillic alphabet, Ijekavian pronunciation,
% non-capitalized
%    \begin{macrocode}
\newcommand*{\DTMserbiancyrijweekdayname}[1]{%
  \ifcase#1
    понедјељак%
  \or%
    уторак%
  \or%
    сриједа%
  \or%
    четвртак%
  \or%
    петак%
  \or%
    субота%
  \or%
    недјеља%
  \fi%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMserbiancyrijWeekdayname}
% Serbian weekday names, Cyrillic alphabet, Ijekavian pronunciation,
% capitalized
%    \begin{macrocode}
\newcommand*{\DTMserbiancyrijWeekdayname}[1]{%
  \ifcase#1
    Понедјељак%
  \or%
    Уторак%
  \or%
    Сриједа%
  \or%
    Четвртак%
  \or%
    Петак%
  \or%
    Субота%
  \or%
    Недјеља%
  \fi%
}
%    \end{macrocode}
%\end{macro}
%
%
%
%\iffalse
%    \begin{macrocode}
%</datetime2-serbian-base-utf8.ldf>
%    \end{macrocode}
%\fi
%
%\iffalse
%    \begin{macrocode}
%<*datetime2-serbian-base-ascii.ldf>
%    \end{macrocode}
%\fi
%\subsection{Base Serbian \acs{ascii} --- \acs{licr} localization strings}
% This file contains the localization strings necessary for proper date
% formatting in \ac{licr} format, which is \acs{ascii}-compatible.
% It provides support for legacy \LaTeX{} engines that only support this kind
% of format and encoding.
%
% This part of the file is generated from the \acs{utf-8} version with the
% help of a tool I wrote, since writing pure \ac{licr} by hand would be
% quite insane.
%
%\changes{1.0}{2015-03-31}{Initial release}
%\changes{2.0.0}{2019-11-07}{%
%   All localization strings are now declared within the Python build script
%   and both the \acs{utf-8} and \acs{licr} encoded strings are generated from
%   said files on build, before uploading to CTAN.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%
%    \begin{macrocode}
\ProvidesDateTimeModule{serbian-base-ascii}[2019/11/22 v2.1.0]
%    \end{macrocode}
%
%%\subsubsection{Latin month names}
%
%\begin{macro}{\DTMserbianlatnoimonthname}
% Serbian month names, Latin alphabet, no \sty{i} suffix for June and July,
% non-capitalized.
%    \begin{macrocode}
\newcommand*{\DTMserbianlatnoimonthname}[1]{%
  \ifcase#1
  \or%
    januar%
  \or%
    februar%
  \or%
    mart%
  \or%
    april%
  \or%
    maj%
  \or%
    jun%
  \or%
    jul%
  \or%
    avgust%
  \or%
    septembar%
  \or%
    oktobar%
  \or%
    novembar%
  \or%
    decembar%
  \fi
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMserbianlatnoiMonthname}
% Serbian month names, Latin alphabet, no \sty{i} suffix for June and July,
% capitalized.
%    \begin{macrocode}
\newcommand*{\DTMserbianlatnoiMonthname}[1]{%
  \ifcase#1
  \or%
    Januar%
  \or%
    Februar%
  \or%
    Mart%
  \or%
    April%
  \or%
    Maj%
  \or%
    Jun%
  \or%
    Jul%
  \or%
    Avgust%
  \or%
    Septembar%
  \or%
    Oktobar%
  \or%
    Novembar%
  \or%
    Decembar%
  \fi
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMserbianlatimonthname}
% Serbian month names, Latin alphabet, \sty{i} suffix for June and July,
% non-capitalized.
%    \begin{macrocode}
\newcommand*{\DTMserbianlatimonthname}[1]{%
  \ifnum#1=6%
    juni%
  \else\ifnum\#1=7%
      juli%
    \else
      \DTMserbianlatnoimonthname%
    \fi\fi
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMserbianlatiMonthname}
% Serbian month names, Latin alphabet, \sty{i} suffix for June and July,
% capitalized.
%    \begin{macrocode}
\newcommand*{\DTMserbianlatiMonthname}[1]{%
  \ifnum#1=6%
    Juni%
  \else\ifnum\#1=7%
  Juli%
    \else
      \DTMserbianlatnoimonthname%
    \fi\fi
}
%    \end{macrocode}
%\end{macro}
%
%\subsubsection{Latin days of week, Ekavian pronunciation}
%
%\begin{macro}{\DTMserbianlatekweekdayname}
% Serbian weekday names, Latin alphabet, Ekavian pronunciation,
% non-capitalized
%    \begin{macrocode}
\newcommand*{\DTMserbianlatekweekdayname}[1]{%
  \ifcase#1
    ponedeljak%
  \or%
    utorak%
  \or%
    sreda%
  \or%
    \v cetvrtak%
  \or%
    petak%
  \or%
    subota%
  \or%
    nedelja%
  \fi%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMserbianlatekWeekdayname}
% Serbian weekday names, Latin alphabet, Ekavian pronunciation, capitalized
%    \begin{macrocode}
\newcommand*{\DTMserbianlatekWeekdayname}[1]{%
  \ifcase#1
    Ponedeljak%
  \or%
    Utorak%
  \or%
    Sreda%
  \or%
    \v Cetvrtak%
  \or%
    Petak%
  \or%
    Subota%
  \or%
    Nedelja%
  \fi%
}
%    \end{macrocode}
%\end{macro}
%
%\subsubsection{Latin days of week, Ijekavian pronunciation}
%
%
%\begin{macro}{\DTMserbianlatijweekdayname}
% Serbian weekday names, Latin alphabet, Ijekavian pronunciation,
% non-capitalized
%    \begin{macrocode}
\newcommand*{\DTMserbianlatijweekdayname}[1]{%
  \ifcase#1
    ponedjeljak%
  \or%
    utorak%
  \or%
    srijeda%
  \or%
    \v cetvrtak%
  \or%
    petak%
  \or%
    subota%
  \or%
    nedjelja%
  \fi%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMserbianlatijWeekdayname}
% Serbian weekday names, Latin alphabet, Ijekavian pronunciation,
% capitalized
%    \begin{macrocode}
\newcommand*{\DTMserbianlatijWeekdayname}[1]{%
  \ifcase#1
    Ponedjeljak%
  \or%
    Utorak%
  \or%
    Srijeda%
  \or%
    \v Cetvrtak%
  \or%
    Petak%
  \or%
    Subota%
  \or%
    Nedjelja%
  \fi%
}
%    \end{macrocode}
%\end{macro}
%
%
%\subsubsection{Cyrillic month names}
%
%\begin{macro}{\DTMserbiancyrnoimonthname}
% Serbian month names, Cyrillic alphabet, no \sty{i} suffix for June and July,
% non-capitalized.
%    \begin{macrocode}
\newcommand*{\DTMserbiancyrnoimonthname}[1]{%
  \ifcase#1
  \or%
    \cyrje\cyra\cyrn\cyru\cyra\cyrr%
  \or%
    \cyrf\cyre\cyrb\cyrr\cyru\cyra\cyrr%
  \or%
    \cyrm\cyra\cyrr\cyrt%
  \or%
    \cyra\cyrp\cyrr\cyri\cyrl%
  \or%
    \cyrm\cyra\cyrje%
  \or%
    \cyrje\cyru\cyrn%
  \or%
    \cyrje\cyru\cyrl%
  \or%
    \cyra\cyrv\cyrg\cyru\cyrs\cyrt%
  \or%
    \cyrs\cyre\cyrp\cyrt\cyre\cyrm\cyrb\cyra\cyrr%
  \or%
    \cyro\cyrk\cyrt\cyro\cyrb\cyra\cyrr%
  \or%
    \cyrn\cyro\cyrv\cyre\cyrm\cyrb\cyra\cyrr%
  \or%
    \cyrd\cyre\cyrc\cyre\cyrm\cyrb\cyra\cyrr%
  \fi
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMserbiancyrnoiMonthname}
% Serbian month names, Cyrillic alphabet, no \sty{i} suffix for June and July,
% capitalized.
%    \begin{macrocode}
\newcommand*{\DTMserbiancyrnoiMonthname}[1]{%
  \ifcase#1
  \or%
    \CYRJE\cyra\cyrn\cyru\cyra\cyrr%
  \or%
    \CYRF\cyre\cyrb\cyrr\cyru\cyra\cyrr%
  \or%
    \CYRM\cyra\cyrr\cyrt%
  \or%
    \CYRA\cyrp\cyrr\cyri\cyrl%
  \or%
    \CYRM\cyra\cyrje%
  \or%
    \CYRJE\cyru\cyrn%
  \or%
    \CYRJE\cyru\cyrl%
  \or%
    \CYRA\cyrv\cyrg\cyru\cyrs\cyrt%
  \or%
    \CYRS\cyre\cyrp\cyrt\cyre\cyrm\cyrb\cyra\cyrr%
  \or%
    \CYRO\cyrk\cyrt\cyro\cyrb\cyra\cyrr%
  \or%
    \CYRN\cyro\cyrv\cyre\cyrm\cyrb\cyra\cyrr%
  \or%
    \CYRD\cyre\cyrc\cyre\cyrm\cyrb\cyra\cyrr%
  \fi
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMserbiancyrimonthname}
% Serbian month names, Cyrillic alphabet, \sty{i} suffix for June and July,
% non-capitalized.
%    \begin{macrocode}
\newcommand*{\DTMserbiancyrimonthname}[1]{%
  \ifnum#1=6%
    \cyrje\cyru\cyrn\cyri%
  \else\ifnum\#1=7%
      \cyrje\cyru\cyrl\cyri%
    \else
      \DTMserbiancyrnoimonthname%
    \fi\fi
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMserbiancyriMonthname}
% Serbian month names, Cyrillic alphabet, \sty{i} suffix for June and July,
% capitalized.
%    \begin{macrocode}
\newcommand*{\DTMserbiancyriMonthname}[1]{%
  \ifnum#1=6%
    \CYRJE\cyru\cyrn\cyri%
  \else\ifnum\#1=7%
  \CYRJE\cyru\cyrl\cyri%
    \else
      \DTMserbiancyrnoimonthname%
    \fi\fi
}
%    \end{macrocode}
%\end{macro}
%
%\subsubsection{Cyrillic days of week, Ekavian pronunciation}
%
%\begin{macro}{\DTMserbiancyrekweekdayname}
% Serbian weekday names, Cyrillic alphabet, Ekavian pronunciation,
% non-capitalized
%    \begin{macrocode}
\newcommand*{\DTMserbiancyrekweekdayname}[1]{%
  \ifcase#1
    \cyrp\cyro\cyrn\cyre\cyrd\cyre\cyrlje\cyra\cyrk%
  \or%
    \cyru\cyrt\cyro\cyrr\cyra\cyrk%
  \or%
    \cyrs\cyrr\cyre\cyrd\cyra%
  \or%
    \cyrch\cyre\cyrt\cyrv\cyrr\cyrt\cyra\cyrk%
  \or%
    \cyrp\cyre\cyrt\cyra\cyrk%
  \or%
    \cyrs\cyru\cyrb\cyro\cyrt\cyra%
  \or%
    \cyrn\cyre\cyrd\cyre\cyrlje\cyra%
  \fi%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMserbiancyrekWeekdayname}
% Serbian weekday names, Cyrillic alphabet, Ekavian pronunciation, capitalized
%    \begin{macrocode}
\newcommand*{\DTMserbiancyrekWeekdayname}[1]{%
  \ifcase#1
    \CYRP\cyro\cyrn\cyre\cyrd\cyre\cyrlje\cyra\cyrk%
  \or%
    \CYRU\cyrt\cyro\cyrr\cyra\cyrk%
  \or%
    \CYRS\cyrr\cyre\cyrd\cyra%
  \or%
    \CYRCH\cyre\cyrt\cyrv\cyrr\cyrt\cyra\cyrk%
  \or%
    \CYRP\cyre\cyrt\cyra\cyrk%
  \or%
    \CYRS\cyru\cyrb\cyro\cyrt\cyra%
  \or%
    \CYRN\cyre\cyrd\cyre\cyrlje\cyra%
  \fi%
}
%    \end{macrocode}
%\end{macro}
%
%\subsubsection{Cyrillic days of week, Ijekavian pronunciation}
%
%
%\begin{macro}{\DTMserbiancyrijweekdayname}
% Serbian weekday names, Cyrillic alphabet, Ijekavian pronunciation,
% non-capitalized
%    \begin{macrocode}
\newcommand*{\DTMserbiancyrijweekdayname}[1]{%
  \ifcase#1
    \cyrp\cyro\cyrn\cyre\cyrd\cyrje\cyre\cyrlje\cyra\cyrk%
  \or%
    \cyru\cyrt\cyro\cyrr\cyra\cyrk%
  \or%
    \cyrs\cyrr\cyri\cyrje\cyre\cyrd\cyra%
  \or%
    \cyrch\cyre\cyrt\cyrv\cyrr\cyrt\cyra\cyrk%
  \or%
    \cyrp\cyre\cyrt\cyra\cyrk%
  \or%
    \cyrs\cyru\cyrb\cyro\cyrt\cyra%
  \or%
    \cyrn\cyre\cyrd\cyrje\cyre\cyrlje\cyra%
  \fi%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMserbiancyrijWeekdayname}
% Serbian weekday names, Cyrillic alphabet, Ijekavian pronunciation,
% capitalized
%    \begin{macrocode}
\newcommand*{\DTMserbiancyrijWeekdayname}[1]{%
  \ifcase#1
    \CYRP\cyro\cyrn\cyre\cyrd\cyrje\cyre\cyrlje\cyra\cyrk%
  \or%
    \CYRU\cyrt\cyro\cyrr\cyra\cyrk%
  \or%
    \CYRS\cyrr\cyri\cyrje\cyre\cyrd\cyra%
  \or%
    \CYRCH\cyre\cyrt\cyrv\cyrr\cyrt\cyra\cyrk%
  \or%
    \CYRP\cyre\cyrt\cyra\cyrk%
  \or%
    \CYRS\cyru\cyrb\cyro\cyrt\cyra%
  \or%
    \CYRN\cyre\cyrd\cyrje\cyre\cyrlje\cyra%
  \fi%
}
%    \end{macrocode}
%\end{macro}
%
%
%
%\iffalse
%    \begin{macrocode}
%</datetime2-serbian-base-ascii.ldf>
%    \end{macrocode}
%\fi
%
%
%\iffalse
%    \begin{macrocode}
%<*datetime2-serbian.ldf>
%    \end{macrocode}
%\fi
%
%\subsection{Serbian \sty{serbian} Code
%   (\texttt{datetime2-serbian.ldf})}
%\changes{1.0}{2015-03-24}{Initial release}
%\changes{2.0.0}{2019-11-07}{%
%   Added regions, all settings made available to regions so all changes can be
%   region-specific.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%    \begin{macrocode}
\ProvidesDateTimeModule{serbian}[2019/11/22 v2.1.0]
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   All localization strings loaded from base module.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% Load base Serbian module.
%    \begin{macrocode}
\RequireDateTimeModule{serbian-base}
%    \end{macrocode}
%
%
%
%\subsubsection{Defining the \sty{serbian} style}
%
% \changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% \changes{2.0.1}{2019-11-11}{Fixed region name error.}
% Allow the user a way of configuring the "serbian" and
% "serbian-numeric" styles by providing macros for various format
% elements.
%
% This doesn't use the package-wide separators such as \cs{dtm@datetimesep} in
% case other date formats are also required.
%
%\begin{macro}{\DTMserbiandowdaysep}
% The separator between weekday and day.
%    \begin{macrocode}
\newcommand*{\DTMserbiandowdaysep}{,\space}
%    \end{macrocode}
%\end{macro}
%
%
%\begin{macro}{\DTMserbiandaymonthsep}
% The separator between the day and month for the text format.
%    \begin{macrocode}
\newcommand*{\DTMserbiandaymonthsep}{%
  \DTMtexorpdfstring{\protect~}{\space}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMserbianmonthyearsep}
% The separator between the month and year for the text format.
%    \begin{macrocode}
\newcommand*{\DTMserbianmonthyearsep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMserbiandatetimesep}
% The separator between the date and time blocks in the full format (either
% text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMserbiandatetimesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMserbiantimezonesep}
% The separator between the time and zone blocks in the full format (either
% text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMserbiantimezonesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMserbiandatesep}
% The separator for the numeric date format.
%    \begin{macrocode}
\newcommand*{\DTMserbiandatesep}{.}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMserbiantimesep}
% The separator for the numeric time format.
%    \begin{macrocode}
\newcommand*{\DTMserbiantimesep}{.}
%    \end{macrocode}
%\end{macro}
%
%Provide keys that can be used in \cs{DTMlangsetup} to set these separators.
%    \begin{macrocode}
\DTMdefkey{serbian}{dowdaysep}%
    {\renewcommand*{\DTMserbiandowdaysep}{#1}}
\DTMdefkey{serbian}{daymonthsep}%
    {\renewcommand*{\DTMserbiandaymonthsep}{#1}}
\DTMdefkey{serbian}{monthyearsep}%
    {\renewcommand*{\DTMserbianmonthyearsep}{#1}}
\DTMdefkey{serbian}{datetimesep}%
    {\renewcommand*{\DTMserbiandatetimesep}{#1}}
\DTMdefkey{serbian}{timezonesep}%
    {\renewcommand*{\DTMserbiantimezonesep}{#1}}
\DTMdefkey{serbian}{datesep}%
    {\renewcommand*{\DTMserbiandatesep}{#1}}
\DTMdefkey{serbian}{timesep}%
    {\renewcommand*{\DTMserbiantimesep}{#1}}
%    \end{macrocode}
%
%\subsubsection{Switches and settings}
%
%\changes{2.0.0}{2019-11-07}{%
%   Added weekday names.
%}
    %\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\begin{macro}{\DTMserbianweekdayname}
% Define the weekday name, lowercase.
%    \begin{macrocode}
\newcommand*{\DTMserbianweekdayname}%
{\DTMserbianlatekweekdayname}
%    \end{macrocode}
%\end{macro}

%\begin{macro}{\DTMserbianweekdayname}
% Define the weekday name, capitalized.
%    \begin{macrocode}
\newcommand*{\DTMserbianWeekdayname}%
    {\DTMserbianlatekWeekdayname}
%    \end{macrocode}
%\end{macro}
%
% Provide a way to switch between Ekavian and Ijekavian pronunciation.
%\changes{2.0.0}{2019-11-07}{%
%   Added a way to switch between Ekavian and Ijekavian pronunciation.
%}
    %\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%
%    \begin{macrocode}
\DTMdefchoicekey{serbian}%
    {pronunciation}[\@dtm@val\@dtm@nr]{ekavian,ijekavian}{%
  \ifcase\@dtm@nr\relax
    \renewcommand*{\DTMserbianweekdayname}%
        {\DTMserbianlatekweekdayname}%
    \renewcommand*{\DTMserbianWeekdayname}%
        {\DTMserbianlatekWeekdayname}%
  \or%
    \renewcommand*{\DTMserbianweekdayname}%
        {\DTMserbianlatijweekdayname}%
    \renewcommand*{\DTMserbianWeekdayname}
        {\DTMserbianlatijWeekdayname}%
  \fi
}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Added a way to switch June, July alternate spellings.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that can switch between (jun, jul) and (juni, juli)
% month spellings.
%    \begin{macrocode}
\DTMdefboolkey{serbian}{monthi}[true]{}
%    \end{macrocode}
% The default is without the "i" suffix.
%    \begin{macrocode}
\DTMsetbool{serbian}{monthi}{false}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Added a switch for adding leading zeroes in day and month ordinals.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the day and month ordinals should
% have leading zeroes.
%    \begin{macrocode}
\DTMdefboolkey{serbian}{leadingzero}[true]{}
%    \end{macrocode}
% The default is to omit the leading zero.
%    \begin{macrocode}
\DTMsetbool{serbian}{leadingzero}{false}
%    \end{macrocode}
%
%\begin{macro}{\DTMserbiandayordinal}
% Define the day ordinal format to be used by this style.
%    \begin{macrocode}
   \newcommand*{\DTMserbiandayordinal}[1]{%
       \DTMifbool{serbian}{leadingzero}%
       {\DTMtwodigits{#1}}%
       {\number#1}\DTMserbiandatesep}%
%    \end{macrocode}
%\end{macro}
%
%\changes{2.1.0}{2019-11-22}{%
%   Removed year ordinal macro since year ordinals are handled differently now.
%}
%\changes{2.0.0}{2019-11-07}{%
%   Removed the option to switch between writing systems, since that is
%   accomplished by using different regions or regionless styles ("serbian" and
%   "serbianc" for example).
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define the month names.
%
%\begin{macro}{\DTMserbiannoimonthname}
%    \begin{macrocode}
\newcommand*{\DTMserbiannoimonthname}{\DTMserbianlatnoimonthname}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMserbiannoiMonthname}
%    \begin{macrocode}
\newcommand*{\DTMserbiannoiMonthname}{\DTMserbianlatnoiMonthname}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMserbianimonthname}
%    \begin{macrocode}
\newcommand*{\DTMserbianimonthname}{\DTMserbianlatimonthname}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMserbianiMonthname}
%    \begin{macrocode}
\newcommand*{\DTMserbianiMonthname}{\DTMserbianlatiMonthname}
%    \end{macrocode}
%\end{macro}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the time zone mappings
% should be used.
%    \begin{macrocode}
\DTMdefboolkey{serbian}{mapzone}[true]{}
%    \end{macrocode}
% The default is to use mappings.
%    \begin{macrocode}
\DTMsetbool{serbian}{mapzone}{true}
%    \end{macrocode}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the day of month should be
% displayed.
%    \begin{macrocode}
\DTMdefboolkey{serbian}{showdayofmonth}[true]{}
%    \end{macrocode}
% The default is to show the day of month.
%    \begin{macrocode}
\DTMsetbool{serbian}{showdayofmonth}{true}
%    \end{macrocode}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the year should be
% displayed.
%    \begin{macrocode}
\DTMdefboolkey{serbian}{showyear}[true]{}
%    \end{macrocode}
% The default is to show the year.
%    \begin{macrocode}
\DTMsetbool{serbian}{showyear}{true}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Added weekday names.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%    \begin{macrocode}
\DTMnewstyle%
{serbian}% label
{% date style
  \renewcommand*\DTMdisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMserbianweekdayname{##4}%
   	    \DTMserbiandowdaysep%
   	  \fi
   	\fi
    \DTMifbool{serbian}{showdayofmonth}
      {\DTMserbiandayordinal{##3}\DTMserbiandaymonthsep}%
      {}%
    \DTMifbool{serbian}{monthi}%
      {\DTMserbianimonthname{##2}}%
      {\DTMserbiannoimonthname{##2}}%
    \DTMifbool{serbian}{showyear}%
    {%
      \DTMserbianmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
  \renewcommand*\DTMDisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMserbianWeekdayname{##4}%
   	    \DTMserbiandowdaysep%
   	  \fi
   	\fi
    \DTMifbool{serbian}{showdayofmonth}
    {%
      \DTMserbiandayordinal{##3}\DTMserbiandaymonthsep%
      \DTMifbool{serbian}{monthi}%
        {\DTMserbianimonthname{##2}}%
        {\DTMserbiannoimonthname{##2}}%
    }%
    {%
      \DTMifbool{serbian}{monthi}%
        {\DTMserbianiMonthname{##2}}%
        {\DTMserbiannoiMonthname{##2}}%
    }%
    \DTMifbool{serbian}{showyear}%
    {%
      \DTMserbianmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
}%
{% time style
  \renewcommand*\DTMdisplaytime[3]{%
    \DTMifbool{serbian}{leadingzero}{\DTMtwodigits{##1}}{\number##1}%
    \DTMserbiantimesep\DTMtwodigits{##2}%
    \ifDTMshowseconds\DTMserbiantimesep\DTMtwodigits{##3}\fi
  }%
}%
{% zone style
  \DTMresetzones%
  \DTMserbianzonemaps%
  \renewcommand*{\DTMdisplayzone}[2]{%
    \DTMifbool{serbian}{mapzone}%
    {\DTMusezonemapordefault{##1}{##2}}%
    {%
      \ifnum##1<0
      \else+\fi\DTMtwodigits{##1}%
      \ifDTMshowzoneminutes\DTMserbiantimesep\DTMtwodigits{##2}\fi
    }%
  }%
}%
{% full style
  \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate%
      \DTMdisplaydate{##1}{##2}{##3}{##4}%
      \DTMserbiandatetimesep%
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone%
      \DTMserbiantimezonesep%
      \DTMdisplayzone{##8}{##9}%
    \fi
  }%
  \renewcommand*{\DTMDisplay}[9]{%
    \ifDTMshowdate%
      \DTMDisplaydate{##1}{##2}{##3}{##4}%
      \DTMserbiandatetimesep%
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone%
      \DTMserbiantimezonesep%
      \DTMdisplayzone{##8}{##9}%
    \fi
  }%
}%
%    \end{macrocode}
%
%
%\begin{macro}{\DTMserbianmonthordinal}
% Define the month ordinal format to be used by this style.
%    \begin{macrocode}
   \newcommand*{\DTMserbianmonthordinal}[1]{%
       \DTMifbool{serbian}{leadingzero}{\DTMtwodigits{#1}}{\number#1}.}%
%    \end{macrocode}
%\end{macro}
%\changes{2.0.0}{2019-11-07}{%
%   Added a switch between multiple numeric month ordinal formats used in
%   Serbian.
%}
% \changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a setting to switch between Arabic, uppercase Roman and lowercase
% smallcaps Roman month format for the "serbian-numeric" style.
%    \begin{macrocode}
\DTMdefchoicekey{serbian}{monthord}%
[\@dtm@val\@dtm@nr]{arabic,roman,romanlsc}{%
 \ifcase\@dtm@nr\relax
   \renewcommand*{\DTMserbianmonthordinal}[1]{%
       \DTMifbool{serbian}{leadingzero}%
         {\DTMtwodigits{##1}}{\number##1}\DTMserbiandatesep}%
 \or%
   \renewcommand*{\DTMserbianmonthordinal}[1]{%
    \DTMtexorpdfstring{\protect\DTMserbianordinalROMAN{##1}}%
    {serbianordinalROMAN{##1}}}%
 \or%
   \renewcommand*{\DTMserbianmonthordinal}[1]{%
    \DTMtexorpdfstring{\textsc{\protect\DTMserbianordinalroman{##1}}}%
    {serbianordinalROMAN{##1}}}%
 \fi
}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Fixed the (previously entirely wrong) numeric date style.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.0}{2019-11-07}{%
%   Added weekday names.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define numeric style.
%    \begin{macrocode}
\DTMnewstyle%
{serbian-numeric}% label
{% date style
  \renewcommand*\DTMdisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMserbianweekdayname{##4}%
   	    \DTMserbiandowdaysep%
   	  \fi
   	\fi
    \DTMifbool{serbian}{showdayofmonth}%
    {\DTMserbiandayordinal{##3}\DTMserbiandaymonthsep}%
    {}%
    \DTMserbianmonthordinal{##2}%
    \DTMifbool{serbian}{showyear}%
    {%
      \DTMserbianmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
  \renewcommand*\DTMDisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMserbianWeekdayname{##4}%
   	    \DTMserbiandowdaysep%
   	  \fi
   	\fi
    \DTMifbool{serbian}{showdayofmonth}%
    {\DTMserbiandayordinal{##3}\DTMserbiandaymonthsep}%
    {}%
    \DTMserbianmonthordinal{##2}%
    \DTMifbool{serbian}{showyear}%
    {%
      \DTMserbianmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
}%
{% time style
  \renewcommand*\DTMdisplaytime[3]{%
    \DTMifbool{serbian}{leadingzero}{\DTMtwodigits{##1}}{\number##1}%
    \DTMserbiantimesep\DTMtwodigits{##2}%
    \ifDTMshowseconds\DTMserbiantimesep\DTMtwodigits{##3}\fi
  }%
}%
{% zone style
  \DTMresetzones%
  \DTMserbianzonemaps%
  \renewcommand*{\DTMdisplayzone}[2]{%
    \DTMifbool{serbian}{mapzone}%
    {\DTMusezonemapordefault{##1}{##2}}%
    {%
      \ifnum##1<0
      \else+\fi\DTMtwodigits{##1}%
      \ifDTMshowzoneminutes\DTMserbiantimesep\DTMtwodigits{##2}\fi
    }%
  }%
}%
{% full style
  \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate%
      \DTMdisplaydate{##1}{##2}{##3}{##4}%
      \DTMserbiandatetimesep%
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone%
      \DTMserbiantimezonesep%
      \DTMdisplayzone{##8}{##9}%
    \fi
  }%
  \renewcommand*{\DTMDisplay}{\DTMdisplay}%
}
%    \end{macrocode}
%
%\begin{macro}{\DTMserbianzonemaps}
% The time zone mappings are set through this command, which can be
% redefined if extra mappings are required or mappings need to be
% removed.
%\changes{2.0.1}{2019-11-11}{Replaced wrong parameter for zonemapping.}
%    \begin{macrocode}
\newcommand*{\DTMserbianzonemaps}{%
  \DTMdefzonemap{01}{00}{CET}%
  \DTMdefzonemap{02}{00}{CEST}%
}
%    \end{macrocode}
%\end{macro}
% Switch style according to the \opt{useregional} setting.
%    \begin{macrocode}
\DTMifcaseregional%
{}% do nothing
{\DTMsetstyle{serbian}}%
{\DTMsetstyle{serbian-numeric}}%
%    \end{macrocode}
% Redefine \cs{dateserbian} (or \cs{date}\meta{dialect}) to prevent
% \sty{babel} from resetting \cs{today}. (For this to work,
% \sty{babel} must already have been loaded if it's required.)
%\changes{1.1}{2019-09-14}{removed spurious space}
%\changes{2.0.0}{2019-11-07}{%
%   Added regions.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%    \begin{macrocode}
\ifcsundef{date\CurrentTrackedDialect}
{%
  \ifundef\dateserbian%
  {% do nothing
  }%
  {%
    \def\dateserbian{%
      \DTMifcaseregional%
      {}% do nothing
      {\DTMsetstyle{serbian}}%
      {\DTMsetstyle{serbian-numeric}}%
    }%
  }%
}%
{%
  \csdef{date\CurrentTrackedDialect}{%
    \DTMifcaseregional%
    {}% do nothing
%    \end{macrocode}
%\changes{2.0.1}{2019-11-11}{Fixed non-regional variant for regional code.}
%\changes{2.1.0}{2019-11-22}{Reverted wrong regional variant changes.}
%    \begin{macrocode}
      {\DTMsetstyle{serbian}}%
      {\DTMsetstyle{serbian-numeric}}%
  }%
}%
%    \end{macrocode}
%
%\iffalse
%    \begin{macrocode}
%</datetime2-serbian.ldf>
%    \end{macrocode}
%\fi
%
%\iffalse
%    \begin{macrocode}
%<*datetime2-sr-Latn.ldf>
%    \end{macrocode}
%\fi
%
%\subsection{Serbian \sty{sr-Latn} Code
%   (\texttt{datetime2-sr-Latn.ldf})}
%\changes{1.0}{2015-03-24}{Initial release}
%\changes{2.0.0}{2019-11-07}{%
%   Added regions, all settings made available to regions so all changes can be
%   region-specific.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%    \begin{macrocode}
\ProvidesDateTimeModule{sr-Latn}[2019/11/22 v2.1.0]
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   All localization strings loaded from base module.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% Load appropriate regionless Serbian module.
%    \begin{macrocode}
\RequireDateTimeModule{serbian}
%    \end{macrocode}
%
%
%
%\subsubsection{Defining the \sty{sr-Latn} style}
%
% \changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% \changes{2.0.1}{2019-11-11}{Fixed region name error.}
% Allow the user a way of configuring the "sr-Latn" and
% "sr-Latn-numeric" styles by providing macros for various format
% elements.
%
% This doesn't use the package-wide separators such as \cs{dtm@datetimesep} in
% case other date formats are also required.
%
%\begin{macro}{\DTMsrLatndowdaysep}
% The separator between weekday and day.
%    \begin{macrocode}
\newcommand*{\DTMsrLatndowdaysep}{,\space}
%    \end{macrocode}
%\end{macro}
%
%
%\begin{macro}{\DTMsrLatndaymonthsep}
% The separator between the day and month for the text format.
%    \begin{macrocode}
\newcommand*{\DTMsrLatndaymonthsep}{%
  \DTMtexorpdfstring{\protect~}{\space}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrLatnmonthyearsep}
% The separator between the month and year for the text format.
%    \begin{macrocode}
\newcommand*{\DTMsrLatnmonthyearsep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrLatndatetimesep}
% The separator between the date and time blocks in the full format (either
% text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMsrLatndatetimesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrLatntimezonesep}
% The separator between the time and zone blocks in the full format (either
% text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMsrLatntimezonesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrLatndatesep}
% The separator for the numeric date format.
%    \begin{macrocode}
\newcommand*{\DTMsrLatndatesep}{.}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrLatntimesep}
% The separator for the numeric time format.
%    \begin{macrocode}
\newcommand*{\DTMsrLatntimesep}{.}
%    \end{macrocode}
%\end{macro}
%
%Provide keys that can be used in \cs{DTMlangsetup} to set these separators.
%    \begin{macrocode}
\DTMdefkey{sr-Latn}{dowdaysep}%
    {\renewcommand*{\DTMsr-Latndowdaysep}{#1}}
\DTMdefkey{sr-Latn}{daymonthsep}%
    {\renewcommand*{\DTMsr-Latndaymonthsep}{#1}}
\DTMdefkey{sr-Latn}{monthyearsep}%
    {\renewcommand*{\DTMsr-Latnmonthyearsep}{#1}}
\DTMdefkey{sr-Latn}{datetimesep}%
    {\renewcommand*{\DTMsr-Latndatetimesep}{#1}}
\DTMdefkey{sr-Latn}{timezonesep}%
    {\renewcommand*{\DTMsr-Latntimezonesep}{#1}}
\DTMdefkey{sr-Latn}{datesep}%
    {\renewcommand*{\DTMsr-Latndatesep}{#1}}
\DTMdefkey{sr-Latn}{timesep}%
    {\renewcommand*{\DTMsr-Latntimesep}{#1}}
%    \end{macrocode}
%
%\subsubsection{Switches and settings}
%
%\changes{2.0.0}{2019-11-07}{%
%   Added weekday names.
%}
    %\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\begin{macro}{\DTMsrLatnweekdayname}
% Define the weekday name, lowercase.
%    \begin{macrocode}
\newcommand*{\DTMsrLatnweekdayname}%
{\DTMserbianlatekweekdayname}
%    \end{macrocode}
%\end{macro}

%\begin{macro}{\DTMsrLatnweekdayname}
% Define the weekday name, capitalized.
%    \begin{macrocode}
\newcommand*{\DTMsrLatnWeekdayname}%
    {\DTMserbianlatekWeekdayname}
%    \end{macrocode}
%\end{macro}
%
% Provide a way to switch between Ekavian and Ijekavian pronunciation.
%\changes{2.0.0}{2019-11-07}{%
%   Added a way to switch between Ekavian and Ijekavian pronunciation.
%}
    %\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%
%    \begin{macrocode}
\DTMdefchoicekey{sr-Latn}%
    {pronunciation}[\@dtm@val\@dtm@nr]{ekavian,ijekavian}{%
  \ifcase\@dtm@nr\relax
    \renewcommand*{\DTMsrLatnweekdayname}%
        {\DTMserbianlatekweekdayname}%
    \renewcommand*{\DTMsrLatnWeekdayname}%
        {\DTMserbianlatekWeekdayname}%
  \or%
    \renewcommand*{\DTMsrLatnweekdayname}%
        {\DTMserbianlatijweekdayname}%
    \renewcommand*{\DTMsrLatnWeekdayname}
        {\DTMserbianlatijWeekdayname}%
  \fi
}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Added a way to switch June, July alternate spellings.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that can switch between (jun, jul) and (juni, juli)
% month spellings.
%    \begin{macrocode}
\DTMdefboolkey{sr-Latn}{monthi}[true]{}
%    \end{macrocode}
% The default is without the "i" suffix.
%    \begin{macrocode}
\DTMsetbool{sr-Latn}{monthi}{false}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Added a switch for adding leading zeroes in day and month ordinals.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the day and month ordinals should
% have leading zeroes.
%    \begin{macrocode}
\DTMdefboolkey{sr-Latn}{leadingzero}[true]{}
%    \end{macrocode}
% The default is to omit the leading zero.
%    \begin{macrocode}
\DTMsetbool{sr-Latn}{leadingzero}{false}
%    \end{macrocode}
%
%\begin{macro}{\DTMsrLatndayordinal}
% Define the day ordinal format to be used by this style.
%    \begin{macrocode}
   \newcommand*{\DTMsrLatndayordinal}[1]{%
       \DTMifbool{sr-Latn}{leadingzero}%
       {\DTMtwodigits{#1}}%
       {\number#1}\DTMsrLatndatesep}%
%    \end{macrocode}
%\end{macro}
%
%\changes{2.1.0}{2019-11-22}{%
%   Removed year ordinal macro since year ordinals are handled differently now.
%}
%\changes{2.0.0}{2019-11-07}{%
%   Removed the option to switch between writing systems, since that is
%   accomplished by using different regions or regionless styles ("serbian" and
%   "serbianc" for example).
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define the month names.
%
%\begin{macro}{\DTMsrLatnnoimonthname}
%    \begin{macrocode}
\newcommand*{\DTMsrLatnnoimonthname}{\DTMserbianlatnoimonthname}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrLatnnoiMonthname}
%    \begin{macrocode}
\newcommand*{\DTMsrLatnnoiMonthname}{\DTMserbianlatnoiMonthname}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrLatnimonthname}
%    \begin{macrocode}
\newcommand*{\DTMsrLatnimonthname}{\DTMserbianlatimonthname}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrLatniMonthname}
%    \begin{macrocode}
\newcommand*{\DTMsrLatniMonthname}{\DTMserbianlatiMonthname}
%    \end{macrocode}
%\end{macro}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the time zone mappings
% should be used.
%    \begin{macrocode}
\DTMdefboolkey{sr-Latn}{mapzone}[true]{}
%    \end{macrocode}
% The default is to use mappings.
%    \begin{macrocode}
\DTMsetbool{sr-Latn}{mapzone}{true}
%    \end{macrocode}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the day of month should be
% displayed.
%    \begin{macrocode}
\DTMdefboolkey{sr-Latn}{showdayofmonth}[true]{}
%    \end{macrocode}
% The default is to show the day of month.
%    \begin{macrocode}
\DTMsetbool{sr-Latn}{showdayofmonth}{true}
%    \end{macrocode}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the year should be
% displayed.
%    \begin{macrocode}
\DTMdefboolkey{sr-Latn}{showyear}[true]{}
%    \end{macrocode}
% The default is to show the year.
%    \begin{macrocode}
\DTMsetbool{sr-Latn}{showyear}{true}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Added weekday names.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%    \begin{macrocode}
\DTMnewstyle%
{sr-Latn}% label
{% date style
  \renewcommand*\DTMdisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMsrLatnweekdayname{##4}%
   	    \DTMsrLatndowdaysep%
   	  \fi
   	\fi
    \DTMifbool{sr-Latn}{showdayofmonth}
      {\DTMsrLatndayordinal{##3}\DTMsrLatndaymonthsep}%
      {}%
    \DTMifbool{sr-Latn}{monthi}%
      {\DTMsrLatnimonthname{##2}}%
      {\DTMsrLatnnoimonthname{##2}}%
    \DTMifbool{sr-Latn}{showyear}%
    {%
      \DTMsrLatnmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
  \renewcommand*\DTMDisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMsrLatnWeekdayname{##4}%
   	    \DTMsrLatndowdaysep%
   	  \fi
   	\fi
    \DTMifbool{sr-Latn}{showdayofmonth}
    {%
      \DTMsrLatndayordinal{##3}\DTMsrLatndaymonthsep%
      \DTMifbool{sr-Latn}{monthi}%
        {\DTMsrLatnimonthname{##2}}%
        {\DTMsrLatnnoimonthname{##2}}%
    }%
    {%
      \DTMifbool{sr-Latn}{monthi}%
        {\DTMsrLatniMonthname{##2}}%
        {\DTMsrLatnnoiMonthname{##2}}%
    }%
    \DTMifbool{sr-Latn}{showyear}%
    {%
      \DTMsrLatnmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
}%
{% time style
  \renewcommand*\DTMdisplaytime[3]{%
    \DTMifbool{sr-Latn}{leadingzero}{\DTMtwodigits{##1}}{\number##1}%
    \DTMsrLatntimesep\DTMtwodigits{##2}%
    \ifDTMshowseconds\DTMsrLatntimesep\DTMtwodigits{##3}\fi
  }%
}%
{% zone style
  \DTMresetzones%
  \DTMsrLatnzonemaps%
  \renewcommand*{\DTMdisplayzone}[2]{%
    \DTMifbool{sr-Latn}{mapzone}%
    {\DTMusezonemapordefault{##1}{##2}}%
    {%
      \ifnum##1<0
      \else+\fi\DTMtwodigits{##1}%
      \ifDTMshowzoneminutes\DTMsrLatntimesep\DTMtwodigits{##2}\fi
    }%
  }%
}%
{% full style
  \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate%
      \DTMdisplaydate{##1}{##2}{##3}{##4}%
      \DTMsrLatndatetimesep%
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone%
      \DTMsrLatntimezonesep%
      \DTMdisplayzone{##8}{##9}%
    \fi
  }%
  \renewcommand*{\DTMDisplay}[9]{%
    \ifDTMshowdate%
      \DTMDisplaydate{##1}{##2}{##3}{##4}%
      \DTMsrLatndatetimesep%
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone%
      \DTMsrLatntimezonesep%
      \DTMdisplayzone{##8}{##9}%
    \fi
  }%
}%
%    \end{macrocode}
%
%
%\begin{macro}{\DTMsrLatnmonthordinal}
% Define the month ordinal format to be used by this style.
%    \begin{macrocode}
   \newcommand*{\DTMsrLatnmonthordinal}[1]{%
       \DTMifbool{sr-Latn}{leadingzero}{\DTMtwodigits{#1}}{\number#1}.}%
%    \end{macrocode}
%\end{macro}
%\changes{2.0.0}{2019-11-07}{%
%   Added a switch between multiple numeric month ordinal formats used in
%   Serbian.
%}
% \changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a setting to switch between Arabic, uppercase Roman and lowercase
% smallcaps Roman month format for the "srLatn-numeric" style.
%    \begin{macrocode}
\DTMdefchoicekey{sr-Latn}{monthord}%
[\@dtm@val\@dtm@nr]{arabic,roman,romanlsc}{%
 \ifcase\@dtm@nr\relax
   \renewcommand*{\DTMsrLatnmonthordinal}[1]{%
       \DTMifbool{sr-Latn}{leadingzero}%
         {\DTMtwodigits{##1}}{\number##1}\DTMsrLatndatesep}%
 \or%
   \renewcommand*{\DTMsrLatnmonthordinal}[1]{%
    \DTMtexorpdfstring{\protect\DTMserbianordinalROMAN{##1}}%
    {serbianordinalROMAN{##1}}}%
 \or%
   \renewcommand*{\DTMsrLatnmonthordinal}[1]{%
    \DTMtexorpdfstring{\textsc{\protect\DTMserbianordinalroman{##1}}}%
    {serbianordinalROMAN{##1}}}%
 \fi
}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Fixed the (previously entirely wrong) numeric date style.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.0}{2019-11-07}{%
%   Added weekday names.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define numeric style.
%    \begin{macrocode}
\DTMnewstyle%
{sr-Latn-numeric}% label
{% date style
  \renewcommand*\DTMdisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMsrLatnweekdayname{##4}%
   	    \DTMsrLatndowdaysep%
   	  \fi
   	\fi
    \DTMifbool{sr-Latn}{showdayofmonth}%
    {\DTMsrLatndayordinal{##3}\DTMsrLatndaymonthsep}%
    {}%
    \DTMsrLatnmonthordinal{##2}%
    \DTMifbool{sr-Latn}{showyear}%
    {%
      \DTMsrLatnmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
  \renewcommand*\DTMDisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMsrLatnWeekdayname{##4}%
   	    \DTMsrLatndowdaysep%
   	  \fi
   	\fi
    \DTMifbool{sr-Latn}{showdayofmonth}%
    {\DTMsrLatndayordinal{##3}\DTMsrLatndaymonthsep}%
    {}%
    \DTMsrLatnmonthordinal{##2}%
    \DTMifbool{sr-Latn}{showyear}%
    {%
      \DTMsrLatnmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
}%
{% time style
  \renewcommand*\DTMdisplaytime[3]{%
    \DTMifbool{sr-Latn}{leadingzero}{\DTMtwodigits{##1}}{\number##1}%
    \DTMsrLatntimesep\DTMtwodigits{##2}%
    \ifDTMshowseconds\DTMsrLatntimesep\DTMtwodigits{##3}\fi
  }%
}%
{% zone style
  \DTMresetzones%
  \DTMsrLatnzonemaps%
  \renewcommand*{\DTMdisplayzone}[2]{%
    \DTMifbool{sr-Latn}{mapzone}%
    {\DTMusezonemapordefault{##1}{##2}}%
    {%
      \ifnum##1<0
      \else+\fi\DTMtwodigits{##1}%
      \ifDTMshowzoneminutes\DTMsrLatntimesep\DTMtwodigits{##2}\fi
    }%
  }%
}%
{% full style
  \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate%
      \DTMdisplaydate{##1}{##2}{##3}{##4}%
      \DTMsrLatndatetimesep%
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone%
      \DTMsrLatntimezonesep%
      \DTMdisplayzone{##8}{##9}%
    \fi
  }%
  \renewcommand*{\DTMDisplay}{\DTMdisplay}%
}
%    \end{macrocode}
%
%\begin{macro}{\DTMsr-Latnzonemaps}
% The time zone mappings are set through this command, which can be
% redefined if extra mappings are required or mappings need to be
% removed.
%\changes{2.0.1}{2019-11-11}{Replaced wrong parameter for zonemapping.}
%    \begin{macrocode}
\newcommand*{\DTMsrLatnzonemaps}{%
  \DTMdefzonemap{01}{00}{CET}%
  \DTMdefzonemap{02}{00}{CEST}%
}
%    \end{macrocode}
%\end{macro}
% Switch style according to the \opt{useregional} setting.
%    \begin{macrocode}
\DTMifcaseregional%
{}% do nothing
{\DTMsetstyle{sr-Latn}}%
{\DTMsetstyle{sr-Latn-numeric}}%
%    \end{macrocode}
% Redefine \cs{dateserbian} (or \cs{date}\meta{dialect}) to prevent
% \sty{babel} from resetting \cs{today}. (For this to work,
% \sty{babel} must already have been loaded if it's required.)
%\changes{1.1}{2019-09-14}{removed spurious space}
%\changes{2.0.0}{2019-11-07}{%
%   Added regions.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%    \begin{macrocode}
\ifcsundef{date\CurrentTrackedDialect}
{%
  \ifundef\dateserbian%
  {% do nothing
  }%
  {%
    \def\dateserbian{%
      \DTMifcaseregional%
      {}% do nothing
      {\DTMsetstyle{sr-Latn}}%
      {\DTMsetstyle{sr-Latn-numeric}}%
    }%
  }%
}%
{%
  \csdef{date\CurrentTrackedDialect}{%
    \DTMifcaseregional%
    {}% do nothing
%    \end{macrocode}
%\changes{2.0.1}{2019-11-11}{Fixed non-regional variant for regional code.}
%\changes{2.1.0}{2019-11-22}{Reverted wrong regional variant changes.}
%    \begin{macrocode}
      {\DTMsetstyle{sr-Latn}}%
      {\DTMsetstyle{sr-Latn-numeric}}%
  }%
}%
%    \end{macrocode}
%
%\iffalse
%    \begin{macrocode}
%</datetime2-sr-Latn.ldf>
%    \end{macrocode}
%\fi
%
%\iffalse
%    \begin{macrocode}
%<*datetime2-sr-Latn-RS.ldf>
%    \end{macrocode}
%\fi
%
%\subsection{Serbian \sty{sr-Latn-RS} Code
%   (\texttt{datetime2-sr-Latn-RS.ldf})}
%\changes{1.0}{2015-03-24}{Initial release}
%\changes{2.0.0}{2019-11-07}{%
%   Added regions, all settings made available to regions so all changes can be
%   region-specific.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%    \begin{macrocode}
\ProvidesDateTimeModule{sr-Latn-RS}[2019/11/22 v2.1.0]
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   All localization strings loaded from base module.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% Load appropriate regionless Serbian module.
%    \begin{macrocode}
\RequireDateTimeModule{serbian}
%    \end{macrocode}
%
%
%
%\subsubsection{Defining the \sty{sr-Latn-RS} style}
%
% \changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% \changes{2.0.1}{2019-11-11}{Fixed region name error.}
% Allow the user a way of configuring the "sr-Latn-RS" and
% "sr-Latn-RS-numeric" styles by providing macros for various format
% elements.
%
% This doesn't use the package-wide separators such as \cs{dtm@datetimesep} in
% case other date formats are also required.
%
%\begin{macro}{\DTMsrLatnRSdowdaysep}
% The separator between weekday and day.
%    \begin{macrocode}
\newcommand*{\DTMsrLatnRSdowdaysep}{,\space}
%    \end{macrocode}
%\end{macro}
%
%
%\begin{macro}{\DTMsrLatnRSdaymonthsep}
% The separator between the day and month for the text format.
%    \begin{macrocode}
\newcommand*{\DTMsrLatnRSdaymonthsep}{%
  \DTMtexorpdfstring{\protect~}{\space}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrLatnRSmonthyearsep}
% The separator between the month and year for the text format.
%    \begin{macrocode}
\newcommand*{\DTMsrLatnRSmonthyearsep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrLatnRSdatetimesep}
% The separator between the date and time blocks in the full format (either
% text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMsrLatnRSdatetimesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrLatnRStimezonesep}
% The separator between the time and zone blocks in the full format (either
% text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMsrLatnRStimezonesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrLatnRSdatesep}
% The separator for the numeric date format.
%    \begin{macrocode}
\newcommand*{\DTMsrLatnRSdatesep}{.}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrLatnRStimesep}
% The separator for the numeric time format.
%    \begin{macrocode}
\newcommand*{\DTMsrLatnRStimesep}{.}
%    \end{macrocode}
%\end{macro}
%
%Provide keys that can be used in \cs{DTMlangsetup} to set these separators.
%    \begin{macrocode}
\DTMdefkey{sr-Latn-RS}{dowdaysep}%
    {\renewcommand*{\DTMsr-Latn-RSdowdaysep}{#1}}
\DTMdefkey{sr-Latn-RS}{daymonthsep}%
    {\renewcommand*{\DTMsr-Latn-RSdaymonthsep}{#1}}
\DTMdefkey{sr-Latn-RS}{monthyearsep}%
    {\renewcommand*{\DTMsr-Latn-RSmonthyearsep}{#1}}
\DTMdefkey{sr-Latn-RS}{datetimesep}%
    {\renewcommand*{\DTMsr-Latn-RSdatetimesep}{#1}}
\DTMdefkey{sr-Latn-RS}{timezonesep}%
    {\renewcommand*{\DTMsr-Latn-RStimezonesep}{#1}}
\DTMdefkey{sr-Latn-RS}{datesep}%
    {\renewcommand*{\DTMsr-Latn-RSdatesep}{#1}}
\DTMdefkey{sr-Latn-RS}{timesep}%
    {\renewcommand*{\DTMsr-Latn-RStimesep}{#1}}
%    \end{macrocode}
%
%\subsubsection{Switches and settings}
%
%\changes{2.0.0}{2019-11-07}{%
%   Added weekday names.
%}
    %\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\begin{macro}{\DTMsrLatnRSweekdayname}
% Define the weekday name, lowercase.
%    \begin{macrocode}
\newcommand*{\DTMsrLatnRSweekdayname}%
{\DTMserbianlatekweekdayname}
%    \end{macrocode}
%\end{macro}

%\begin{macro}{\DTMsrLatnRSweekdayname}
% Define the weekday name, capitalized.
%    \begin{macrocode}
\newcommand*{\DTMsrLatnRSWeekdayname}%
    {\DTMserbianlatekWeekdayname}
%    \end{macrocode}
%\end{macro}
%
% Provide a way to switch between Ekavian and Ijekavian pronunciation.
%\changes{2.0.0}{2019-11-07}{%
%   Added a way to switch between Ekavian and Ijekavian pronunciation.
%}
    %\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%
%    \begin{macrocode}
\DTMdefchoicekey{sr-Latn-RS}%
    {pronunciation}[\@dtm@val\@dtm@nr]{ekavian,ijekavian}{%
  \ifcase\@dtm@nr\relax
    \renewcommand*{\DTMsrLatnRSweekdayname}%
        {\DTMserbianlatekweekdayname}%
    \renewcommand*{\DTMsrLatnRSWeekdayname}%
        {\DTMserbianlatekWeekdayname}%
  \or%
    \renewcommand*{\DTMsrLatnRSweekdayname}%
        {\DTMserbianlatijweekdayname}%
    \renewcommand*{\DTMsrLatnRSWeekdayname}
        {\DTMserbianlatijWeekdayname}%
  \fi
}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Added a way to switch June, July alternate spellings.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that can switch between (jun, jul) and (juni, juli)
% month spellings.
%    \begin{macrocode}
\DTMdefboolkey{sr-Latn-RS}{monthi}[true]{}
%    \end{macrocode}
% The default is without the "i" suffix.
%    \begin{macrocode}
\DTMsetbool{sr-Latn-RS}{monthi}{false}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Added a switch for adding leading zeroes in day and month ordinals.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the day and month ordinals should
% have leading zeroes.
%    \begin{macrocode}
\DTMdefboolkey{sr-Latn-RS}{leadingzero}[true]{}
%    \end{macrocode}
% The default is to omit the leading zero.
%    \begin{macrocode}
\DTMsetbool{sr-Latn-RS}{leadingzero}{false}
%    \end{macrocode}
%
%\begin{macro}{\DTMsrLatnRSdayordinal}
% Define the day ordinal format to be used by this style.
%    \begin{macrocode}
   \newcommand*{\DTMsrLatnRSdayordinal}[1]{%
       \DTMifbool{sr-Latn-RS}{leadingzero}%
       {\DTMtwodigits{#1}}%
       {\number#1}\DTMsrLatnRSdatesep}%
%    \end{macrocode}
%\end{macro}
%
%\changes{2.1.0}{2019-11-22}{%
%   Removed year ordinal macro since year ordinals are handled differently now.
%}
%\changes{2.0.0}{2019-11-07}{%
%   Removed the option to switch between writing systems, since that is
%   accomplished by using different regions or regionless styles ("serbian" and
%   "serbianc" for example).
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define the month names.
%
%\begin{macro}{\DTMsrLatnRSnoimonthname}
%    \begin{macrocode}
\newcommand*{\DTMsrLatnRSnoimonthname}{\DTMserbianlatnoimonthname}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrLatnRSnoiMonthname}
%    \begin{macrocode}
\newcommand*{\DTMsrLatnRSnoiMonthname}{\DTMserbianlatnoiMonthname}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrLatnRSimonthname}
%    \begin{macrocode}
\newcommand*{\DTMsrLatnRSimonthname}{\DTMserbianlatimonthname}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrLatnRSiMonthname}
%    \begin{macrocode}
\newcommand*{\DTMsrLatnRSiMonthname}{\DTMserbianlatiMonthname}
%    \end{macrocode}
%\end{macro}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the time zone mappings
% should be used.
%    \begin{macrocode}
\DTMdefboolkey{sr-Latn-RS}{mapzone}[true]{}
%    \end{macrocode}
% The default is to use mappings.
%    \begin{macrocode}
\DTMsetbool{sr-Latn-RS}{mapzone}{true}
%    \end{macrocode}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the day of month should be
% displayed.
%    \begin{macrocode}
\DTMdefboolkey{sr-Latn-RS}{showdayofmonth}[true]{}
%    \end{macrocode}
% The default is to show the day of month.
%    \begin{macrocode}
\DTMsetbool{sr-Latn-RS}{showdayofmonth}{true}
%    \end{macrocode}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the year should be
% displayed.
%    \begin{macrocode}
\DTMdefboolkey{sr-Latn-RS}{showyear}[true]{}
%    \end{macrocode}
% The default is to show the year.
%    \begin{macrocode}
\DTMsetbool{sr-Latn-RS}{showyear}{true}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Added weekday names.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%    \begin{macrocode}
\DTMnewstyle%
{sr-Latn-RS}% label
{% date style
  \renewcommand*\DTMdisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMsrLatnRSweekdayname{##4}%
   	    \DTMsrLatnRSdowdaysep%
   	  \fi
   	\fi
    \DTMifbool{sr-Latn-RS}{showdayofmonth}
      {\DTMsrLatnRSdayordinal{##3}\DTMsrLatnRSdaymonthsep}%
      {}%
    \DTMifbool{sr-Latn-RS}{monthi}%
      {\DTMsrLatnRSimonthname{##2}}%
      {\DTMsrLatnRSnoimonthname{##2}}%
    \DTMifbool{sr-Latn-RS}{showyear}%
    {%
      \DTMsrLatnRSmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
  \renewcommand*\DTMDisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMsrLatnRSWeekdayname{##4}%
   	    \DTMsrLatnRSdowdaysep%
   	  \fi
   	\fi
    \DTMifbool{sr-Latn-RS}{showdayofmonth}
    {%
      \DTMsrLatnRSdayordinal{##3}\DTMsrLatnRSdaymonthsep%
      \DTMifbool{sr-Latn-RS}{monthi}%
        {\DTMsrLatnRSimonthname{##2}}%
        {\DTMsrLatnRSnoimonthname{##2}}%
    }%
    {%
      \DTMifbool{sr-Latn-RS}{monthi}%
        {\DTMsrLatnRSiMonthname{##2}}%
        {\DTMsrLatnRSnoiMonthname{##2}}%
    }%
    \DTMifbool{sr-Latn-RS}{showyear}%
    {%
      \DTMsrLatnRSmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
}%
{% time style
  \renewcommand*\DTMdisplaytime[3]{%
    \DTMifbool{sr-Latn-RS}{leadingzero}{\DTMtwodigits{##1}}{\number##1}%
    \DTMsrLatnRStimesep\DTMtwodigits{##2}%
    \ifDTMshowseconds\DTMsrLatnRStimesep\DTMtwodigits{##3}\fi
  }%
}%
{% zone style
  \DTMresetzones%
  \DTMsrLatnRSzonemaps%
  \renewcommand*{\DTMdisplayzone}[2]{%
    \DTMifbool{sr-Latn-RS}{mapzone}%
    {\DTMusezonemapordefault{##1}{##2}}%
    {%
      \ifnum##1<0
      \else+\fi\DTMtwodigits{##1}%
      \ifDTMshowzoneminutes\DTMsrLatnRStimesep\DTMtwodigits{##2}\fi
    }%
  }%
}%
{% full style
  \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate%
      \DTMdisplaydate{##1}{##2}{##3}{##4}%
      \DTMsrLatnRSdatetimesep%
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone%
      \DTMsrLatnRStimezonesep%
      \DTMdisplayzone{##8}{##9}%
    \fi
  }%
  \renewcommand*{\DTMDisplay}[9]{%
    \ifDTMshowdate%
      \DTMDisplaydate{##1}{##2}{##3}{##4}%
      \DTMsrLatnRSdatetimesep%
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone%
      \DTMsrLatnRStimezonesep%
      \DTMdisplayzone{##8}{##9}%
    \fi
  }%
}%
%    \end{macrocode}
%
%
%\begin{macro}{\DTMsrLatnRSmonthordinal}
% Define the month ordinal format to be used by this style.
%    \begin{macrocode}
   \newcommand*{\DTMsrLatnRSmonthordinal}[1]{%
       \DTMifbool{sr-Latn-RS}{leadingzero}{\DTMtwodigits{#1}}{\number#1}.}%
%    \end{macrocode}
%\end{macro}
%\changes{2.0.0}{2019-11-07}{%
%   Added a switch between multiple numeric month ordinal formats used in
%   Serbian.
%}
% \changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a setting to switch between Arabic, uppercase Roman and lowercase
% smallcaps Roman month format for the "srLatnRS-numeric" style.
%    \begin{macrocode}
\DTMdefchoicekey{sr-Latn-RS}{monthord}%
[\@dtm@val\@dtm@nr]{arabic,roman,romanlsc}{%
 \ifcase\@dtm@nr\relax
   \renewcommand*{\DTMsrLatnRSmonthordinal}[1]{%
       \DTMifbool{sr-Latn-RS}{leadingzero}%
         {\DTMtwodigits{##1}}{\number##1}\DTMsrLatnRSdatesep}%
 \or%
   \renewcommand*{\DTMsrLatnRSmonthordinal}[1]{%
    \DTMtexorpdfstring{\protect\DTMserbianordinalROMAN{##1}}%
    {serbianordinalROMAN{##1}}}%
 \or%
   \renewcommand*{\DTMsrLatnRSmonthordinal}[1]{%
    \DTMtexorpdfstring{\textsc{\protect\DTMserbianordinalroman{##1}}}%
    {serbianordinalROMAN{##1}}}%
 \fi
}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Fixed the (previously entirely wrong) numeric date style.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.0}{2019-11-07}{%
%   Added weekday names.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define numeric style.
%    \begin{macrocode}
\DTMnewstyle%
{sr-Latn-RS-numeric}% label
{% date style
  \renewcommand*\DTMdisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMsrLatnRSweekdayname{##4}%
   	    \DTMsrLatnRSdowdaysep%
   	  \fi
   	\fi
    \DTMifbool{sr-Latn-RS}{showdayofmonth}%
    {\DTMsrLatnRSdayordinal{##3}\DTMsrLatnRSdaymonthsep}%
    {}%
    \DTMsrLatnRSmonthordinal{##2}%
    \DTMifbool{sr-Latn-RS}{showyear}%
    {%
      \DTMsrLatnRSmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
  \renewcommand*\DTMDisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMsrLatnRSWeekdayname{##4}%
   	    \DTMsrLatnRSdowdaysep%
   	  \fi
   	\fi
    \DTMifbool{sr-Latn-RS}{showdayofmonth}%
    {\DTMsrLatnRSdayordinal{##3}\DTMsrLatnRSdaymonthsep}%
    {}%
    \DTMsrLatnRSmonthordinal{##2}%
    \DTMifbool{sr-Latn-RS}{showyear}%
    {%
      \DTMsrLatnRSmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
}%
{% time style
  \renewcommand*\DTMdisplaytime[3]{%
    \DTMifbool{sr-Latn-RS}{leadingzero}{\DTMtwodigits{##1}}{\number##1}%
    \DTMsrLatnRStimesep\DTMtwodigits{##2}%
    \ifDTMshowseconds\DTMsrLatnRStimesep\DTMtwodigits{##3}\fi
  }%
}%
{% zone style
  \DTMresetzones%
  \DTMsrLatnRSzonemaps%
  \renewcommand*{\DTMdisplayzone}[2]{%
    \DTMifbool{sr-Latn-RS}{mapzone}%
    {\DTMusezonemapordefault{##1}{##2}}%
    {%
      \ifnum##1<0
      \else+\fi\DTMtwodigits{##1}%
      \ifDTMshowzoneminutes\DTMsrLatnRStimesep\DTMtwodigits{##2}\fi
    }%
  }%
}%
{% full style
  \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate%
      \DTMdisplaydate{##1}{##2}{##3}{##4}%
      \DTMsrLatnRSdatetimesep%
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone%
      \DTMsrLatnRStimezonesep%
      \DTMdisplayzone{##8}{##9}%
    \fi
  }%
  \renewcommand*{\DTMDisplay}{\DTMdisplay}%
}
%    \end{macrocode}
%
%\begin{macro}{\DTMsr-Latn-RSzonemaps}
% The time zone mappings are set through this command, which can be
% redefined if extra mappings are required or mappings need to be
% removed.
%\changes{2.0.1}{2019-11-11}{Replaced wrong parameter for zonemapping.}
%    \begin{macrocode}
\newcommand*{\DTMsrLatnRSzonemaps}{%
  \DTMdefzonemap{01}{00}{CET}%
  \DTMdefzonemap{02}{00}{CEST}%
}
%    \end{macrocode}
%\end{macro}
% Switch style according to the \opt{useregional} setting.
%    \begin{macrocode}
\DTMifcaseregional%
{}% do nothing
{\DTMsetstyle{sr-Latn-RS}}%
{\DTMsetstyle{sr-Latn-RS-numeric}}%
%    \end{macrocode}
% Redefine \cs{dateserbian} (or \cs{date}\meta{dialect}) to prevent
% \sty{babel} from resetting \cs{today}. (For this to work,
% \sty{babel} must already have been loaded if it's required.)
%\changes{1.1}{2019-09-14}{removed spurious space}
%\changes{2.0.0}{2019-11-07}{%
%   Added regions.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%    \begin{macrocode}
\ifcsundef{date\CurrentTrackedDialect}
{%
  \ifundef\dateserbian%
  {% do nothing
  }%
  {%
    \def\dateserbian{%
      \DTMifcaseregional%
      {}% do nothing
      {\DTMsetstyle{sr-Latn-RS}}%
      {\DTMsetstyle{sr-Latn-RS-numeric}}%
    }%
  }%
}%
{%
  \csdef{date\CurrentTrackedDialect}{%
    \DTMifcaseregional%
    {}% do nothing
%    \end{macrocode}
%\changes{2.0.1}{2019-11-11}{Fixed non-regional variant for regional code.}
%\changes{2.1.0}{2019-11-22}{Reverted wrong regional variant changes.}
%    \begin{macrocode}
      {\DTMsetstyle{sr-Latn-RS}}%
      {\DTMsetstyle{sr-Latn-RS-numeric}}%
  }%
}%
%    \end{macrocode}
%
%\iffalse
%    \begin{macrocode}
%</datetime2-sr-Latn-RS.ldf>
%    \end{macrocode}
%\fi
%
%\iffalse
%    \begin{macrocode}
%<*datetime2-sr-Latn-ME.ldf>
%    \end{macrocode}
%\fi
%
%\subsection{Serbian \sty{sr-Latn-ME} Code
%   (\texttt{datetime2-sr-Latn-ME.ldf})}
%\changes{1.0}{2015-03-24}{Initial release}
%\changes{2.0.0}{2019-11-07}{%
%   Added regions, all settings made available to regions so all changes can be
%   region-specific.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%    \begin{macrocode}
\ProvidesDateTimeModule{sr-Latn-ME}[2019/11/22 v2.1.0]
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   All localization strings loaded from base module.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% Load appropriate regionless Serbian module.
%    \begin{macrocode}
\RequireDateTimeModule{serbian}
%    \end{macrocode}
%
%
%
%\subsubsection{Defining the \sty{sr-Latn-ME} style}
%
% \changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% \changes{2.0.1}{2019-11-11}{Fixed region name error.}
% Allow the user a way of configuring the "sr-Latn-ME" and
% "sr-Latn-ME-numeric" styles by providing macros for various format
% elements.
%
% This doesn't use the package-wide separators such as \cs{dtm@datetimesep} in
% case other date formats are also required.
%
%\begin{macro}{\DTMsrLatnMEdowdaysep}
% The separator between weekday and day.
%    \begin{macrocode}
\newcommand*{\DTMsrLatnMEdowdaysep}{,\space}
%    \end{macrocode}
%\end{macro}
%
%
%\begin{macro}{\DTMsrLatnMEdaymonthsep}
% The separator between the day and month for the text format.
%    \begin{macrocode}
\newcommand*{\DTMsrLatnMEdaymonthsep}{%
  \DTMtexorpdfstring{\protect~}{\space}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrLatnMEmonthyearsep}
% The separator between the month and year for the text format.
%    \begin{macrocode}
\newcommand*{\DTMsrLatnMEmonthyearsep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrLatnMEdatetimesep}
% The separator between the date and time blocks in the full format (either
% text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMsrLatnMEdatetimesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrLatnMEtimezonesep}
% The separator between the time and zone blocks in the full format (either
% text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMsrLatnMEtimezonesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrLatnMEdatesep}
% The separator for the numeric date format.
%    \begin{macrocode}
\newcommand*{\DTMsrLatnMEdatesep}{.}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrLatnMEtimesep}
% The separator for the numeric time format.
%    \begin{macrocode}
\newcommand*{\DTMsrLatnMEtimesep}{.}
%    \end{macrocode}
%\end{macro}
%
%Provide keys that can be used in \cs{DTMlangsetup} to set these separators.
%    \begin{macrocode}
\DTMdefkey{sr-Latn-ME}{dowdaysep}%
    {\renewcommand*{\DTMsr-Latn-MEdowdaysep}{#1}}
\DTMdefkey{sr-Latn-ME}{daymonthsep}%
    {\renewcommand*{\DTMsr-Latn-MEdaymonthsep}{#1}}
\DTMdefkey{sr-Latn-ME}{monthyearsep}%
    {\renewcommand*{\DTMsr-Latn-MEmonthyearsep}{#1}}
\DTMdefkey{sr-Latn-ME}{datetimesep}%
    {\renewcommand*{\DTMsr-Latn-MEdatetimesep}{#1}}
\DTMdefkey{sr-Latn-ME}{timezonesep}%
    {\renewcommand*{\DTMsr-Latn-MEtimezonesep}{#1}}
\DTMdefkey{sr-Latn-ME}{datesep}%
    {\renewcommand*{\DTMsr-Latn-MEdatesep}{#1}}
\DTMdefkey{sr-Latn-ME}{timesep}%
    {\renewcommand*{\DTMsr-Latn-MEtimesep}{#1}}
%    \end{macrocode}
%
%\subsubsection{Switches and settings}
%
%\changes{2.0.0}{2019-11-07}{%
%   Added weekday names.
%}
    %\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\begin{macro}{\DTMsrLatnMEweekdayname}
% Define the weekday name, lowercase.
%    \begin{macrocode}
\newcommand*{\DTMsrLatnMEweekdayname}%
{\DTMserbianlatijweekdayname}
%    \end{macrocode}
%\end{macro}

%\begin{macro}{\DTMsrLatnMEweekdayname}
% Define the weekday name, capitalized.
%    \begin{macrocode}
\newcommand*{\DTMsrLatnMEWeekdayname}%
    {\DTMserbianlatijWeekdayname}
%    \end{macrocode}
%\end{macro}
%
% Provide a way to switch between Ekavian and Ijekavian pronunciation.
%\changes{2.0.0}{2019-11-07}{%
%   Added a way to switch between Ekavian and Ijekavian pronunciation.
%}
    %\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%
%    \begin{macrocode}
\DTMdefchoicekey{sr-Latn-ME}%
    {pronunciation}[\@dtm@val\@dtm@nr]{ekavian,ijekavian}{%
  \ifcase\@dtm@nr\relax
    \renewcommand*{\DTMsrLatnMEweekdayname}%
        {\DTMserbianlatekweekdayname}%
    \renewcommand*{\DTMsrLatnMEWeekdayname}%
        {\DTMserbianlatekWeekdayname}%
  \or%
    \renewcommand*{\DTMsrLatnMEweekdayname}%
        {\DTMserbianlatijweekdayname}%
    \renewcommand*{\DTMsrLatnMEWeekdayname}
        {\DTMserbianlatijWeekdayname}%
  \fi
}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Added a way to switch June, July alternate spellings.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that can switch between (jun, jul) and (juni, juli)
% month spellings.
%    \begin{macrocode}
\DTMdefboolkey{sr-Latn-ME}{monthi}[true]{}
%    \end{macrocode}
% The default is without the "i" suffix.
%    \begin{macrocode}
\DTMsetbool{sr-Latn-ME}{monthi}{false}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Added a switch for adding leading zeroes in day and month ordinals.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the day and month ordinals should
% have leading zeroes.
%    \begin{macrocode}
\DTMdefboolkey{sr-Latn-ME}{leadingzero}[true]{}
%    \end{macrocode}
% The default is to omit the leading zero.
%    \begin{macrocode}
\DTMsetbool{sr-Latn-ME}{leadingzero}{false}
%    \end{macrocode}
%
%\begin{macro}{\DTMsrLatnMEdayordinal}
% Define the day ordinal format to be used by this style.
%    \begin{macrocode}
   \newcommand*{\DTMsrLatnMEdayordinal}[1]{%
       \DTMifbool{sr-Latn-ME}{leadingzero}%
       {\DTMtwodigits{#1}}%
       {\number#1}\DTMsrLatnMEdatesep}%
%    \end{macrocode}
%\end{macro}
%
%\changes{2.1.0}{2019-11-22}{%
%   Removed year ordinal macro since year ordinals are handled differently now.
%}
%\changes{2.0.0}{2019-11-07}{%
%   Removed the option to switch between writing systems, since that is
%   accomplished by using different regions or regionless styles ("serbian" and
%   "serbianc" for example).
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define the month names.
%
%\begin{macro}{\DTMsrLatnMEnoimonthname}
%    \begin{macrocode}
\newcommand*{\DTMsrLatnMEnoimonthname}{\DTMserbianlatnoimonthname}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrLatnMEnoiMonthname}
%    \begin{macrocode}
\newcommand*{\DTMsrLatnMEnoiMonthname}{\DTMserbianlatnoiMonthname}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrLatnMEimonthname}
%    \begin{macrocode}
\newcommand*{\DTMsrLatnMEimonthname}{\DTMserbianlatimonthname}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrLatnMEiMonthname}
%    \begin{macrocode}
\newcommand*{\DTMsrLatnMEiMonthname}{\DTMserbianlatiMonthname}
%    \end{macrocode}
%\end{macro}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the time zone mappings
% should be used.
%    \begin{macrocode}
\DTMdefboolkey{sr-Latn-ME}{mapzone}[true]{}
%    \end{macrocode}
% The default is to use mappings.
%    \begin{macrocode}
\DTMsetbool{sr-Latn-ME}{mapzone}{true}
%    \end{macrocode}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the day of month should be
% displayed.
%    \begin{macrocode}
\DTMdefboolkey{sr-Latn-ME}{showdayofmonth}[true]{}
%    \end{macrocode}
% The default is to show the day of month.
%    \begin{macrocode}
\DTMsetbool{sr-Latn-ME}{showdayofmonth}{true}
%    \end{macrocode}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the year should be
% displayed.
%    \begin{macrocode}
\DTMdefboolkey{sr-Latn-ME}{showyear}[true]{}
%    \end{macrocode}
% The default is to show the year.
%    \begin{macrocode}
\DTMsetbool{sr-Latn-ME}{showyear}{true}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Added weekday names.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%    \begin{macrocode}
\DTMnewstyle%
{sr-Latn-ME}% label
{% date style
  \renewcommand*\DTMdisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMsrLatnMEweekdayname{##4}%
   	    \DTMsrLatnMEdowdaysep%
   	  \fi
   	\fi
    \DTMifbool{sr-Latn-ME}{showdayofmonth}
      {\DTMsrLatnMEdayordinal{##3}\DTMsrLatnMEdaymonthsep}%
      {}%
    \DTMifbool{sr-Latn-ME}{monthi}%
      {\DTMsrLatnMEimonthname{##2}}%
      {\DTMsrLatnMEnoimonthname{##2}}%
    \DTMifbool{sr-Latn-ME}{showyear}%
    {%
      \DTMsrLatnMEmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
  \renewcommand*\DTMDisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMsrLatnMEWeekdayname{##4}%
   	    \DTMsrLatnMEdowdaysep%
   	  \fi
   	\fi
    \DTMifbool{sr-Latn-ME}{showdayofmonth}
    {%
      \DTMsrLatnMEdayordinal{##3}\DTMsrLatnMEdaymonthsep%
      \DTMifbool{sr-Latn-ME}{monthi}%
        {\DTMsrLatnMEimonthname{##2}}%
        {\DTMsrLatnMEnoimonthname{##2}}%
    }%
    {%
      \DTMifbool{sr-Latn-ME}{monthi}%
        {\DTMsrLatnMEiMonthname{##2}}%
        {\DTMsrLatnMEnoiMonthname{##2}}%
    }%
    \DTMifbool{sr-Latn-ME}{showyear}%
    {%
      \DTMsrLatnMEmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
}%
{% time style
  \renewcommand*\DTMdisplaytime[3]{%
    \DTMifbool{sr-Latn-ME}{leadingzero}{\DTMtwodigits{##1}}{\number##1}%
    \DTMsrLatnMEtimesep\DTMtwodigits{##2}%
    \ifDTMshowseconds\DTMsrLatnMEtimesep\DTMtwodigits{##3}\fi
  }%
}%
{% zone style
  \DTMresetzones%
  \DTMsrLatnMEzonemaps%
  \renewcommand*{\DTMdisplayzone}[2]{%
    \DTMifbool{sr-Latn-ME}{mapzone}%
    {\DTMusezonemapordefault{##1}{##2}}%
    {%
      \ifnum##1<0
      \else+\fi\DTMtwodigits{##1}%
      \ifDTMshowzoneminutes\DTMsrLatnMEtimesep\DTMtwodigits{##2}\fi
    }%
  }%
}%
{% full style
  \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate%
      \DTMdisplaydate{##1}{##2}{##3}{##4}%
      \DTMsrLatnMEdatetimesep%
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone%
      \DTMsrLatnMEtimezonesep%
      \DTMdisplayzone{##8}{##9}%
    \fi
  }%
  \renewcommand*{\DTMDisplay}[9]{%
    \ifDTMshowdate%
      \DTMDisplaydate{##1}{##2}{##3}{##4}%
      \DTMsrLatnMEdatetimesep%
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone%
      \DTMsrLatnMEtimezonesep%
      \DTMdisplayzone{##8}{##9}%
    \fi
  }%
}%
%    \end{macrocode}
%
%
%\begin{macro}{\DTMsrLatnMEmonthordinal}
% Define the month ordinal format to be used by this style.
%    \begin{macrocode}
   \newcommand*{\DTMsrLatnMEmonthordinal}[1]{%
       \DTMifbool{sr-Latn-ME}{leadingzero}{\DTMtwodigits{#1}}{\number#1}.}%
%    \end{macrocode}
%\end{macro}
%\changes{2.0.0}{2019-11-07}{%
%   Added a switch between multiple numeric month ordinal formats used in
%   Serbian.
%}
% \changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a setting to switch between Arabic, uppercase Roman and lowercase
% smallcaps Roman month format for the "srLatnME-numeric" style.
%    \begin{macrocode}
\DTMdefchoicekey{sr-Latn-ME}{monthord}%
[\@dtm@val\@dtm@nr]{arabic,roman,romanlsc}{%
 \ifcase\@dtm@nr\relax
   \renewcommand*{\DTMsrLatnMEmonthordinal}[1]{%
       \DTMifbool{sr-Latn-ME}{leadingzero}%
         {\DTMtwodigits{##1}}{\number##1}\DTMsrLatnMEdatesep}%
 \or%
   \renewcommand*{\DTMsrLatnMEmonthordinal}[1]{%
    \DTMtexorpdfstring{\protect\DTMserbianordinalROMAN{##1}}%
    {serbianordinalROMAN{##1}}}%
 \or%
   \renewcommand*{\DTMsrLatnMEmonthordinal}[1]{%
    \DTMtexorpdfstring{\textsc{\protect\DTMserbianordinalroman{##1}}}%
    {serbianordinalROMAN{##1}}}%
 \fi
}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Fixed the (previously entirely wrong) numeric date style.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.0}{2019-11-07}{%
%   Added weekday names.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define numeric style.
%    \begin{macrocode}
\DTMnewstyle%
{sr-Latn-ME-numeric}% label
{% date style
  \renewcommand*\DTMdisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMsrLatnMEweekdayname{##4}%
   	    \DTMsrLatnMEdowdaysep%
   	  \fi
   	\fi
    \DTMifbool{sr-Latn-ME}{showdayofmonth}%
    {\DTMsrLatnMEdayordinal{##3}\DTMsrLatnMEdaymonthsep}%
    {}%
    \DTMsrLatnMEmonthordinal{##2}%
    \DTMifbool{sr-Latn-ME}{showyear}%
    {%
      \DTMsrLatnMEmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
  \renewcommand*\DTMDisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMsrLatnMEWeekdayname{##4}%
   	    \DTMsrLatnMEdowdaysep%
   	  \fi
   	\fi
    \DTMifbool{sr-Latn-ME}{showdayofmonth}%
    {\DTMsrLatnMEdayordinal{##3}\DTMsrLatnMEdaymonthsep}%
    {}%
    \DTMsrLatnMEmonthordinal{##2}%
    \DTMifbool{sr-Latn-ME}{showyear}%
    {%
      \DTMsrLatnMEmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
}%
{% time style
  \renewcommand*\DTMdisplaytime[3]{%
    \DTMifbool{sr-Latn-ME}{leadingzero}{\DTMtwodigits{##1}}{\number##1}%
    \DTMsrLatnMEtimesep\DTMtwodigits{##2}%
    \ifDTMshowseconds\DTMsrLatnMEtimesep\DTMtwodigits{##3}\fi
  }%
}%
{% zone style
  \DTMresetzones%
  \DTMsrLatnMEzonemaps%
  \renewcommand*{\DTMdisplayzone}[2]{%
    \DTMifbool{sr-Latn-ME}{mapzone}%
    {\DTMusezonemapordefault{##1}{##2}}%
    {%
      \ifnum##1<0
      \else+\fi\DTMtwodigits{##1}%
      \ifDTMshowzoneminutes\DTMsrLatnMEtimesep\DTMtwodigits{##2}\fi
    }%
  }%
}%
{% full style
  \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate%
      \DTMdisplaydate{##1}{##2}{##3}{##4}%
      \DTMsrLatnMEdatetimesep%
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone%
      \DTMsrLatnMEtimezonesep%
      \DTMdisplayzone{##8}{##9}%
    \fi
  }%
  \renewcommand*{\DTMDisplay}{\DTMdisplay}%
}
%    \end{macrocode}
%
%\begin{macro}{\DTMsr-Latn-MEzonemaps}
% The time zone mappings are set through this command, which can be
% redefined if extra mappings are required or mappings need to be
% removed.
%\changes{2.0.1}{2019-11-11}{Replaced wrong parameter for zonemapping.}
%    \begin{macrocode}
\newcommand*{\DTMsrLatnMEzonemaps}{%
  \DTMdefzonemap{01}{00}{CET}%
  \DTMdefzonemap{02}{00}{CEST}%
}
%    \end{macrocode}
%\end{macro}
% Switch style according to the \opt{useregional} setting.
%    \begin{macrocode}
\DTMifcaseregional%
{}% do nothing
{\DTMsetstyle{sr-Latn-ME}}%
{\DTMsetstyle{sr-Latn-ME-numeric}}%
%    \end{macrocode}
% Redefine \cs{dateserbian} (or \cs{date}\meta{dialect}) to prevent
% \sty{babel} from resetting \cs{today}. (For this to work,
% \sty{babel} must already have been loaded if it's required.)
%\changes{1.1}{2019-09-14}{removed spurious space}
%\changes{2.0.0}{2019-11-07}{%
%   Added regions.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%    \begin{macrocode}
\ifcsundef{date\CurrentTrackedDialect}
{%
  \ifundef\dateserbian%
  {% do nothing
  }%
  {%
    \def\dateserbian{%
      \DTMifcaseregional%
      {}% do nothing
      {\DTMsetstyle{sr-Latn-ME}}%
      {\DTMsetstyle{sr-Latn-ME-numeric}}%
    }%
  }%
}%
{%
  \csdef{date\CurrentTrackedDialect}{%
    \DTMifcaseregional%
    {}% do nothing
%    \end{macrocode}
%\changes{2.0.1}{2019-11-11}{Fixed non-regional variant for regional code.}
%\changes{2.1.0}{2019-11-22}{Reverted wrong regional variant changes.}
%    \begin{macrocode}
      {\DTMsetstyle{sr-Latn-ME}}%
      {\DTMsetstyle{sr-Latn-ME-numeric}}%
  }%
}%
%    \end{macrocode}
%
%\iffalse
%    \begin{macrocode}
%</datetime2-sr-Latn-ME.ldf>
%    \end{macrocode}
%\fi
%
%\iffalse
%    \begin{macrocode}
%<*datetime2-sr-Latn-BA.ldf>
%    \end{macrocode}
%\fi
%
%\subsection{Serbian \sty{sr-Latn-BA} Code
%   (\texttt{datetime2-sr-Latn-BA.ldf})}
%\changes{1.0}{2015-03-24}{Initial release}
%\changes{2.0.0}{2019-11-07}{%
%   Added regions, all settings made available to regions so all changes can be
%   region-specific.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%    \begin{macrocode}
\ProvidesDateTimeModule{sr-Latn-BA}[2019/11/22 v2.1.0]
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   All localization strings loaded from base module.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% Load appropriate regionless Serbian module.
%    \begin{macrocode}
\RequireDateTimeModule{serbian}
%    \end{macrocode}
%
%
%
%\subsubsection{Defining the \sty{sr-Latn-BA} style}
%
% \changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% \changes{2.0.1}{2019-11-11}{Fixed region name error.}
% Allow the user a way of configuring the "sr-Latn-BA" and
% "sr-Latn-BA-numeric" styles by providing macros for various format
% elements.
%
% This doesn't use the package-wide separators such as \cs{dtm@datetimesep} in
% case other date formats are also required.
%
%\begin{macro}{\DTMsrLatnBAdowdaysep}
% The separator between weekday and day.
%    \begin{macrocode}
\newcommand*{\DTMsrLatnBAdowdaysep}{,\space}
%    \end{macrocode}
%\end{macro}
%
%
%\begin{macro}{\DTMsrLatnBAdaymonthsep}
% The separator between the day and month for the text format.
%    \begin{macrocode}
\newcommand*{\DTMsrLatnBAdaymonthsep}{%
  \DTMtexorpdfstring{\protect~}{\space}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrLatnBAmonthyearsep}
% The separator between the month and year for the text format.
%    \begin{macrocode}
\newcommand*{\DTMsrLatnBAmonthyearsep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrLatnBAdatetimesep}
% The separator between the date and time blocks in the full format (either
% text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMsrLatnBAdatetimesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrLatnBAtimezonesep}
% The separator between the time and zone blocks in the full format (either
% text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMsrLatnBAtimezonesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrLatnBAdatesep}
% The separator for the numeric date format.
%    \begin{macrocode}
\newcommand*{\DTMsrLatnBAdatesep}{.}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrLatnBAtimesep}
% The separator for the numeric time format.
%    \begin{macrocode}
\newcommand*{\DTMsrLatnBAtimesep}{.}
%    \end{macrocode}
%\end{macro}
%
%Provide keys that can be used in \cs{DTMlangsetup} to set these separators.
%    \begin{macrocode}
\DTMdefkey{sr-Latn-BA}{dowdaysep}%
    {\renewcommand*{\DTMsr-Latn-BAdowdaysep}{#1}}
\DTMdefkey{sr-Latn-BA}{daymonthsep}%
    {\renewcommand*{\DTMsr-Latn-BAdaymonthsep}{#1}}
\DTMdefkey{sr-Latn-BA}{monthyearsep}%
    {\renewcommand*{\DTMsr-Latn-BAmonthyearsep}{#1}}
\DTMdefkey{sr-Latn-BA}{datetimesep}%
    {\renewcommand*{\DTMsr-Latn-BAdatetimesep}{#1}}
\DTMdefkey{sr-Latn-BA}{timezonesep}%
    {\renewcommand*{\DTMsr-Latn-BAtimezonesep}{#1}}
\DTMdefkey{sr-Latn-BA}{datesep}%
    {\renewcommand*{\DTMsr-Latn-BAdatesep}{#1}}
\DTMdefkey{sr-Latn-BA}{timesep}%
    {\renewcommand*{\DTMsr-Latn-BAtimesep}{#1}}
%    \end{macrocode}
%
%\subsubsection{Switches and settings}
%
%\changes{2.0.0}{2019-11-07}{%
%   Added weekday names.
%}
    %\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\begin{macro}{\DTMsrLatnBAweekdayname}
% Define the weekday name, lowercase.
%    \begin{macrocode}
\newcommand*{\DTMsrLatnBAweekdayname}%
{\DTMserbianlatijweekdayname}
%    \end{macrocode}
%\end{macro}

%\begin{macro}{\DTMsrLatnBAweekdayname}
% Define the weekday name, capitalized.
%    \begin{macrocode}
\newcommand*{\DTMsrLatnBAWeekdayname}%
    {\DTMserbianlatijWeekdayname}
%    \end{macrocode}
%\end{macro}
%
% Provide a way to switch between Ekavian and Ijekavian pronunciation.
%\changes{2.0.0}{2019-11-07}{%
%   Added a way to switch between Ekavian and Ijekavian pronunciation.
%}
    %\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%
%    \begin{macrocode}
\DTMdefchoicekey{sr-Latn-BA}%
    {pronunciation}[\@dtm@val\@dtm@nr]{ekavian,ijekavian}{%
  \ifcase\@dtm@nr\relax
    \renewcommand*{\DTMsrLatnBAweekdayname}%
        {\DTMserbianlatekweekdayname}%
    \renewcommand*{\DTMsrLatnBAWeekdayname}%
        {\DTMserbianlatekWeekdayname}%
  \or%
    \renewcommand*{\DTMsrLatnBAweekdayname}%
        {\DTMserbianlatijweekdayname}%
    \renewcommand*{\DTMsrLatnBAWeekdayname}
        {\DTMserbianlatijWeekdayname}%
  \fi
}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Added a way to switch June, July alternate spellings.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that can switch between (jun, jul) and (juni, juli)
% month spellings.
%    \begin{macrocode}
\DTMdefboolkey{sr-Latn-BA}{monthi}[true]{}
%    \end{macrocode}
% The default is without the "i" suffix.
%    \begin{macrocode}
\DTMsetbool{sr-Latn-BA}{monthi}{false}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Added a switch for adding leading zeroes in day and month ordinals.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the day and month ordinals should
% have leading zeroes.
%    \begin{macrocode}
\DTMdefboolkey{sr-Latn-BA}{leadingzero}[true]{}
%    \end{macrocode}
% The default is to omit the leading zero.
%    \begin{macrocode}
\DTMsetbool{sr-Latn-BA}{leadingzero}{false}
%    \end{macrocode}
%
%\begin{macro}{\DTMsrLatnBAdayordinal}
% Define the day ordinal format to be used by this style.
%    \begin{macrocode}
   \newcommand*{\DTMsrLatnBAdayordinal}[1]{%
       \DTMifbool{sr-Latn-BA}{leadingzero}%
       {\DTMtwodigits{#1}}%
       {\number#1}\DTMsrLatnBAdatesep}%
%    \end{macrocode}
%\end{macro}
%
%\changes{2.1.0}{2019-11-22}{%
%   Removed year ordinal macro since year ordinals are handled differently now.
%}
%\changes{2.0.0}{2019-11-07}{%
%   Removed the option to switch between writing systems, since that is
%   accomplished by using different regions or regionless styles ("serbian" and
%   "serbianc" for example).
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define the month names.
%
%\begin{macro}{\DTMsrLatnBAnoimonthname}
%    \begin{macrocode}
\newcommand*{\DTMsrLatnBAnoimonthname}{\DTMserbianlatnoimonthname}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrLatnBAnoiMonthname}
%    \begin{macrocode}
\newcommand*{\DTMsrLatnBAnoiMonthname}{\DTMserbianlatnoiMonthname}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrLatnBAimonthname}
%    \begin{macrocode}
\newcommand*{\DTMsrLatnBAimonthname}{\DTMserbianlatimonthname}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrLatnBAiMonthname}
%    \begin{macrocode}
\newcommand*{\DTMsrLatnBAiMonthname}{\DTMserbianlatiMonthname}
%    \end{macrocode}
%\end{macro}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the time zone mappings
% should be used.
%    \begin{macrocode}
\DTMdefboolkey{sr-Latn-BA}{mapzone}[true]{}
%    \end{macrocode}
% The default is to use mappings.
%    \begin{macrocode}
\DTMsetbool{sr-Latn-BA}{mapzone}{true}
%    \end{macrocode}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the day of month should be
% displayed.
%    \begin{macrocode}
\DTMdefboolkey{sr-Latn-BA}{showdayofmonth}[true]{}
%    \end{macrocode}
% The default is to show the day of month.
%    \begin{macrocode}
\DTMsetbool{sr-Latn-BA}{showdayofmonth}{true}
%    \end{macrocode}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the year should be
% displayed.
%    \begin{macrocode}
\DTMdefboolkey{sr-Latn-BA}{showyear}[true]{}
%    \end{macrocode}
% The default is to show the year.
%    \begin{macrocode}
\DTMsetbool{sr-Latn-BA}{showyear}{true}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Added weekday names.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%    \begin{macrocode}
\DTMnewstyle%
{sr-Latn-BA}% label
{% date style
  \renewcommand*\DTMdisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMsrLatnBAweekdayname{##4}%
   	    \DTMsrLatnBAdowdaysep%
   	  \fi
   	\fi
    \DTMifbool{sr-Latn-BA}{showdayofmonth}
      {\DTMsrLatnBAdayordinal{##3}\DTMsrLatnBAdaymonthsep}%
      {}%
    \DTMifbool{sr-Latn-BA}{monthi}%
      {\DTMsrLatnBAimonthname{##2}}%
      {\DTMsrLatnBAnoimonthname{##2}}%
    \DTMifbool{sr-Latn-BA}{showyear}%
    {%
      \DTMsrLatnBAmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
  \renewcommand*\DTMDisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMsrLatnBAWeekdayname{##4}%
   	    \DTMsrLatnBAdowdaysep%
   	  \fi
   	\fi
    \DTMifbool{sr-Latn-BA}{showdayofmonth}
    {%
      \DTMsrLatnBAdayordinal{##3}\DTMsrLatnBAdaymonthsep%
      \DTMifbool{sr-Latn-BA}{monthi}%
        {\DTMsrLatnBAimonthname{##2}}%
        {\DTMsrLatnBAnoimonthname{##2}}%
    }%
    {%
      \DTMifbool{sr-Latn-BA}{monthi}%
        {\DTMsrLatnBAiMonthname{##2}}%
        {\DTMsrLatnBAnoiMonthname{##2}}%
    }%
    \DTMifbool{sr-Latn-BA}{showyear}%
    {%
      \DTMsrLatnBAmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
}%
{% time style
  \renewcommand*\DTMdisplaytime[3]{%
    \DTMifbool{sr-Latn-BA}{leadingzero}{\DTMtwodigits{##1}}{\number##1}%
    \DTMsrLatnBAtimesep\DTMtwodigits{##2}%
    \ifDTMshowseconds\DTMsrLatnBAtimesep\DTMtwodigits{##3}\fi
  }%
}%
{% zone style
  \DTMresetzones%
  \DTMsrLatnBAzonemaps%
  \renewcommand*{\DTMdisplayzone}[2]{%
    \DTMifbool{sr-Latn-BA}{mapzone}%
    {\DTMusezonemapordefault{##1}{##2}}%
    {%
      \ifnum##1<0
      \else+\fi\DTMtwodigits{##1}%
      \ifDTMshowzoneminutes\DTMsrLatnBAtimesep\DTMtwodigits{##2}\fi
    }%
  }%
}%
{% full style
  \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate%
      \DTMdisplaydate{##1}{##2}{##3}{##4}%
      \DTMsrLatnBAdatetimesep%
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone%
      \DTMsrLatnBAtimezonesep%
      \DTMdisplayzone{##8}{##9}%
    \fi
  }%
  \renewcommand*{\DTMDisplay}[9]{%
    \ifDTMshowdate%
      \DTMDisplaydate{##1}{##2}{##3}{##4}%
      \DTMsrLatnBAdatetimesep%
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone%
      \DTMsrLatnBAtimezonesep%
      \DTMdisplayzone{##8}{##9}%
    \fi
  }%
}%
%    \end{macrocode}
%
%
%\begin{macro}{\DTMsrLatnBAmonthordinal}
% Define the month ordinal format to be used by this style.
%    \begin{macrocode}
   \newcommand*{\DTMsrLatnBAmonthordinal}[1]{%
       \DTMifbool{sr-Latn-BA}{leadingzero}{\DTMtwodigits{#1}}{\number#1}.}%
%    \end{macrocode}
%\end{macro}
%\changes{2.0.0}{2019-11-07}{%
%   Added a switch between multiple numeric month ordinal formats used in
%   Serbian.
%}
% \changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a setting to switch between Arabic, uppercase Roman and lowercase
% smallcaps Roman month format for the "srLatnBA-numeric" style.
%    \begin{macrocode}
\DTMdefchoicekey{sr-Latn-BA}{monthord}%
[\@dtm@val\@dtm@nr]{arabic,roman,romanlsc}{%
 \ifcase\@dtm@nr\relax
   \renewcommand*{\DTMsrLatnBAmonthordinal}[1]{%
       \DTMifbool{sr-Latn-BA}{leadingzero}%
         {\DTMtwodigits{##1}}{\number##1}\DTMsrLatnBAdatesep}%
 \or%
   \renewcommand*{\DTMsrLatnBAmonthordinal}[1]{%
    \DTMtexorpdfstring{\protect\DTMserbianordinalROMAN{##1}}%
    {serbianordinalROMAN{##1}}}%
 \or%
   \renewcommand*{\DTMsrLatnBAmonthordinal}[1]{%
    \DTMtexorpdfstring{\textsc{\protect\DTMserbianordinalroman{##1}}}%
    {serbianordinalROMAN{##1}}}%
 \fi
}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Fixed the (previously entirely wrong) numeric date style.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.0}{2019-11-07}{%
%   Added weekday names.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define numeric style.
%    \begin{macrocode}
\DTMnewstyle%
{sr-Latn-BA-numeric}% label
{% date style
  \renewcommand*\DTMdisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMsrLatnBAweekdayname{##4}%
   	    \DTMsrLatnBAdowdaysep%
   	  \fi
   	\fi
    \DTMifbool{sr-Latn-BA}{showdayofmonth}%
    {\DTMsrLatnBAdayordinal{##3}\DTMsrLatnBAdaymonthsep}%
    {}%
    \DTMsrLatnBAmonthordinal{##2}%
    \DTMifbool{sr-Latn-BA}{showyear}%
    {%
      \DTMsrLatnBAmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
  \renewcommand*\DTMDisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMsrLatnBAWeekdayname{##4}%
   	    \DTMsrLatnBAdowdaysep%
   	  \fi
   	\fi
    \DTMifbool{sr-Latn-BA}{showdayofmonth}%
    {\DTMsrLatnBAdayordinal{##3}\DTMsrLatnBAdaymonthsep}%
    {}%
    \DTMsrLatnBAmonthordinal{##2}%
    \DTMifbool{sr-Latn-BA}{showyear}%
    {%
      \DTMsrLatnBAmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
}%
{% time style
  \renewcommand*\DTMdisplaytime[3]{%
    \DTMifbool{sr-Latn-BA}{leadingzero}{\DTMtwodigits{##1}}{\number##1}%
    \DTMsrLatnBAtimesep\DTMtwodigits{##2}%
    \ifDTMshowseconds\DTMsrLatnBAtimesep\DTMtwodigits{##3}\fi
  }%
}%
{% zone style
  \DTMresetzones%
  \DTMsrLatnBAzonemaps%
  \renewcommand*{\DTMdisplayzone}[2]{%
    \DTMifbool{sr-Latn-BA}{mapzone}%
    {\DTMusezonemapordefault{##1}{##2}}%
    {%
      \ifnum##1<0
      \else+\fi\DTMtwodigits{##1}%
      \ifDTMshowzoneminutes\DTMsrLatnBAtimesep\DTMtwodigits{##2}\fi
    }%
  }%
}%
{% full style
  \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate%
      \DTMdisplaydate{##1}{##2}{##3}{##4}%
      \DTMsrLatnBAdatetimesep%
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone%
      \DTMsrLatnBAtimezonesep%
      \DTMdisplayzone{##8}{##9}%
    \fi
  }%
  \renewcommand*{\DTMDisplay}{\DTMdisplay}%
}
%    \end{macrocode}
%
%\begin{macro}{\DTMsr-Latn-BAzonemaps}
% The time zone mappings are set through this command, which can be
% redefined if extra mappings are required or mappings need to be
% removed.
%\changes{2.0.1}{2019-11-11}{Replaced wrong parameter for zonemapping.}
%    \begin{macrocode}
\newcommand*{\DTMsrLatnBAzonemaps}{%
  \DTMdefzonemap{01}{00}{CET}%
  \DTMdefzonemap{02}{00}{CEST}%
}
%    \end{macrocode}
%\end{macro}
% Switch style according to the \opt{useregional} setting.
%    \begin{macrocode}
\DTMifcaseregional%
{}% do nothing
{\DTMsetstyle{sr-Latn-BA}}%
{\DTMsetstyle{sr-Latn-BA-numeric}}%
%    \end{macrocode}
% Redefine \cs{dateserbian} (or \cs{date}\meta{dialect}) to prevent
% \sty{babel} from resetting \cs{today}. (For this to work,
% \sty{babel} must already have been loaded if it's required.)
%\changes{1.1}{2019-09-14}{removed spurious space}
%\changes{2.0.0}{2019-11-07}{%
%   Added regions.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%    \begin{macrocode}
\ifcsundef{date\CurrentTrackedDialect}
{%
  \ifundef\dateserbian%
  {% do nothing
  }%
  {%
    \def\dateserbian{%
      \DTMifcaseregional%
      {}% do nothing
      {\DTMsetstyle{sr-Latn-BA}}%
      {\DTMsetstyle{sr-Latn-BA-numeric}}%
    }%
  }%
}%
{%
  \csdef{date\CurrentTrackedDialect}{%
    \DTMifcaseregional%
    {}% do nothing
%    \end{macrocode}
%\changes{2.0.1}{2019-11-11}{Fixed non-regional variant for regional code.}
%\changes{2.1.0}{2019-11-22}{Reverted wrong regional variant changes.}
%    \begin{macrocode}
      {\DTMsetstyle{sr-Latn-BA}}%
      {\DTMsetstyle{sr-Latn-BA-numeric}}%
  }%
}%
%    \end{macrocode}
%
%\iffalse
%    \begin{macrocode}
%</datetime2-sr-Latn-BA.ldf>
%    \end{macrocode}
%\fi
%
%\iffalse
%    \begin{macrocode}
%<*datetime2-serbianc.ldf>
%    \end{macrocode}
%\fi
%
%\subsection{Serbian \sty{serbianc} Code
%   (\texttt{datetime2-serbianc.ldf})}
%\changes{1.0}{2015-03-24}{Initial release}
%\changes{2.0.0}{2019-11-07}{%
%   Added regions, all settings made available to regions so all changes can be
%   region-specific.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%    \begin{macrocode}
\ProvidesDateTimeModule{serbianc}[2019/11/22 v2.1.0]
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   All localization strings loaded from base module.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% Load base Serbian module.
%    \begin{macrocode}
\RequireDateTimeModule{serbian-base}
%    \end{macrocode}
%
%
%
%\subsubsection{Defining the \sty{serbianc} style}
%
% \changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% \changes{2.0.1}{2019-11-11}{Fixed region name error.}
% Allow the user a way of configuring the "serbianc" and
% "serbianc-numeric" styles by providing macros for various format
% elements.
%
% This doesn't use the package-wide separators such as \cs{dtm@datetimesep} in
% case other date formats are also required.
%
%\begin{macro}{\DTMserbiancdowdaysep}
% The separator between weekday and day.
%    \begin{macrocode}
\newcommand*{\DTMserbiancdowdaysep}{,\space}
%    \end{macrocode}
%\end{macro}
%
%
%\begin{macro}{\DTMserbiancdaymonthsep}
% The separator between the day and month for the text format.
%    \begin{macrocode}
\newcommand*{\DTMserbiancdaymonthsep}{%
  \DTMtexorpdfstring{\protect~}{\space}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMserbiancmonthyearsep}
% The separator between the month and year for the text format.
%    \begin{macrocode}
\newcommand*{\DTMserbiancmonthyearsep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMserbiancdatetimesep}
% The separator between the date and time blocks in the full format (either
% text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMserbiancdatetimesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMserbianctimezonesep}
% The separator between the time and zone blocks in the full format (either
% text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMserbianctimezonesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMserbiancdatesep}
% The separator for the numeric date format.
%    \begin{macrocode}
\newcommand*{\DTMserbiancdatesep}{.}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMserbianctimesep}
% The separator for the numeric time format.
%    \begin{macrocode}
\newcommand*{\DTMserbianctimesep}{.}
%    \end{macrocode}
%\end{macro}
%
%Provide keys that can be used in \cs{DTMlangsetup} to set these separators.
%    \begin{macrocode}
\DTMdefkey{serbianc}{dowdaysep}%
    {\renewcommand*{\DTMserbiancdowdaysep}{#1}}
\DTMdefkey{serbianc}{daymonthsep}%
    {\renewcommand*{\DTMserbiancdaymonthsep}{#1}}
\DTMdefkey{serbianc}{monthyearsep}%
    {\renewcommand*{\DTMserbiancmonthyearsep}{#1}}
\DTMdefkey{serbianc}{datetimesep}%
    {\renewcommand*{\DTMserbiancdatetimesep}{#1}}
\DTMdefkey{serbianc}{timezonesep}%
    {\renewcommand*{\DTMserbianctimezonesep}{#1}}
\DTMdefkey{serbianc}{datesep}%
    {\renewcommand*{\DTMserbiancdatesep}{#1}}
\DTMdefkey{serbianc}{timesep}%
    {\renewcommand*{\DTMserbianctimesep}{#1}}
%    \end{macrocode}
%
%\subsubsection{Switches and settings}
%
%\changes{2.0.0}{2019-11-07}{%
%   Added weekday names.
%}
    %\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\begin{macro}{\DTMserbiancweekdayname}
% Define the weekday name, lowercase.
%    \begin{macrocode}
\newcommand*{\DTMserbiancweekdayname}%
{\DTMserbiancyrekweekdayname}
%    \end{macrocode}
%\end{macro}

%\begin{macro}{\DTMserbiancweekdayname}
% Define the weekday name, capitalized.
%    \begin{macrocode}
\newcommand*{\DTMserbiancWeekdayname}%
    {\DTMserbiancyrekWeekdayname}
%    \end{macrocode}
%\end{macro}
%
% Provide a way to switch between Ekavian and Ijekavian pronunciation.
%\changes{2.0.0}{2019-11-07}{%
%   Added a way to switch between Ekavian and Ijekavian pronunciation.
%}
    %\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%
%    \begin{macrocode}
\DTMdefchoicekey{serbianc}%
    {pronunciation}[\@dtm@val\@dtm@nr]{ekavian,ijekavian}{%
  \ifcase\@dtm@nr\relax
    \renewcommand*{\DTMserbiancweekdayname}%
        {\DTMserbiancyrekweekdayname}%
    \renewcommand*{\DTMserbiancWeekdayname}%
        {\DTMserbiancyrekWeekdayname}%
  \or%
    \renewcommand*{\DTMserbiancweekdayname}%
        {\DTMserbiancyrijweekdayname}%
    \renewcommand*{\DTMserbiancWeekdayname}
        {\DTMserbiancyrijWeekdayname}%
  \fi
}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Added a way to switch June, July alternate spellings.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that can switch between (jun, jul) and (juni, juli)
% month spellings.
%    \begin{macrocode}
\DTMdefboolkey{serbianc}{monthi}[true]{}
%    \end{macrocode}
% The default is without the "i" suffix.
%    \begin{macrocode}
\DTMsetbool{serbianc}{monthi}{false}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Added a switch for adding leading zeroes in day and month ordinals.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the day and month ordinals should
% have leading zeroes.
%    \begin{macrocode}
\DTMdefboolkey{serbianc}{leadingzero}[true]{}
%    \end{macrocode}
% The default is to omit the leading zero.
%    \begin{macrocode}
\DTMsetbool{serbianc}{leadingzero}{false}
%    \end{macrocode}
%
%\begin{macro}{\DTMserbiancdayordinal}
% Define the day ordinal format to be used by this style.
%    \begin{macrocode}
   \newcommand*{\DTMserbiancdayordinal}[1]{%
       \DTMifbool{serbianc}{leadingzero}%
       {\DTMtwodigits{#1}}%
       {\number#1}\DTMserbiancdatesep}%
%    \end{macrocode}
%\end{macro}
%
%\changes{2.1.0}{2019-11-22}{%
%   Removed year ordinal macro since year ordinals are handled differently now.
%}
%\changes{2.0.0}{2019-11-07}{%
%   Removed the option to switch between writing systems, since that is
%   accomplished by using different regions or regionless styles ("serbian" and
%   "serbianc" for example).
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define the month names.
%
%\begin{macro}{\DTMserbiancnoimonthname}
%    \begin{macrocode}
\newcommand*{\DTMserbiancnoimonthname}{\DTMserbiancyrnoimonthname}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMserbiancnoiMonthname}
%    \begin{macrocode}
\newcommand*{\DTMserbiancnoiMonthname}{\DTMserbiancyrnoiMonthname}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMserbiancimonthname}
%    \begin{macrocode}
\newcommand*{\DTMserbiancimonthname}{\DTMserbiancyrimonthname}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMserbianciMonthname}
%    \begin{macrocode}
\newcommand*{\DTMserbianciMonthname}{\DTMserbiancyriMonthname}
%    \end{macrocode}
%\end{macro}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the time zone mappings
% should be used.
%    \begin{macrocode}
\DTMdefboolkey{serbianc}{mapzone}[true]{}
%    \end{macrocode}
% The default is to use mappings.
%    \begin{macrocode}
\DTMsetbool{serbianc}{mapzone}{true}
%    \end{macrocode}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the day of month should be
% displayed.
%    \begin{macrocode}
\DTMdefboolkey{serbianc}{showdayofmonth}[true]{}
%    \end{macrocode}
% The default is to show the day of month.
%    \begin{macrocode}
\DTMsetbool{serbianc}{showdayofmonth}{true}
%    \end{macrocode}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the year should be
% displayed.
%    \begin{macrocode}
\DTMdefboolkey{serbianc}{showyear}[true]{}
%    \end{macrocode}
% The default is to show the year.
%    \begin{macrocode}
\DTMsetbool{serbianc}{showyear}{true}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Added weekday names.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%    \begin{macrocode}
\DTMnewstyle%
{serbianc}% label
{% date style
  \renewcommand*\DTMdisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMserbiancweekdayname{##4}%
   	    \DTMserbiancdowdaysep%
   	  \fi
   	\fi
    \DTMifbool{serbianc}{showdayofmonth}
      {\DTMserbiancdayordinal{##3}\DTMserbiancdaymonthsep}%
      {}%
    \DTMifbool{serbianc}{monthi}%
      {\DTMserbiancimonthname{##2}}%
      {\DTMserbiancnoimonthname{##2}}%
    \DTMifbool{serbianc}{showyear}%
    {%
      \DTMserbiancmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
  \renewcommand*\DTMDisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMserbiancWeekdayname{##4}%
   	    \DTMserbiancdowdaysep%
   	  \fi
   	\fi
    \DTMifbool{serbianc}{showdayofmonth}
    {%
      \DTMserbiancdayordinal{##3}\DTMserbiancdaymonthsep%
      \DTMifbool{serbianc}{monthi}%
        {\DTMserbiancimonthname{##2}}%
        {\DTMserbiancnoimonthname{##2}}%
    }%
    {%
      \DTMifbool{serbianc}{monthi}%
        {\DTMserbianciMonthname{##2}}%
        {\DTMserbiancnoiMonthname{##2}}%
    }%
    \DTMifbool{serbianc}{showyear}%
    {%
      \DTMserbiancmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
}%
{% time style
  \renewcommand*\DTMdisplaytime[3]{%
    \DTMifbool{serbianc}{leadingzero}{\DTMtwodigits{##1}}{\number##1}%
    \DTMserbianctimesep\DTMtwodigits{##2}%
    \ifDTMshowseconds\DTMserbianctimesep\DTMtwodigits{##3}\fi
  }%
}%
{% zone style
  \DTMresetzones%
  \DTMserbianczonemaps%
  \renewcommand*{\DTMdisplayzone}[2]{%
    \DTMifbool{serbianc}{mapzone}%
    {\DTMusezonemapordefault{##1}{##2}}%
    {%
      \ifnum##1<0
      \else+\fi\DTMtwodigits{##1}%
      \ifDTMshowzoneminutes\DTMserbianctimesep\DTMtwodigits{##2}\fi
    }%
  }%
}%
{% full style
  \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate%
      \DTMdisplaydate{##1}{##2}{##3}{##4}%
      \DTMserbiancdatetimesep%
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone%
      \DTMserbianctimezonesep%
      \DTMdisplayzone{##8}{##9}%
    \fi
  }%
  \renewcommand*{\DTMDisplay}[9]{%
    \ifDTMshowdate%
      \DTMDisplaydate{##1}{##2}{##3}{##4}%
      \DTMserbiancdatetimesep%
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone%
      \DTMserbianctimezonesep%
      \DTMdisplayzone{##8}{##9}%
    \fi
  }%
}%
%    \end{macrocode}
%
%
%\begin{macro}{\DTMserbiancmonthordinal}
% Define the month ordinal format to be used by this style.
%    \begin{macrocode}
   \newcommand*{\DTMserbiancmonthordinal}[1]{%
       \DTMifbool{serbianc}{leadingzero}{\DTMtwodigits{#1}}{\number#1}.}%
%    \end{macrocode}
%\end{macro}
%\changes{2.0.0}{2019-11-07}{%
%   Added a switch between multiple numeric month ordinal formats used in
%   Serbian.
%}
% \changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a setting to switch between Arabic, uppercase Roman and lowercase
% smallcaps Roman month format for the "serbianc-numeric" style.
%    \begin{macrocode}
\DTMdefchoicekey{serbianc}{monthord}%
[\@dtm@val\@dtm@nr]{arabic,roman,romanlsc}{%
 \ifcase\@dtm@nr\relax
   \renewcommand*{\DTMserbiancmonthordinal}[1]{%
       \DTMifbool{serbianc}{leadingzero}%
         {\DTMtwodigits{##1}}{\number##1}\DTMserbiancdatesep}%
 \or%
   \renewcommand*{\DTMserbiancmonthordinal}[1]{%
    \DTMtexorpdfstring{\protect\DTMserbianordinalROMAN{##1}}%
    {serbianordinalROMAN{##1}}}%
 \or%
   \renewcommand*{\DTMserbiancmonthordinal}[1]{%
    \DTMtexorpdfstring{\textsc{\protect\DTMserbianordinalroman{##1}}}%
    {serbianordinalROMAN{##1}}}%
 \fi
}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Fixed the (previously entirely wrong) numeric date style.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.0}{2019-11-07}{%
%   Added weekday names.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define numeric style.
%    \begin{macrocode}
\DTMnewstyle%
{serbianc-numeric}% label
{% date style
  \renewcommand*\DTMdisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMserbiancweekdayname{##4}%
   	    \DTMserbiancdowdaysep%
   	  \fi
   	\fi
    \DTMifbool{serbianc}{showdayofmonth}%
    {\DTMserbiancdayordinal{##3}\DTMserbiancdaymonthsep}%
    {}%
    \DTMserbiancmonthordinal{##2}%
    \DTMifbool{serbianc}{showyear}%
    {%
      \DTMserbiancmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
  \renewcommand*\DTMDisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMserbiancWeekdayname{##4}%
   	    \DTMserbiancdowdaysep%
   	  \fi
   	\fi
    \DTMifbool{serbianc}{showdayofmonth}%
    {\DTMserbiancdayordinal{##3}\DTMserbiancdaymonthsep}%
    {}%
    \DTMserbiancmonthordinal{##2}%
    \DTMifbool{serbianc}{showyear}%
    {%
      \DTMserbiancmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
}%
{% time style
  \renewcommand*\DTMdisplaytime[3]{%
    \DTMifbool{serbianc}{leadingzero}{\DTMtwodigits{##1}}{\number##1}%
    \DTMserbianctimesep\DTMtwodigits{##2}%
    \ifDTMshowseconds\DTMserbianctimesep\DTMtwodigits{##3}\fi
  }%
}%
{% zone style
  \DTMresetzones%
  \DTMserbianczonemaps%
  \renewcommand*{\DTMdisplayzone}[2]{%
    \DTMifbool{serbianc}{mapzone}%
    {\DTMusezonemapordefault{##1}{##2}}%
    {%
      \ifnum##1<0
      \else+\fi\DTMtwodigits{##1}%
      \ifDTMshowzoneminutes\DTMserbianctimesep\DTMtwodigits{##2}\fi
    }%
  }%
}%
{% full style
  \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate%
      \DTMdisplaydate{##1}{##2}{##3}{##4}%
      \DTMserbiancdatetimesep%
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone%
      \DTMserbianctimezonesep%
      \DTMdisplayzone{##8}{##9}%
    \fi
  }%
  \renewcommand*{\DTMDisplay}{\DTMdisplay}%
}
%    \end{macrocode}
%
%\begin{macro}{\DTMserbianczonemaps}
% The time zone mappings are set through this command, which can be
% redefined if extra mappings are required or mappings need to be
% removed.
%\changes{2.0.1}{2019-11-11}{Replaced wrong parameter for zonemapping.}
%    \begin{macrocode}
\newcommand*{\DTMserbianczonemaps}{%
  \DTMdefzonemap{01}{00}{CET}%
  \DTMdefzonemap{02}{00}{CEST}%
}
%    \end{macrocode}
%\end{macro}
% Switch style according to the \opt{useregional} setting.
%    \begin{macrocode}
\DTMifcaseregional%
{}% do nothing
{\DTMsetstyle{serbianc}}%
{\DTMsetstyle{serbianc-numeric}}%
%    \end{macrocode}
% Redefine \cs{dateserbianc} (or \cs{date}\meta{dialect}) to prevent
% \sty{babel} from resetting \cs{today}. (For this to work,
% \sty{babel} must already have been loaded if it's required.)
%\changes{1.1}{2019-09-14}{removed spurious space}
%\changes{2.0.0}{2019-11-07}{%
%   Added regions.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%    \begin{macrocode}
\ifcsundef{date\CurrentTrackedDialect}
{%
  \ifundef\dateserbianc%
  {% do nothing
  }%
  {%
    \def\dateserbianc{%
      \DTMifcaseregional%
      {}% do nothing
      {\DTMsetstyle{serbianc}}%
      {\DTMsetstyle{serbianc-numeric}}%
    }%
  }%
}%
{%
  \csdef{date\CurrentTrackedDialect}{%
    \DTMifcaseregional%
    {}% do nothing
%    \end{macrocode}
%\changes{2.0.1}{2019-11-11}{Fixed non-regional variant for regional code.}
%\changes{2.1.0}{2019-11-22}{Reverted wrong regional variant changes.}
%    \begin{macrocode}
      {\DTMsetstyle{serbianc}}%
      {\DTMsetstyle{serbianc-numeric}}%
  }%
}%
%    \end{macrocode}
%
%\iffalse
%    \begin{macrocode}
%</datetime2-serbianc.ldf>
%    \end{macrocode}
%\fi
%
%\iffalse
%    \begin{macrocode}
%<*datetime2-sr-Cyrl.ldf>
%    \end{macrocode}
%\fi
%
%\subsection{Serbian \sty{sr-Cyrl} Code
%   (\texttt{datetime2-sr-Cyrl.ldf})}
%\changes{1.0}{2015-03-24}{Initial release}
%\changes{2.0.0}{2019-11-07}{%
%   Added regions, all settings made available to regions so all changes can be
%   region-specific.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%    \begin{macrocode}
\ProvidesDateTimeModule{sr-Cyrl}[2019/11/22 v2.1.0]
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   All localization strings loaded from base module.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% Load appropriate regionless Serbian module.
%    \begin{macrocode}
\RequireDateTimeModule{serbianc}
%    \end{macrocode}
%
%
%
%\subsubsection{Defining the \sty{sr-Cyrl} style}
%
% \changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% \changes{2.0.1}{2019-11-11}{Fixed region name error.}
% Allow the user a way of configuring the "sr-Cyrl" and
% "sr-Cyrl-numeric" styles by providing macros for various format
% elements.
%
% This doesn't use the package-wide separators such as \cs{dtm@datetimesep} in
% case other date formats are also required.
%
%\begin{macro}{\DTMsrCyrldowdaysep}
% The separator between weekday and day.
%    \begin{macrocode}
\newcommand*{\DTMsrCyrldowdaysep}{,\space}
%    \end{macrocode}
%\end{macro}
%
%
%\begin{macro}{\DTMsrCyrldaymonthsep}
% The separator between the day and month for the text format.
%    \begin{macrocode}
\newcommand*{\DTMsrCyrldaymonthsep}{%
  \DTMtexorpdfstring{\protect~}{\space}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrCyrlmonthyearsep}
% The separator between the month and year for the text format.
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlmonthyearsep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrCyrldatetimesep}
% The separator between the date and time blocks in the full format (either
% text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMsrCyrldatetimesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrCyrltimezonesep}
% The separator between the time and zone blocks in the full format (either
% text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMsrCyrltimezonesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrCyrldatesep}
% The separator for the numeric date format.
%    \begin{macrocode}
\newcommand*{\DTMsrCyrldatesep}{.}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrCyrltimesep}
% The separator for the numeric time format.
%    \begin{macrocode}
\newcommand*{\DTMsrCyrltimesep}{.}
%    \end{macrocode}
%\end{macro}
%
%Provide keys that can be used in \cs{DTMlangsetup} to set these separators.
%    \begin{macrocode}
\DTMdefkey{sr-Cyrl}{dowdaysep}%
    {\renewcommand*{\DTMsr-Cyrldowdaysep}{#1}}
\DTMdefkey{sr-Cyrl}{daymonthsep}%
    {\renewcommand*{\DTMsr-Cyrldaymonthsep}{#1}}
\DTMdefkey{sr-Cyrl}{monthyearsep}%
    {\renewcommand*{\DTMsr-Cyrlmonthyearsep}{#1}}
\DTMdefkey{sr-Cyrl}{datetimesep}%
    {\renewcommand*{\DTMsr-Cyrldatetimesep}{#1}}
\DTMdefkey{sr-Cyrl}{timezonesep}%
    {\renewcommand*{\DTMsr-Cyrltimezonesep}{#1}}
\DTMdefkey{sr-Cyrl}{datesep}%
    {\renewcommand*{\DTMsr-Cyrldatesep}{#1}}
\DTMdefkey{sr-Cyrl}{timesep}%
    {\renewcommand*{\DTMsr-Cyrltimesep}{#1}}
%    \end{macrocode}
%
%\subsubsection{Switches and settings}
%
%\changes{2.0.0}{2019-11-07}{%
%   Added weekday names.
%}
    %\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\begin{macro}{\DTMsrCyrlweekdayname}
% Define the weekday name, lowercase.
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlweekdayname}%
{\DTMserbiancyrekweekdayname}
%    \end{macrocode}
%\end{macro}

%\begin{macro}{\DTMsrCyrlweekdayname}
% Define the weekday name, capitalized.
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlWeekdayname}%
    {\DTMserbiancyrekWeekdayname}
%    \end{macrocode}
%\end{macro}
%
% Provide a way to switch between Ekavian and Ijekavian pronunciation.
%\changes{2.0.0}{2019-11-07}{%
%   Added a way to switch between Ekavian and Ijekavian pronunciation.
%}
    %\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%
%    \begin{macrocode}
\DTMdefchoicekey{sr-Cyrl}%
    {pronunciation}[\@dtm@val\@dtm@nr]{ekavian,ijekavian}{%
  \ifcase\@dtm@nr\relax
    \renewcommand*{\DTMsrCyrlweekdayname}%
        {\DTMserbiancyrekweekdayname}%
    \renewcommand*{\DTMsrCyrlWeekdayname}%
        {\DTMserbiancyrekWeekdayname}%
  \or%
    \renewcommand*{\DTMsrCyrlweekdayname}%
        {\DTMserbiancyrijweekdayname}%
    \renewcommand*{\DTMsrCyrlWeekdayname}
        {\DTMserbiancyrijWeekdayname}%
  \fi
}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Added a way to switch June, July alternate spellings.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that can switch between (jun, jul) and (juni, juli)
% month spellings.
%    \begin{macrocode}
\DTMdefboolkey{sr-Cyrl}{monthi}[true]{}
%    \end{macrocode}
% The default is without the "i" suffix.
%    \begin{macrocode}
\DTMsetbool{sr-Cyrl}{monthi}{false}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Added a switch for adding leading zeroes in day and month ordinals.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the day and month ordinals should
% have leading zeroes.
%    \begin{macrocode}
\DTMdefboolkey{sr-Cyrl}{leadingzero}[true]{}
%    \end{macrocode}
% The default is to omit the leading zero.
%    \begin{macrocode}
\DTMsetbool{sr-Cyrl}{leadingzero}{false}
%    \end{macrocode}
%
%\begin{macro}{\DTMsrCyrldayordinal}
% Define the day ordinal format to be used by this style.
%    \begin{macrocode}
   \newcommand*{\DTMsrCyrldayordinal}[1]{%
       \DTMifbool{sr-Cyrl}{leadingzero}%
       {\DTMtwodigits{#1}}%
       {\number#1}\DTMsrCyrldatesep}%
%    \end{macrocode}
%\end{macro}
%
%\changes{2.1.0}{2019-11-22}{%
%   Removed year ordinal macro since year ordinals are handled differently now.
%}
%\changes{2.0.0}{2019-11-07}{%
%   Removed the option to switch between writing systems, since that is
%   accomplished by using different regions or regionless styles ("serbian" and
%   "serbianc" for example).
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define the month names.
%
%\begin{macro}{\DTMsrCyrlnoimonthname}
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlnoimonthname}{\DTMserbiancyrnoimonthname}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrCyrlnoiMonthname}
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlnoiMonthname}{\DTMserbiancyrnoiMonthname}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrCyrlimonthname}
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlimonthname}{\DTMserbiancyrimonthname}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrCyrliMonthname}
%    \begin{macrocode}
\newcommand*{\DTMsrCyrliMonthname}{\DTMserbiancyriMonthname}
%    \end{macrocode}
%\end{macro}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the time zone mappings
% should be used.
%    \begin{macrocode}
\DTMdefboolkey{sr-Cyrl}{mapzone}[true]{}
%    \end{macrocode}
% The default is to use mappings.
%    \begin{macrocode}
\DTMsetbool{sr-Cyrl}{mapzone}{true}
%    \end{macrocode}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the day of month should be
% displayed.
%    \begin{macrocode}
\DTMdefboolkey{sr-Cyrl}{showdayofmonth}[true]{}
%    \end{macrocode}
% The default is to show the day of month.
%    \begin{macrocode}
\DTMsetbool{sr-Cyrl}{showdayofmonth}{true}
%    \end{macrocode}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the year should be
% displayed.
%    \begin{macrocode}
\DTMdefboolkey{sr-Cyrl}{showyear}[true]{}
%    \end{macrocode}
% The default is to show the year.
%    \begin{macrocode}
\DTMsetbool{sr-Cyrl}{showyear}{true}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Added weekday names.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%    \begin{macrocode}
\DTMnewstyle%
{sr-Cyrl}% label
{% date style
  \renewcommand*\DTMdisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMsrCyrlweekdayname{##4}%
   	    \DTMsrCyrldowdaysep%
   	  \fi
   	\fi
    \DTMifbool{sr-Cyrl}{showdayofmonth}
      {\DTMsrCyrldayordinal{##3}\DTMsrCyrldaymonthsep}%
      {}%
    \DTMifbool{sr-Cyrl}{monthi}%
      {\DTMsrCyrlimonthname{##2}}%
      {\DTMsrCyrlnoimonthname{##2}}%
    \DTMifbool{sr-Cyrl}{showyear}%
    {%
      \DTMsrCyrlmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
  \renewcommand*\DTMDisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMsrCyrlWeekdayname{##4}%
   	    \DTMsrCyrldowdaysep%
   	  \fi
   	\fi
    \DTMifbool{sr-Cyrl}{showdayofmonth}
    {%
      \DTMsrCyrldayordinal{##3}\DTMsrCyrldaymonthsep%
      \DTMifbool{sr-Cyrl}{monthi}%
        {\DTMsrCyrlimonthname{##2}}%
        {\DTMsrCyrlnoimonthname{##2}}%
    }%
    {%
      \DTMifbool{sr-Cyrl}{monthi}%
        {\DTMsrCyrliMonthname{##2}}%
        {\DTMsrCyrlnoiMonthname{##2}}%
    }%
    \DTMifbool{sr-Cyrl}{showyear}%
    {%
      \DTMsrCyrlmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
}%
{% time style
  \renewcommand*\DTMdisplaytime[3]{%
    \DTMifbool{sr-Cyrl}{leadingzero}{\DTMtwodigits{##1}}{\number##1}%
    \DTMsrCyrltimesep\DTMtwodigits{##2}%
    \ifDTMshowseconds\DTMsrCyrltimesep\DTMtwodigits{##3}\fi
  }%
}%
{% zone style
  \DTMresetzones%
  \DTMsrCyrlzonemaps%
  \renewcommand*{\DTMdisplayzone}[2]{%
    \DTMifbool{sr-Cyrl}{mapzone}%
    {\DTMusezonemapordefault{##1}{##2}}%
    {%
      \ifnum##1<0
      \else+\fi\DTMtwodigits{##1}%
      \ifDTMshowzoneminutes\DTMsrCyrltimesep\DTMtwodigits{##2}\fi
    }%
  }%
}%
{% full style
  \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate%
      \DTMdisplaydate{##1}{##2}{##3}{##4}%
      \DTMsrCyrldatetimesep%
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone%
      \DTMsrCyrltimezonesep%
      \DTMdisplayzone{##8}{##9}%
    \fi
  }%
  \renewcommand*{\DTMDisplay}[9]{%
    \ifDTMshowdate%
      \DTMDisplaydate{##1}{##2}{##3}{##4}%
      \DTMsrCyrldatetimesep%
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone%
      \DTMsrCyrltimezonesep%
      \DTMdisplayzone{##8}{##9}%
    \fi
  }%
}%
%    \end{macrocode}
%
%
%\begin{macro}{\DTMsrCyrlmonthordinal}
% Define the month ordinal format to be used by this style.
%    \begin{macrocode}
   \newcommand*{\DTMsrCyrlmonthordinal}[1]{%
       \DTMifbool{sr-Cyrl}{leadingzero}{\DTMtwodigits{#1}}{\number#1}.}%
%    \end{macrocode}
%\end{macro}
%\changes{2.0.0}{2019-11-07}{%
%   Added a switch between multiple numeric month ordinal formats used in
%   Serbian.
%}
% \changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a setting to switch between Arabic, uppercase Roman and lowercase
% smallcaps Roman month format for the "srCyrl-numeric" style.
%    \begin{macrocode}
\DTMdefchoicekey{sr-Cyrl}{monthord}%
[\@dtm@val\@dtm@nr]{arabic,roman,romanlsc}{%
 \ifcase\@dtm@nr\relax
   \renewcommand*{\DTMsrCyrlmonthordinal}[1]{%
       \DTMifbool{sr-Cyrl}{leadingzero}%
         {\DTMtwodigits{##1}}{\number##1}\DTMsrCyrldatesep}%
 \or%
   \renewcommand*{\DTMsrCyrlmonthordinal}[1]{%
    \DTMtexorpdfstring{\protect\DTMserbianordinalROMAN{##1}}%
    {serbianordinalROMAN{##1}}}%
 \or%
   \renewcommand*{\DTMsrCyrlmonthordinal}[1]{%
    \DTMtexorpdfstring{\textsc{\protect\DTMserbianordinalroman{##1}}}%
    {serbianordinalROMAN{##1}}}%
 \fi
}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Fixed the (previously entirely wrong) numeric date style.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.0}{2019-11-07}{%
%   Added weekday names.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define numeric style.
%    \begin{macrocode}
\DTMnewstyle%
{sr-Cyrl-numeric}% label
{% date style
  \renewcommand*\DTMdisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMsrCyrlweekdayname{##4}%
   	    \DTMsrCyrldowdaysep%
   	  \fi
   	\fi
    \DTMifbool{sr-Cyrl}{showdayofmonth}%
    {\DTMsrCyrldayordinal{##3}\DTMsrCyrldaymonthsep}%
    {}%
    \DTMsrCyrlmonthordinal{##2}%
    \DTMifbool{sr-Cyrl}{showyear}%
    {%
      \DTMsrCyrlmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
  \renewcommand*\DTMDisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMsrCyrlWeekdayname{##4}%
   	    \DTMsrCyrldowdaysep%
   	  \fi
   	\fi
    \DTMifbool{sr-Cyrl}{showdayofmonth}%
    {\DTMsrCyrldayordinal{##3}\DTMsrCyrldaymonthsep}%
    {}%
    \DTMsrCyrlmonthordinal{##2}%
    \DTMifbool{sr-Cyrl}{showyear}%
    {%
      \DTMsrCyrlmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
}%
{% time style
  \renewcommand*\DTMdisplaytime[3]{%
    \DTMifbool{sr-Cyrl}{leadingzero}{\DTMtwodigits{##1}}{\number##1}%
    \DTMsrCyrltimesep\DTMtwodigits{##2}%
    \ifDTMshowseconds\DTMsrCyrltimesep\DTMtwodigits{##3}\fi
  }%
}%
{% zone style
  \DTMresetzones%
  \DTMsrCyrlzonemaps%
  \renewcommand*{\DTMdisplayzone}[2]{%
    \DTMifbool{sr-Cyrl}{mapzone}%
    {\DTMusezonemapordefault{##1}{##2}}%
    {%
      \ifnum##1<0
      \else+\fi\DTMtwodigits{##1}%
      \ifDTMshowzoneminutes\DTMsrCyrltimesep\DTMtwodigits{##2}\fi
    }%
  }%
}%
{% full style
  \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate%
      \DTMdisplaydate{##1}{##2}{##3}{##4}%
      \DTMsrCyrldatetimesep%
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone%
      \DTMsrCyrltimezonesep%
      \DTMdisplayzone{##8}{##9}%
    \fi
  }%
  \renewcommand*{\DTMDisplay}{\DTMdisplay}%
}
%    \end{macrocode}
%
%\begin{macro}{\DTMsr-Cyrlzonemaps}
% The time zone mappings are set through this command, which can be
% redefined if extra mappings are required or mappings need to be
% removed.
%\changes{2.0.1}{2019-11-11}{Replaced wrong parameter for zonemapping.}
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlzonemaps}{%
  \DTMdefzonemap{01}{00}{CET}%
  \DTMdefzonemap{02}{00}{CEST}%
}
%    \end{macrocode}
%\end{macro}
% Switch style according to the \opt{useregional} setting.
%    \begin{macrocode}
\DTMifcaseregional%
{}% do nothing
{\DTMsetstyle{sr-Cyrl}}%
{\DTMsetstyle{sr-Cyrl-numeric}}%
%    \end{macrocode}
% Redefine \cs{dateserbianc} (or \cs{date}\meta{dialect}) to prevent
% \sty{babel} from resetting \cs{today}. (For this to work,
% \sty{babel} must already have been loaded if it's required.)
%\changes{1.1}{2019-09-14}{removed spurious space}
%\changes{2.0.0}{2019-11-07}{%
%   Added regions.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%    \begin{macrocode}
\ifcsundef{date\CurrentTrackedDialect}
{%
  \ifundef\dateserbianc%
  {% do nothing
  }%
  {%
    \def\dateserbianc{%
      \DTMifcaseregional%
      {}% do nothing
      {\DTMsetstyle{sr-Cyrl}}%
      {\DTMsetstyle{sr-Cyrl-numeric}}%
    }%
  }%
}%
{%
  \csdef{date\CurrentTrackedDialect}{%
    \DTMifcaseregional%
    {}% do nothing
%    \end{macrocode}
%\changes{2.0.1}{2019-11-11}{Fixed non-regional variant for regional code.}
%\changes{2.1.0}{2019-11-22}{Reverted wrong regional variant changes.}
%    \begin{macrocode}
      {\DTMsetstyle{sr-Cyrl}}%
      {\DTMsetstyle{sr-Cyrl-numeric}}%
  }%
}%
%    \end{macrocode}
%
%\iffalse
%    \begin{macrocode}
%</datetime2-sr-Cyrl.ldf>
%    \end{macrocode}
%\fi
%
%\iffalse
%    \begin{macrocode}
%<*datetime2-sr-Cyrl-RS.ldf>
%    \end{macrocode}
%\fi
%
%\subsection{Serbian \sty{sr-Cyrl-RS} Code
%   (\texttt{datetime2-sr-Cyrl-RS.ldf})}
%\changes{1.0}{2015-03-24}{Initial release}
%\changes{2.0.0}{2019-11-07}{%
%   Added regions, all settings made available to regions so all changes can be
%   region-specific.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%    \begin{macrocode}
\ProvidesDateTimeModule{sr-Cyrl-RS}[2019/11/22 v2.1.0]
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   All localization strings loaded from base module.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% Load appropriate regionless Serbian module.
%    \begin{macrocode}
\RequireDateTimeModule{serbianc}
%    \end{macrocode}
%
%
%
%\subsubsection{Defining the \sty{sr-Cyrl-RS} style}
%
% \changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% \changes{2.0.1}{2019-11-11}{Fixed region name error.}
% Allow the user a way of configuring the "sr-Cyrl-RS" and
% "sr-Cyrl-RS-numeric" styles by providing macros for various format
% elements.
%
% This doesn't use the package-wide separators such as \cs{dtm@datetimesep} in
% case other date formats are also required.
%
%\begin{macro}{\DTMsrCyrlRSdowdaysep}
% The separator between weekday and day.
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlRSdowdaysep}{,\space}
%    \end{macrocode}
%\end{macro}
%
%
%\begin{macro}{\DTMsrCyrlRSdaymonthsep}
% The separator between the day and month for the text format.
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlRSdaymonthsep}{%
  \DTMtexorpdfstring{\protect~}{\space}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrCyrlRSmonthyearsep}
% The separator between the month and year for the text format.
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlRSmonthyearsep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrCyrlRSdatetimesep}
% The separator between the date and time blocks in the full format (either
% text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlRSdatetimesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrCyrlRStimezonesep}
% The separator between the time and zone blocks in the full format (either
% text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlRStimezonesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrCyrlRSdatesep}
% The separator for the numeric date format.
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlRSdatesep}{.}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrCyrlRStimesep}
% The separator for the numeric time format.
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlRStimesep}{.}
%    \end{macrocode}
%\end{macro}
%
%Provide keys that can be used in \cs{DTMlangsetup} to set these separators.
%    \begin{macrocode}
\DTMdefkey{sr-Cyrl-RS}{dowdaysep}%
    {\renewcommand*{\DTMsr-Cyrl-RSdowdaysep}{#1}}
\DTMdefkey{sr-Cyrl-RS}{daymonthsep}%
    {\renewcommand*{\DTMsr-Cyrl-RSdaymonthsep}{#1}}
\DTMdefkey{sr-Cyrl-RS}{monthyearsep}%
    {\renewcommand*{\DTMsr-Cyrl-RSmonthyearsep}{#1}}
\DTMdefkey{sr-Cyrl-RS}{datetimesep}%
    {\renewcommand*{\DTMsr-Cyrl-RSdatetimesep}{#1}}
\DTMdefkey{sr-Cyrl-RS}{timezonesep}%
    {\renewcommand*{\DTMsr-Cyrl-RStimezonesep}{#1}}
\DTMdefkey{sr-Cyrl-RS}{datesep}%
    {\renewcommand*{\DTMsr-Cyrl-RSdatesep}{#1}}
\DTMdefkey{sr-Cyrl-RS}{timesep}%
    {\renewcommand*{\DTMsr-Cyrl-RStimesep}{#1}}
%    \end{macrocode}
%
%\subsubsection{Switches and settings}
%
%\changes{2.0.0}{2019-11-07}{%
%   Added weekday names.
%}
    %\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\begin{macro}{\DTMsrCyrlRSweekdayname}
% Define the weekday name, lowercase.
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlRSweekdayname}%
{\DTMserbiancyrijweekdayname}
%    \end{macrocode}
%\end{macro}

%\begin{macro}{\DTMsrCyrlRSweekdayname}
% Define the weekday name, capitalized.
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlRSWeekdayname}%
    {\DTMserbiancyrijWeekdayname}
%    \end{macrocode}
%\end{macro}
%
% Provide a way to switch between Ekavian and Ijekavian pronunciation.
%\changes{2.0.0}{2019-11-07}{%
%   Added a way to switch between Ekavian and Ijekavian pronunciation.
%}
    %\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%
%    \begin{macrocode}
\DTMdefchoicekey{sr-Cyrl-RS}%
    {pronunciation}[\@dtm@val\@dtm@nr]{ekavian,ijekavian}{%
  \ifcase\@dtm@nr\relax
    \renewcommand*{\DTMsrCyrlRSweekdayname}%
        {\DTMserbiancyrekweekdayname}%
    \renewcommand*{\DTMsrCyrlRSWeekdayname}%
        {\DTMserbiancyrekWeekdayname}%
  \or%
    \renewcommand*{\DTMsrCyrlRSweekdayname}%
        {\DTMserbiancyrijweekdayname}%
    \renewcommand*{\DTMsrCyrlRSWeekdayname}
        {\DTMserbiancyrijWeekdayname}%
  \fi
}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Added a way to switch June, July alternate spellings.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that can switch between (jun, jul) and (juni, juli)
% month spellings.
%    \begin{macrocode}
\DTMdefboolkey{sr-Cyrl-RS}{monthi}[true]{}
%    \end{macrocode}
% The default is without the "i" suffix.
%    \begin{macrocode}
\DTMsetbool{sr-Cyrl-RS}{monthi}{false}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Added a switch for adding leading zeroes in day and month ordinals.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the day and month ordinals should
% have leading zeroes.
%    \begin{macrocode}
\DTMdefboolkey{sr-Cyrl-RS}{leadingzero}[true]{}
%    \end{macrocode}
% The default is to omit the leading zero.
%    \begin{macrocode}
\DTMsetbool{sr-Cyrl-RS}{leadingzero}{false}
%    \end{macrocode}
%
%\begin{macro}{\DTMsrCyrlRSdayordinal}
% Define the day ordinal format to be used by this style.
%    \begin{macrocode}
   \newcommand*{\DTMsrCyrlRSdayordinal}[1]{%
       \DTMifbool{sr-Cyrl-RS}{leadingzero}%
       {\DTMtwodigits{#1}}%
       {\number#1}\DTMsrCyrlRSdatesep}%
%    \end{macrocode}
%\end{macro}
%
%\changes{2.1.0}{2019-11-22}{%
%   Removed year ordinal macro since year ordinals are handled differently now.
%}
%\changes{2.0.0}{2019-11-07}{%
%   Removed the option to switch between writing systems, since that is
%   accomplished by using different regions or regionless styles ("serbian" and
%   "serbianc" for example).
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define the month names.
%
%\begin{macro}{\DTMsrCyrlRSnoimonthname}
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlRSnoimonthname}{\DTMserbiancyrnoimonthname}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrCyrlRSnoiMonthname}
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlRSnoiMonthname}{\DTMserbiancyrnoiMonthname}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrCyrlRSimonthname}
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlRSimonthname}{\DTMserbiancyrimonthname}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrCyrlRSiMonthname}
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlRSiMonthname}{\DTMserbiancyriMonthname}
%    \end{macrocode}
%\end{macro}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the time zone mappings
% should be used.
%    \begin{macrocode}
\DTMdefboolkey{sr-Cyrl-RS}{mapzone}[true]{}
%    \end{macrocode}
% The default is to use mappings.
%    \begin{macrocode}
\DTMsetbool{sr-Cyrl-RS}{mapzone}{true}
%    \end{macrocode}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the day of month should be
% displayed.
%    \begin{macrocode}
\DTMdefboolkey{sr-Cyrl-RS}{showdayofmonth}[true]{}
%    \end{macrocode}
% The default is to show the day of month.
%    \begin{macrocode}
\DTMsetbool{sr-Cyrl-RS}{showdayofmonth}{true}
%    \end{macrocode}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the year should be
% displayed.
%    \begin{macrocode}
\DTMdefboolkey{sr-Cyrl-RS}{showyear}[true]{}
%    \end{macrocode}
% The default is to show the year.
%    \begin{macrocode}
\DTMsetbool{sr-Cyrl-RS}{showyear}{true}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Added weekday names.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%    \begin{macrocode}
\DTMnewstyle%
{sr-Cyrl-RS}% label
{% date style
  \renewcommand*\DTMdisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMsrCyrlRSweekdayname{##4}%
   	    \DTMsrCyrlRSdowdaysep%
   	  \fi
   	\fi
    \DTMifbool{sr-Cyrl-RS}{showdayofmonth}
      {\DTMsrCyrlRSdayordinal{##3}\DTMsrCyrlRSdaymonthsep}%
      {}%
    \DTMifbool{sr-Cyrl-RS}{monthi}%
      {\DTMsrCyrlRSimonthname{##2}}%
      {\DTMsrCyrlRSnoimonthname{##2}}%
    \DTMifbool{sr-Cyrl-RS}{showyear}%
    {%
      \DTMsrCyrlRSmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
  \renewcommand*\DTMDisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMsrCyrlRSWeekdayname{##4}%
   	    \DTMsrCyrlRSdowdaysep%
   	  \fi
   	\fi
    \DTMifbool{sr-Cyrl-RS}{showdayofmonth}
    {%
      \DTMsrCyrlRSdayordinal{##3}\DTMsrCyrlRSdaymonthsep%
      \DTMifbool{sr-Cyrl-RS}{monthi}%
        {\DTMsrCyrlRSimonthname{##2}}%
        {\DTMsrCyrlRSnoimonthname{##2}}%
    }%
    {%
      \DTMifbool{sr-Cyrl-RS}{monthi}%
        {\DTMsrCyrlRSiMonthname{##2}}%
        {\DTMsrCyrlRSnoiMonthname{##2}}%
    }%
    \DTMifbool{sr-Cyrl-RS}{showyear}%
    {%
      \DTMsrCyrlRSmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
}%
{% time style
  \renewcommand*\DTMdisplaytime[3]{%
    \DTMifbool{sr-Cyrl-RS}{leadingzero}{\DTMtwodigits{##1}}{\number##1}%
    \DTMsrCyrlRStimesep\DTMtwodigits{##2}%
    \ifDTMshowseconds\DTMsrCyrlRStimesep\DTMtwodigits{##3}\fi
  }%
}%
{% zone style
  \DTMresetzones%
  \DTMsrCyrlRSzonemaps%
  \renewcommand*{\DTMdisplayzone}[2]{%
    \DTMifbool{sr-Cyrl-RS}{mapzone}%
    {\DTMusezonemapordefault{##1}{##2}}%
    {%
      \ifnum##1<0
      \else+\fi\DTMtwodigits{##1}%
      \ifDTMshowzoneminutes\DTMsrCyrlRStimesep\DTMtwodigits{##2}\fi
    }%
  }%
}%
{% full style
  \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate%
      \DTMdisplaydate{##1}{##2}{##3}{##4}%
      \DTMsrCyrlRSdatetimesep%
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone%
      \DTMsrCyrlRStimezonesep%
      \DTMdisplayzone{##8}{##9}%
    \fi
  }%
  \renewcommand*{\DTMDisplay}[9]{%
    \ifDTMshowdate%
      \DTMDisplaydate{##1}{##2}{##3}{##4}%
      \DTMsrCyrlRSdatetimesep%
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone%
      \DTMsrCyrlRStimezonesep%
      \DTMdisplayzone{##8}{##9}%
    \fi
  }%
}%
%    \end{macrocode}
%
%
%\begin{macro}{\DTMsrCyrlRSmonthordinal}
% Define the month ordinal format to be used by this style.
%    \begin{macrocode}
   \newcommand*{\DTMsrCyrlRSmonthordinal}[1]{%
       \DTMifbool{sr-Cyrl-RS}{leadingzero}{\DTMtwodigits{#1}}{\number#1}.}%
%    \end{macrocode}
%\end{macro}
%\changes{2.0.0}{2019-11-07}{%
%   Added a switch between multiple numeric month ordinal formats used in
%   Serbian.
%}
% \changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a setting to switch between Arabic, uppercase Roman and lowercase
% smallcaps Roman month format for the "srCyrlRS-numeric" style.
%    \begin{macrocode}
\DTMdefchoicekey{sr-Cyrl-RS}{monthord}%
[\@dtm@val\@dtm@nr]{arabic,roman,romanlsc}{%
 \ifcase\@dtm@nr\relax
   \renewcommand*{\DTMsrCyrlRSmonthordinal}[1]{%
       \DTMifbool{sr-Cyrl-RS}{leadingzero}%
         {\DTMtwodigits{##1}}{\number##1}\DTMsrCyrlRSdatesep}%
 \or%
   \renewcommand*{\DTMsrCyrlRSmonthordinal}[1]{%
    \DTMtexorpdfstring{\protect\DTMserbianordinalROMAN{##1}}%
    {serbianordinalROMAN{##1}}}%
 \or%
   \renewcommand*{\DTMsrCyrlRSmonthordinal}[1]{%
    \DTMtexorpdfstring{\textsc{\protect\DTMserbianordinalroman{##1}}}%
    {serbianordinalROMAN{##1}}}%
 \fi
}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Fixed the (previously entirely wrong) numeric date style.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.0}{2019-11-07}{%
%   Added weekday names.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define numeric style.
%    \begin{macrocode}
\DTMnewstyle%
{sr-Cyrl-RS-numeric}% label
{% date style
  \renewcommand*\DTMdisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMsrCyrlRSweekdayname{##4}%
   	    \DTMsrCyrlRSdowdaysep%
   	  \fi
   	\fi
    \DTMifbool{sr-Cyrl-RS}{showdayofmonth}%
    {\DTMsrCyrlRSdayordinal{##3}\DTMsrCyrlRSdaymonthsep}%
    {}%
    \DTMsrCyrlRSmonthordinal{##2}%
    \DTMifbool{sr-Cyrl-RS}{showyear}%
    {%
      \DTMsrCyrlRSmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
  \renewcommand*\DTMDisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMsrCyrlRSWeekdayname{##4}%
   	    \DTMsrCyrlRSdowdaysep%
   	  \fi
   	\fi
    \DTMifbool{sr-Cyrl-RS}{showdayofmonth}%
    {\DTMsrCyrlRSdayordinal{##3}\DTMsrCyrlRSdaymonthsep}%
    {}%
    \DTMsrCyrlRSmonthordinal{##2}%
    \DTMifbool{sr-Cyrl-RS}{showyear}%
    {%
      \DTMsrCyrlRSmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
}%
{% time style
  \renewcommand*\DTMdisplaytime[3]{%
    \DTMifbool{sr-Cyrl-RS}{leadingzero}{\DTMtwodigits{##1}}{\number##1}%
    \DTMsrCyrlRStimesep\DTMtwodigits{##2}%
    \ifDTMshowseconds\DTMsrCyrlRStimesep\DTMtwodigits{##3}\fi
  }%
}%
{% zone style
  \DTMresetzones%
  \DTMsrCyrlRSzonemaps%
  \renewcommand*{\DTMdisplayzone}[2]{%
    \DTMifbool{sr-Cyrl-RS}{mapzone}%
    {\DTMusezonemapordefault{##1}{##2}}%
    {%
      \ifnum##1<0
      \else+\fi\DTMtwodigits{##1}%
      \ifDTMshowzoneminutes\DTMsrCyrlRStimesep\DTMtwodigits{##2}\fi
    }%
  }%
}%
{% full style
  \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate%
      \DTMdisplaydate{##1}{##2}{##3}{##4}%
      \DTMsrCyrlRSdatetimesep%
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone%
      \DTMsrCyrlRStimezonesep%
      \DTMdisplayzone{##8}{##9}%
    \fi
  }%
  \renewcommand*{\DTMDisplay}{\DTMdisplay}%
}
%    \end{macrocode}
%
%\begin{macro}{\DTMsr-Cyrl-RSzonemaps}
% The time zone mappings are set through this command, which can be
% redefined if extra mappings are required or mappings need to be
% removed.
%\changes{2.0.1}{2019-11-11}{Replaced wrong parameter for zonemapping.}
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlRSzonemaps}{%
  \DTMdefzonemap{01}{00}{CET}%
  \DTMdefzonemap{02}{00}{CEST}%
}
%    \end{macrocode}
%\end{macro}
% Switch style according to the \opt{useregional} setting.
%    \begin{macrocode}
\DTMifcaseregional%
{}% do nothing
{\DTMsetstyle{sr-Cyrl-RS}}%
{\DTMsetstyle{sr-Cyrl-RS-numeric}}%
%    \end{macrocode}
% Redefine \cs{dateserbianc} (or \cs{date}\meta{dialect}) to prevent
% \sty{babel} from resetting \cs{today}. (For this to work,
% \sty{babel} must already have been loaded if it's required.)
%\changes{1.1}{2019-09-14}{removed spurious space}
%\changes{2.0.0}{2019-11-07}{%
%   Added regions.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%    \begin{macrocode}
\ifcsundef{date\CurrentTrackedDialect}
{%
  \ifundef\dateserbianc%
  {% do nothing
  }%
  {%
    \def\dateserbianc{%
      \DTMifcaseregional%
      {}% do nothing
      {\DTMsetstyle{sr-Cyrl-RS}}%
      {\DTMsetstyle{sr-Cyrl-RS-numeric}}%
    }%
  }%
}%
{%
  \csdef{date\CurrentTrackedDialect}{%
    \DTMifcaseregional%
    {}% do nothing
%    \end{macrocode}
%\changes{2.0.1}{2019-11-11}{Fixed non-regional variant for regional code.}
%\changes{2.1.0}{2019-11-22}{Reverted wrong regional variant changes.}
%    \begin{macrocode}
      {\DTMsetstyle{sr-Cyrl-RS}}%
      {\DTMsetstyle{sr-Cyrl-RS-numeric}}%
  }%
}%
%    \end{macrocode}
%
%\iffalse
%    \begin{macrocode}
%</datetime2-sr-Cyrl-RS.ldf>
%    \end{macrocode}
%\fi
%
%\iffalse
%    \begin{macrocode}
%<*datetime2-sr-Cyrl-ME.ldf>
%    \end{macrocode}
%\fi
%
%\subsection{Serbian \sty{sr-Cyrl-ME} Code
%   (\texttt{datetime2-sr-Cyrl-ME.ldf})}
%\changes{1.0}{2015-03-24}{Initial release}
%\changes{2.0.0}{2019-11-07}{%
%   Added regions, all settings made available to regions so all changes can be
%   region-specific.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%    \begin{macrocode}
\ProvidesDateTimeModule{sr-Cyrl-ME}[2019/11/22 v2.1.0]
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   All localization strings loaded from base module.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% Load appropriate regionless Serbian module.
%    \begin{macrocode}
\RequireDateTimeModule{serbianc}
%    \end{macrocode}
%
%
%
%\subsubsection{Defining the \sty{sr-Cyrl-ME} style}
%
% \changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% \changes{2.0.1}{2019-11-11}{Fixed region name error.}
% Allow the user a way of configuring the "sr-Cyrl-ME" and
% "sr-Cyrl-ME-numeric" styles by providing macros for various format
% elements.
%
% This doesn't use the package-wide separators such as \cs{dtm@datetimesep} in
% case other date formats are also required.
%
%\begin{macro}{\DTMsrCyrlMEdowdaysep}
% The separator between weekday and day.
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlMEdowdaysep}{,\space}
%    \end{macrocode}
%\end{macro}
%
%
%\begin{macro}{\DTMsrCyrlMEdaymonthsep}
% The separator between the day and month for the text format.
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlMEdaymonthsep}{%
  \DTMtexorpdfstring{\protect~}{\space}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrCyrlMEmonthyearsep}
% The separator between the month and year for the text format.
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlMEmonthyearsep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrCyrlMEdatetimesep}
% The separator between the date and time blocks in the full format (either
% text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlMEdatetimesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrCyrlMEtimezonesep}
% The separator between the time and zone blocks in the full format (either
% text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlMEtimezonesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrCyrlMEdatesep}
% The separator for the numeric date format.
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlMEdatesep}{.}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrCyrlMEtimesep}
% The separator for the numeric time format.
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlMEtimesep}{.}
%    \end{macrocode}
%\end{macro}
%
%Provide keys that can be used in \cs{DTMlangsetup} to set these separators.
%    \begin{macrocode}
\DTMdefkey{sr-Cyrl-ME}{dowdaysep}%
    {\renewcommand*{\DTMsr-Cyrl-MEdowdaysep}{#1}}
\DTMdefkey{sr-Cyrl-ME}{daymonthsep}%
    {\renewcommand*{\DTMsr-Cyrl-MEdaymonthsep}{#1}}
\DTMdefkey{sr-Cyrl-ME}{monthyearsep}%
    {\renewcommand*{\DTMsr-Cyrl-MEmonthyearsep}{#1}}
\DTMdefkey{sr-Cyrl-ME}{datetimesep}%
    {\renewcommand*{\DTMsr-Cyrl-MEdatetimesep}{#1}}
\DTMdefkey{sr-Cyrl-ME}{timezonesep}%
    {\renewcommand*{\DTMsr-Cyrl-MEtimezonesep}{#1}}
\DTMdefkey{sr-Cyrl-ME}{datesep}%
    {\renewcommand*{\DTMsr-Cyrl-MEdatesep}{#1}}
\DTMdefkey{sr-Cyrl-ME}{timesep}%
    {\renewcommand*{\DTMsr-Cyrl-MEtimesep}{#1}}
%    \end{macrocode}
%
%\subsubsection{Switches and settings}
%
%\changes{2.0.0}{2019-11-07}{%
%   Added weekday names.
%}
    %\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\begin{macro}{\DTMsrCyrlMEweekdayname}
% Define the weekday name, lowercase.
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlMEweekdayname}%
{\DTMserbiancyrijweekdayname}
%    \end{macrocode}
%\end{macro}

%\begin{macro}{\DTMsrCyrlMEweekdayname}
% Define the weekday name, capitalized.
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlMEWeekdayname}%
    {\DTMserbiancyrijWeekdayname}
%    \end{macrocode}
%\end{macro}
%
% Provide a way to switch between Ekavian and Ijekavian pronunciation.
%\changes{2.0.0}{2019-11-07}{%
%   Added a way to switch between Ekavian and Ijekavian pronunciation.
%}
    %\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%
%    \begin{macrocode}
\DTMdefchoicekey{sr-Cyrl-ME}%
    {pronunciation}[\@dtm@val\@dtm@nr]{ekavian,ijekavian}{%
  \ifcase\@dtm@nr\relax
    \renewcommand*{\DTMsrCyrlMEweekdayname}%
        {\DTMserbiancyrekweekdayname}%
    \renewcommand*{\DTMsrCyrlMEWeekdayname}%
        {\DTMserbiancyrekWeekdayname}%
  \or%
    \renewcommand*{\DTMsrCyrlMEweekdayname}%
        {\DTMserbiancyrijweekdayname}%
    \renewcommand*{\DTMsrCyrlMEWeekdayname}
        {\DTMserbiancyrijWeekdayname}%
  \fi
}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Added a way to switch June, July alternate spellings.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that can switch between (jun, jul) and (juni, juli)
% month spellings.
%    \begin{macrocode}
\DTMdefboolkey{sr-Cyrl-ME}{monthi}[true]{}
%    \end{macrocode}
% The default is without the "i" suffix.
%    \begin{macrocode}
\DTMsetbool{sr-Cyrl-ME}{monthi}{false}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Added a switch for adding leading zeroes in day and month ordinals.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the day and month ordinals should
% have leading zeroes.
%    \begin{macrocode}
\DTMdefboolkey{sr-Cyrl-ME}{leadingzero}[true]{}
%    \end{macrocode}
% The default is to omit the leading zero.
%    \begin{macrocode}
\DTMsetbool{sr-Cyrl-ME}{leadingzero}{false}
%    \end{macrocode}
%
%\begin{macro}{\DTMsrCyrlMEdayordinal}
% Define the day ordinal format to be used by this style.
%    \begin{macrocode}
   \newcommand*{\DTMsrCyrlMEdayordinal}[1]{%
       \DTMifbool{sr-Cyrl-ME}{leadingzero}%
       {\DTMtwodigits{#1}}%
       {\number#1}\DTMsrCyrlMEdatesep}%
%    \end{macrocode}
%\end{macro}
%
%\changes{2.1.0}{2019-11-22}{%
%   Removed year ordinal macro since year ordinals are handled differently now.
%}
%\changes{2.0.0}{2019-11-07}{%
%   Removed the option to switch between writing systems, since that is
%   accomplished by using different regions or regionless styles ("serbian" and
%   "serbianc" for example).
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define the month names.
%
%\begin{macro}{\DTMsrCyrlMEnoimonthname}
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlMEnoimonthname}{\DTMserbiancyrnoimonthname}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrCyrlMEnoiMonthname}
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlMEnoiMonthname}{\DTMserbiancyrnoiMonthname}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrCyrlMEimonthname}
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlMEimonthname}{\DTMserbiancyrimonthname}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrCyrlMEiMonthname}
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlMEiMonthname}{\DTMserbiancyriMonthname}
%    \end{macrocode}
%\end{macro}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the time zone mappings
% should be used.
%    \begin{macrocode}
\DTMdefboolkey{sr-Cyrl-ME}{mapzone}[true]{}
%    \end{macrocode}
% The default is to use mappings.
%    \begin{macrocode}
\DTMsetbool{sr-Cyrl-ME}{mapzone}{true}
%    \end{macrocode}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the day of month should be
% displayed.
%    \begin{macrocode}
\DTMdefboolkey{sr-Cyrl-ME}{showdayofmonth}[true]{}
%    \end{macrocode}
% The default is to show the day of month.
%    \begin{macrocode}
\DTMsetbool{sr-Cyrl-ME}{showdayofmonth}{true}
%    \end{macrocode}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the year should be
% displayed.
%    \begin{macrocode}
\DTMdefboolkey{sr-Cyrl-ME}{showyear}[true]{}
%    \end{macrocode}
% The default is to show the year.
%    \begin{macrocode}
\DTMsetbool{sr-Cyrl-ME}{showyear}{true}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Added weekday names.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%    \begin{macrocode}
\DTMnewstyle%
{sr-Cyrl-ME}% label
{% date style
  \renewcommand*\DTMdisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMsrCyrlMEweekdayname{##4}%
   	    \DTMsrCyrlMEdowdaysep%
   	  \fi
   	\fi
    \DTMifbool{sr-Cyrl-ME}{showdayofmonth}
      {\DTMsrCyrlMEdayordinal{##3}\DTMsrCyrlMEdaymonthsep}%
      {}%
    \DTMifbool{sr-Cyrl-ME}{monthi}%
      {\DTMsrCyrlMEimonthname{##2}}%
      {\DTMsrCyrlMEnoimonthname{##2}}%
    \DTMifbool{sr-Cyrl-ME}{showyear}%
    {%
      \DTMsrCyrlMEmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
  \renewcommand*\DTMDisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMsrCyrlMEWeekdayname{##4}%
   	    \DTMsrCyrlMEdowdaysep%
   	  \fi
   	\fi
    \DTMifbool{sr-Cyrl-ME}{showdayofmonth}
    {%
      \DTMsrCyrlMEdayordinal{##3}\DTMsrCyrlMEdaymonthsep%
      \DTMifbool{sr-Cyrl-ME}{monthi}%
        {\DTMsrCyrlMEimonthname{##2}}%
        {\DTMsrCyrlMEnoimonthname{##2}}%
    }%
    {%
      \DTMifbool{sr-Cyrl-ME}{monthi}%
        {\DTMsrCyrlMEiMonthname{##2}}%
        {\DTMsrCyrlMEnoiMonthname{##2}}%
    }%
    \DTMifbool{sr-Cyrl-ME}{showyear}%
    {%
      \DTMsrCyrlMEmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
}%
{% time style
  \renewcommand*\DTMdisplaytime[3]{%
    \DTMifbool{sr-Cyrl-ME}{leadingzero}{\DTMtwodigits{##1}}{\number##1}%
    \DTMsrCyrlMEtimesep\DTMtwodigits{##2}%
    \ifDTMshowseconds\DTMsrCyrlMEtimesep\DTMtwodigits{##3}\fi
  }%
}%
{% zone style
  \DTMresetzones%
  \DTMsrCyrlMEzonemaps%
  \renewcommand*{\DTMdisplayzone}[2]{%
    \DTMifbool{sr-Cyrl-ME}{mapzone}%
    {\DTMusezonemapordefault{##1}{##2}}%
    {%
      \ifnum##1<0
      \else+\fi\DTMtwodigits{##1}%
      \ifDTMshowzoneminutes\DTMsrCyrlMEtimesep\DTMtwodigits{##2}\fi
    }%
  }%
}%
{% full style
  \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate%
      \DTMdisplaydate{##1}{##2}{##3}{##4}%
      \DTMsrCyrlMEdatetimesep%
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone%
      \DTMsrCyrlMEtimezonesep%
      \DTMdisplayzone{##8}{##9}%
    \fi
  }%
  \renewcommand*{\DTMDisplay}[9]{%
    \ifDTMshowdate%
      \DTMDisplaydate{##1}{##2}{##3}{##4}%
      \DTMsrCyrlMEdatetimesep%
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone%
      \DTMsrCyrlMEtimezonesep%
      \DTMdisplayzone{##8}{##9}%
    \fi
  }%
}%
%    \end{macrocode}
%
%
%\begin{macro}{\DTMsrCyrlMEmonthordinal}
% Define the month ordinal format to be used by this style.
%    \begin{macrocode}
   \newcommand*{\DTMsrCyrlMEmonthordinal}[1]{%
       \DTMifbool{sr-Cyrl-ME}{leadingzero}{\DTMtwodigits{#1}}{\number#1}.}%
%    \end{macrocode}
%\end{macro}
%\changes{2.0.0}{2019-11-07}{%
%   Added a switch between multiple numeric month ordinal formats used in
%   Serbian.
%}
% \changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a setting to switch between Arabic, uppercase Roman and lowercase
% smallcaps Roman month format for the "srCyrlME-numeric" style.
%    \begin{macrocode}
\DTMdefchoicekey{sr-Cyrl-ME}{monthord}%
[\@dtm@val\@dtm@nr]{arabic,roman,romanlsc}{%
 \ifcase\@dtm@nr\relax
   \renewcommand*{\DTMsrCyrlMEmonthordinal}[1]{%
       \DTMifbool{sr-Cyrl-ME}{leadingzero}%
         {\DTMtwodigits{##1}}{\number##1}\DTMsrCyrlMEdatesep}%
 \or%
   \renewcommand*{\DTMsrCyrlMEmonthordinal}[1]{%
    \DTMtexorpdfstring{\protect\DTMserbianordinalROMAN{##1}}%
    {serbianordinalROMAN{##1}}}%
 \or%
   \renewcommand*{\DTMsrCyrlMEmonthordinal}[1]{%
    \DTMtexorpdfstring{\textsc{\protect\DTMserbianordinalroman{##1}}}%
    {serbianordinalROMAN{##1}}}%
 \fi
}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Fixed the (previously entirely wrong) numeric date style.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.0}{2019-11-07}{%
%   Added weekday names.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define numeric style.
%    \begin{macrocode}
\DTMnewstyle%
{sr-Cyrl-ME-numeric}% label
{% date style
  \renewcommand*\DTMdisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMsrCyrlMEweekdayname{##4}%
   	    \DTMsrCyrlMEdowdaysep%
   	  \fi
   	\fi
    \DTMifbool{sr-Cyrl-ME}{showdayofmonth}%
    {\DTMsrCyrlMEdayordinal{##3}\DTMsrCyrlMEdaymonthsep}%
    {}%
    \DTMsrCyrlMEmonthordinal{##2}%
    \DTMifbool{sr-Cyrl-ME}{showyear}%
    {%
      \DTMsrCyrlMEmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
  \renewcommand*\DTMDisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMsrCyrlMEWeekdayname{##4}%
   	    \DTMsrCyrlMEdowdaysep%
   	  \fi
   	\fi
    \DTMifbool{sr-Cyrl-ME}{showdayofmonth}%
    {\DTMsrCyrlMEdayordinal{##3}\DTMsrCyrlMEdaymonthsep}%
    {}%
    \DTMsrCyrlMEmonthordinal{##2}%
    \DTMifbool{sr-Cyrl-ME}{showyear}%
    {%
      \DTMsrCyrlMEmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
}%
{% time style
  \renewcommand*\DTMdisplaytime[3]{%
    \DTMifbool{sr-Cyrl-ME}{leadingzero}{\DTMtwodigits{##1}}{\number##1}%
    \DTMsrCyrlMEtimesep\DTMtwodigits{##2}%
    \ifDTMshowseconds\DTMsrCyrlMEtimesep\DTMtwodigits{##3}\fi
  }%
}%
{% zone style
  \DTMresetzones%
  \DTMsrCyrlMEzonemaps%
  \renewcommand*{\DTMdisplayzone}[2]{%
    \DTMifbool{sr-Cyrl-ME}{mapzone}%
    {\DTMusezonemapordefault{##1}{##2}}%
    {%
      \ifnum##1<0
      \else+\fi\DTMtwodigits{##1}%
      \ifDTMshowzoneminutes\DTMsrCyrlMEtimesep\DTMtwodigits{##2}\fi
    }%
  }%
}%
{% full style
  \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate%
      \DTMdisplaydate{##1}{##2}{##3}{##4}%
      \DTMsrCyrlMEdatetimesep%
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone%
      \DTMsrCyrlMEtimezonesep%
      \DTMdisplayzone{##8}{##9}%
    \fi
  }%
  \renewcommand*{\DTMDisplay}{\DTMdisplay}%
}
%    \end{macrocode}
%
%\begin{macro}{\DTMsr-Cyrl-MEzonemaps}
% The time zone mappings are set through this command, which can be
% redefined if extra mappings are required or mappings need to be
% removed.
%\changes{2.0.1}{2019-11-11}{Replaced wrong parameter for zonemapping.}
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlMEzonemaps}{%
  \DTMdefzonemap{01}{00}{CET}%
  \DTMdefzonemap{02}{00}{CEST}%
}
%    \end{macrocode}
%\end{macro}
% Switch style according to the \opt{useregional} setting.
%    \begin{macrocode}
\DTMifcaseregional%
{}% do nothing
{\DTMsetstyle{sr-Cyrl-ME}}%
{\DTMsetstyle{sr-Cyrl-ME-numeric}}%
%    \end{macrocode}
% Redefine \cs{dateserbianc} (or \cs{date}\meta{dialect}) to prevent
% \sty{babel} from resetting \cs{today}. (For this to work,
% \sty{babel} must already have been loaded if it's required.)
%\changes{1.1}{2019-09-14}{removed spurious space}
%\changes{2.0.0}{2019-11-07}{%
%   Added regions.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%    \begin{macrocode}
\ifcsundef{date\CurrentTrackedDialect}
{%
  \ifundef\dateserbianc%
  {% do nothing
  }%
  {%
    \def\dateserbianc{%
      \DTMifcaseregional%
      {}% do nothing
      {\DTMsetstyle{sr-Cyrl-ME}}%
      {\DTMsetstyle{sr-Cyrl-ME-numeric}}%
    }%
  }%
}%
{%
  \csdef{date\CurrentTrackedDialect}{%
    \DTMifcaseregional%
    {}% do nothing
%    \end{macrocode}
%\changes{2.0.1}{2019-11-11}{Fixed non-regional variant for regional code.}
%\changes{2.1.0}{2019-11-22}{Reverted wrong regional variant changes.}
%    \begin{macrocode}
      {\DTMsetstyle{sr-Cyrl-ME}}%
      {\DTMsetstyle{sr-Cyrl-ME-numeric}}%
  }%
}%
%    \end{macrocode}
%
%\iffalse
%    \begin{macrocode}
%</datetime2-sr-Cyrl-ME.ldf>
%    \end{macrocode}
%\fi
%
%\iffalse
%    \begin{macrocode}
%<*datetime2-sr-Cyrl-BA.ldf>
%    \end{macrocode}
%\fi
%
%\subsection{Serbian \sty{sr-Cyrl-BA} Code
%   (\texttt{datetime2-sr-Cyrl-BA.ldf})}
%\changes{1.0}{2015-03-24}{Initial release}
%\changes{2.0.0}{2019-11-07}{%
%   Added regions, all settings made available to regions so all changes can be
%   region-specific.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%    \begin{macrocode}
\ProvidesDateTimeModule{sr-Cyrl-BA}[2019/11/22 v2.1.0]
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   All localization strings loaded from base module.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% Load appropriate regionless Serbian module.
%    \begin{macrocode}
\RequireDateTimeModule{serbianc}
%    \end{macrocode}
%
%
%
%\subsubsection{Defining the \sty{sr-Cyrl-BA} style}
%
% \changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% \changes{2.0.1}{2019-11-11}{Fixed region name error.}
% Allow the user a way of configuring the "sr-Cyrl-BA" and
% "sr-Cyrl-BA-numeric" styles by providing macros for various format
% elements.
%
% This doesn't use the package-wide separators such as \cs{dtm@datetimesep} in
% case other date formats are also required.
%
%\begin{macro}{\DTMsrCyrlBAdowdaysep}
% The separator between weekday and day.
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlBAdowdaysep}{,\space}
%    \end{macrocode}
%\end{macro}
%
%
%\begin{macro}{\DTMsrCyrlBAdaymonthsep}
% The separator between the day and month for the text format.
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlBAdaymonthsep}{%
  \DTMtexorpdfstring{\protect~}{\space}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrCyrlBAmonthyearsep}
% The separator between the month and year for the text format.
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlBAmonthyearsep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrCyrlBAdatetimesep}
% The separator between the date and time blocks in the full format (either
% text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlBAdatetimesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrCyrlBAtimezonesep}
% The separator between the time and zone blocks in the full format (either
% text or numeric).
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlBAtimezonesep}{\space}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrCyrlBAdatesep}
% The separator for the numeric date format.
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlBAdatesep}{.}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrCyrlBAtimesep}
% The separator for the numeric time format.
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlBAtimesep}{.}
%    \end{macrocode}
%\end{macro}
%
%Provide keys that can be used in \cs{DTMlangsetup} to set these separators.
%    \begin{macrocode}
\DTMdefkey{sr-Cyrl-BA}{dowdaysep}%
    {\renewcommand*{\DTMsr-Cyrl-BAdowdaysep}{#1}}
\DTMdefkey{sr-Cyrl-BA}{daymonthsep}%
    {\renewcommand*{\DTMsr-Cyrl-BAdaymonthsep}{#1}}
\DTMdefkey{sr-Cyrl-BA}{monthyearsep}%
    {\renewcommand*{\DTMsr-Cyrl-BAmonthyearsep}{#1}}
\DTMdefkey{sr-Cyrl-BA}{datetimesep}%
    {\renewcommand*{\DTMsr-Cyrl-BAdatetimesep}{#1}}
\DTMdefkey{sr-Cyrl-BA}{timezonesep}%
    {\renewcommand*{\DTMsr-Cyrl-BAtimezonesep}{#1}}
\DTMdefkey{sr-Cyrl-BA}{datesep}%
    {\renewcommand*{\DTMsr-Cyrl-BAdatesep}{#1}}
\DTMdefkey{sr-Cyrl-BA}{timesep}%
    {\renewcommand*{\DTMsr-Cyrl-BAtimesep}{#1}}
%    \end{macrocode}
%
%\subsubsection{Switches and settings}
%
%\changes{2.0.0}{2019-11-07}{%
%   Added weekday names.
%}
    %\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\begin{macro}{\DTMsrCyrlBAweekdayname}
% Define the weekday name, lowercase.
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlBAweekdayname}%
{\DTMserbiancyrijweekdayname}
%    \end{macrocode}
%\end{macro}

%\begin{macro}{\DTMsrCyrlBAweekdayname}
% Define the weekday name, capitalized.
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlBAWeekdayname}%
    {\DTMserbiancyrijWeekdayname}
%    \end{macrocode}
%\end{macro}
%
% Provide a way to switch between Ekavian and Ijekavian pronunciation.
%\changes{2.0.0}{2019-11-07}{%
%   Added a way to switch between Ekavian and Ijekavian pronunciation.
%}
    %\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%
%    \begin{macrocode}
\DTMdefchoicekey{sr-Cyrl-BA}%
    {pronunciation}[\@dtm@val\@dtm@nr]{ekavian,ijekavian}{%
  \ifcase\@dtm@nr\relax
    \renewcommand*{\DTMsrCyrlBAweekdayname}%
        {\DTMserbiancyrekweekdayname}%
    \renewcommand*{\DTMsrCyrlBAWeekdayname}%
        {\DTMserbiancyrekWeekdayname}%
  \or%
    \renewcommand*{\DTMsrCyrlBAweekdayname}%
        {\DTMserbiancyrijweekdayname}%
    \renewcommand*{\DTMsrCyrlBAWeekdayname}
        {\DTMserbiancyrijWeekdayname}%
  \fi
}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Added a way to switch June, July alternate spellings.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that can switch between (jun, jul) and (juni, juli)
% month spellings.
%    \begin{macrocode}
\DTMdefboolkey{sr-Cyrl-BA}{monthi}[true]{}
%    \end{macrocode}
% The default is without the "i" suffix.
%    \begin{macrocode}
\DTMsetbool{sr-Cyrl-BA}{monthi}{false}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Added a switch for adding leading zeroes in day and month ordinals.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the day and month ordinals should
% have leading zeroes.
%    \begin{macrocode}
\DTMdefboolkey{sr-Cyrl-BA}{leadingzero}[true]{}
%    \end{macrocode}
% The default is to omit the leading zero.
%    \begin{macrocode}
\DTMsetbool{sr-Cyrl-BA}{leadingzero}{false}
%    \end{macrocode}
%
%\begin{macro}{\DTMsrCyrlBAdayordinal}
% Define the day ordinal format to be used by this style.
%    \begin{macrocode}
   \newcommand*{\DTMsrCyrlBAdayordinal}[1]{%
       \DTMifbool{sr-Cyrl-BA}{leadingzero}%
       {\DTMtwodigits{#1}}%
       {\number#1}\DTMsrCyrlBAdatesep}%
%    \end{macrocode}
%\end{macro}
%
%\changes{2.1.0}{2019-11-22}{%
%   Removed year ordinal macro since year ordinals are handled differently now.
%}
%\changes{2.0.0}{2019-11-07}{%
%   Removed the option to switch between writing systems, since that is
%   accomplished by using different regions or regionless styles ("serbian" and
%   "serbianc" for example).
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define the month names.
%
%\begin{macro}{\DTMsrCyrlBAnoimonthname}
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlBAnoimonthname}{\DTMserbiancyrnoimonthname}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrCyrlBAnoiMonthname}
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlBAnoiMonthname}{\DTMserbiancyrnoiMonthname}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrCyrlBAimonthname}
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlBAimonthname}{\DTMserbiancyrimonthname}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMsrCyrlBAiMonthname}
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlBAiMonthname}{\DTMserbiancyriMonthname}
%    \end{macrocode}
%\end{macro}
%\changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the time zone mappings
% should be used.
%    \begin{macrocode}
\DTMdefboolkey{sr-Cyrl-BA}{mapzone}[true]{}
%    \end{macrocode}
% The default is to use mappings.
%    \begin{macrocode}
\DTMsetbool{sr-Cyrl-BA}{mapzone}{true}
%    \end{macrocode}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the day of month should be
% displayed.
%    \begin{macrocode}
\DTMdefboolkey{sr-Cyrl-BA}{showdayofmonth}[true]{}
%    \end{macrocode}
% The default is to show the day of month.
%    \begin{macrocode}
\DTMsetbool{sr-Cyrl-BA}{showdayofmonth}{true}
%    \end{macrocode}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a boolean key that determines if the year should be
% displayed.
%    \begin{macrocode}
\DTMdefboolkey{sr-Cyrl-BA}{showyear}[true]{}
%    \end{macrocode}
% The default is to show the year.
%    \begin{macrocode}
\DTMsetbool{sr-Cyrl-BA}{showyear}{true}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Added weekday names.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%    \begin{macrocode}
\DTMnewstyle%
{sr-Cyrl-BA}% label
{% date style
  \renewcommand*\DTMdisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMsrCyrlBAweekdayname{##4}%
   	    \DTMsrCyrlBAdowdaysep%
   	  \fi
   	\fi
    \DTMifbool{sr-Cyrl-BA}{showdayofmonth}
      {\DTMsrCyrlBAdayordinal{##3}\DTMsrCyrlBAdaymonthsep}%
      {}%
    \DTMifbool{sr-Cyrl-BA}{monthi}%
      {\DTMsrCyrlBAimonthname{##2}}%
      {\DTMsrCyrlBAnoimonthname{##2}}%
    \DTMifbool{sr-Cyrl-BA}{showyear}%
    {%
      \DTMsrCyrlBAmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
  \renewcommand*\DTMDisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMsrCyrlBAWeekdayname{##4}%
   	    \DTMsrCyrlBAdowdaysep%
   	  \fi
   	\fi
    \DTMifbool{sr-Cyrl-BA}{showdayofmonth}
    {%
      \DTMsrCyrlBAdayordinal{##3}\DTMsrCyrlBAdaymonthsep%
      \DTMifbool{sr-Cyrl-BA}{monthi}%
        {\DTMsrCyrlBAimonthname{##2}}%
        {\DTMsrCyrlBAnoimonthname{##2}}%
    }%
    {%
      \DTMifbool{sr-Cyrl-BA}{monthi}%
        {\DTMsrCyrlBAiMonthname{##2}}%
        {\DTMsrCyrlBAnoiMonthname{##2}}%
    }%
    \DTMifbool{sr-Cyrl-BA}{showyear}%
    {%
      \DTMsrCyrlBAmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
}%
{% time style
  \renewcommand*\DTMdisplaytime[3]{%
    \DTMifbool{sr-Cyrl-BA}{leadingzero}{\DTMtwodigits{##1}}{\number##1}%
    \DTMsrCyrlBAtimesep\DTMtwodigits{##2}%
    \ifDTMshowseconds\DTMsrCyrlBAtimesep\DTMtwodigits{##3}\fi
  }%
}%
{% zone style
  \DTMresetzones%
  \DTMsrCyrlBAzonemaps%
  \renewcommand*{\DTMdisplayzone}[2]{%
    \DTMifbool{sr-Cyrl-BA}{mapzone}%
    {\DTMusezonemapordefault{##1}{##2}}%
    {%
      \ifnum##1<0
      \else+\fi\DTMtwodigits{##1}%
      \ifDTMshowzoneminutes\DTMsrCyrlBAtimesep\DTMtwodigits{##2}\fi
    }%
  }%
}%
{% full style
  \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate%
      \DTMdisplaydate{##1}{##2}{##3}{##4}%
      \DTMsrCyrlBAdatetimesep%
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone%
      \DTMsrCyrlBAtimezonesep%
      \DTMdisplayzone{##8}{##9}%
    \fi
  }%
  \renewcommand*{\DTMDisplay}[9]{%
    \ifDTMshowdate%
      \DTMDisplaydate{##1}{##2}{##3}{##4}%
      \DTMsrCyrlBAdatetimesep%
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone%
      \DTMsrCyrlBAtimezonesep%
      \DTMdisplayzone{##8}{##9}%
    \fi
  }%
}%
%    \end{macrocode}
%
%
%\begin{macro}{\DTMsrCyrlBAmonthordinal}
% Define the month ordinal format to be used by this style.
%    \begin{macrocode}
   \newcommand*{\DTMsrCyrlBAmonthordinal}[1]{%
       \DTMifbool{sr-Cyrl-BA}{leadingzero}{\DTMtwodigits{#1}}{\number#1}.}%
%    \end{macrocode}
%\end{macro}
%\changes{2.0.0}{2019-11-07}{%
%   Added a switch between multiple numeric month ordinal formats used in
%   Serbian.
%}
% \changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define a setting to switch between Arabic, uppercase Roman and lowercase
% smallcaps Roman month format for the "srCyrlBA-numeric" style.
%    \begin{macrocode}
\DTMdefchoicekey{sr-Cyrl-BA}{monthord}%
[\@dtm@val\@dtm@nr]{arabic,roman,romanlsc}{%
 \ifcase\@dtm@nr\relax
   \renewcommand*{\DTMsrCyrlBAmonthordinal}[1]{%
       \DTMifbool{sr-Cyrl-BA}{leadingzero}%
         {\DTMtwodigits{##1}}{\number##1}\DTMsrCyrlBAdatesep}%
 \or%
   \renewcommand*{\DTMsrCyrlBAmonthordinal}[1]{%
    \DTMtexorpdfstring{\protect\DTMserbianordinalROMAN{##1}}%
    {serbianordinalROMAN{##1}}}%
 \or%
   \renewcommand*{\DTMsrCyrlBAmonthordinal}[1]{%
    \DTMtexorpdfstring{\textsc{\protect\DTMserbianordinalroman{##1}}}%
    {serbianordinalROMAN{##1}}}%
 \fi
}
%    \end{macrocode}
%\changes{2.0.0}{2019-11-07}{%
%   Fixed the (previously entirely wrong) numeric date style.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%\changes{2.0.0}{2019-11-07}{%
%   Added weekday names.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
% \changes{2.0.1}{2019-11-11}{Removed extraneous paragraph indentation.}
% Define numeric style.
%    \begin{macrocode}
\DTMnewstyle%
{sr-Cyrl-BA-numeric}% label
{% date style
  \renewcommand*\DTMdisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMsrCyrlBAweekdayname{##4}%
   	    \DTMsrCyrlBAdowdaysep%
   	  \fi
   	\fi
    \DTMifbool{sr-Cyrl-BA}{showdayofmonth}%
    {\DTMsrCyrlBAdayordinal{##3}\DTMsrCyrlBAdaymonthsep}%
    {}%
    \DTMsrCyrlBAmonthordinal{##2}%
    \DTMifbool{sr-Cyrl-BA}{showyear}%
    {%
      \DTMsrCyrlBAmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
  \renewcommand*\DTMDisplaydate[4]{%
   	\ifDTMshowdow%
   	  \ifnum##4>-1
   	    \DTMsrCyrlBAWeekdayname{##4}%
   	    \DTMsrCyrlBAdowdaysep%
   	  \fi
   	\fi
    \DTMifbool{sr-Cyrl-BA}{showdayofmonth}%
    {\DTMsrCyrlBAdayordinal{##3}\DTMsrCyrlBAdaymonthsep}%
    {}%
    \DTMsrCyrlBAmonthordinal{##2}%
    \DTMifbool{sr-Cyrl-BA}{showyear}%
    {%
      \DTMsrCyrlBAmonthyearsep%
%    \end{macrocode}
%\changes{2.1.0}{2019-11-22}{%
%   Adapted the code to omit the final dot on starred version of \cs{DTMdate}
%   and \cs{DTMDate}. Thanks Nicola!
%}
%    \begin{macrocode}
      ##1\DTMfinaldot{}%
    }%
    {}%
  }%
}%
{% time style
  \renewcommand*\DTMdisplaytime[3]{%
    \DTMifbool{sr-Cyrl-BA}{leadingzero}{\DTMtwodigits{##1}}{\number##1}%
    \DTMsrCyrlBAtimesep\DTMtwodigits{##2}%
    \ifDTMshowseconds\DTMsrCyrlBAtimesep\DTMtwodigits{##3}\fi
  }%
}%
{% zone style
  \DTMresetzones%
  \DTMsrCyrlBAzonemaps%
  \renewcommand*{\DTMdisplayzone}[2]{%
    \DTMifbool{sr-Cyrl-BA}{mapzone}%
    {\DTMusezonemapordefault{##1}{##2}}%
    {%
      \ifnum##1<0
      \else+\fi\DTMtwodigits{##1}%
      \ifDTMshowzoneminutes\DTMsrCyrlBAtimesep\DTMtwodigits{##2}\fi
    }%
  }%
}%
{% full style
  \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate%
      \DTMdisplaydate{##1}{##2}{##3}{##4}%
      \DTMsrCyrlBAdatetimesep%
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone%
      \DTMsrCyrlBAtimezonesep%
      \DTMdisplayzone{##8}{##9}%
    \fi
  }%
  \renewcommand*{\DTMDisplay}{\DTMdisplay}%
}
%    \end{macrocode}
%
%\begin{macro}{\DTMsr-Cyrl-BAzonemaps}
% The time zone mappings are set through this command, which can be
% redefined if extra mappings are required or mappings need to be
% removed.
%\changes{2.0.1}{2019-11-11}{Replaced wrong parameter for zonemapping.}
%    \begin{macrocode}
\newcommand*{\DTMsrCyrlBAzonemaps}{%
  \DTMdefzonemap{01}{00}{CET}%
  \DTMdefzonemap{02}{00}{CEST}%
}
%    \end{macrocode}
%\end{macro}
% Switch style according to the \opt{useregional} setting.
%    \begin{macrocode}
\DTMifcaseregional%
{}% do nothing
{\DTMsetstyle{sr-Cyrl-BA}}%
{\DTMsetstyle{sr-Cyrl-BA-numeric}}%
%    \end{macrocode}
% Redefine \cs{dateserbianc} (or \cs{date}\meta{dialect}) to prevent
% \sty{babel} from resetting \cs{today}. (For this to work,
% \sty{babel} must already have been loaded if it's required.)
%\changes{1.1}{2019-09-14}{removed spurious space}
%\changes{2.0.0}{2019-11-07}{%
%   Added regions.
%}
%\changes{2.0.1}{2019-11-11}{Adopted semantic versioning.}
%    \begin{macrocode}
\ifcsundef{date\CurrentTrackedDialect}
{%
  \ifundef\dateserbianc%
  {% do nothing
  }%
  {%
    \def\dateserbianc{%
      \DTMifcaseregional%
      {}% do nothing
      {\DTMsetstyle{sr-Cyrl-BA}}%
      {\DTMsetstyle{sr-Cyrl-BA-numeric}}%
    }%
  }%
}%
{%
  \csdef{date\CurrentTrackedDialect}{%
    \DTMifcaseregional%
    {}% do nothing
%    \end{macrocode}
%\changes{2.0.1}{2019-11-11}{Fixed non-regional variant for regional code.}
%\changes{2.1.0}{2019-11-22}{Reverted wrong regional variant changes.}
%    \begin{macrocode}
      {\DTMsetstyle{sr-Cyrl-BA}}%
      {\DTMsetstyle{sr-Cyrl-BA-numeric}}%
  }%
}%
%    \end{macrocode}
%
%\iffalse
%    \begin{macrocode}
%</datetime2-sr-Cyrl-BA.ldf>
%    \end{macrocode}
%\fi
%
%
%
%\restoregeometry{}
%\Finale
\endinput