%%
%% This is file `datetime2-breton.ldf',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% datetime2-breton.dtx  (with options: `datetime2-breton.ldf,package')
%% 
%%  datetime2-breton.dtx
%%  Copyright 2015-2019 Nicola Talbot
%% 
%%  This work may be distributed and/or modified under the
%%  conditions of the LaTeX Project Public License, either version 1.3
%%  of this license of (at your option) any later version.
%%  The latest version of this license is in
%%    http://www.latex-project.org/lppl.txt
%%  and version 1.3 or later is part of all distributions of LaTeX
%%  version 2005/12/01 or later.
%% 
%%  This work has the LPPL maintenance status `inactive'.
%% 
%%  This work consists of the files datetime2-breton.dtx and
%%  datetime2-breton.ins and the derived files
%%  datetime2-breton-utf8.ldf, datetime2-breton-ascii.ldf and
%%  datetime2-breton.ldf.
%% 
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
\ProvidesDateTimeModule{breton}[2019/11/05 v1.2]
\RequirePackage{ifxetex,ifluatex}
\ifxetex
 \RequireDateTimeModule{breton-utf8}
\else
 \ifluatex
   \RequireDateTimeModule{breton-utf8}
 \else
   \RequireDateTimeModule{breton-ascii}
 \fi
\fi
\newcommand*{\DTMbretondaymonthsep}{\space a\space viz\space}
\newcommand*{\DTMbretonmonthyearsep}{\space}
\newcommand*{\DTMbretondatetimesep}{\space}
\newcommand*{\DTMbretontimezonesep}{\space}
\newcommand*{\DTMbretondatesep}{/}
\newcommand*{\DTMbretontimesep}{:}
\DTMdefkey{breton}{daymonthsep}{\renewcommand*{\DTMbretondaymonthsep}{#1}}
\DTMdefkey{breton}{monthyearsep}{\renewcommand*{\DTMbretonmonthyearsep}{#1}}
\DTMdefkey{breton}{datetimesep}{\renewcommand*{\DTMbretondatetimesep}{#1}}
\DTMdefkey{breton}{timezonesep}{\renewcommand*{\DTMbretontimezonesep}{#1}}
\DTMdefkey{breton}{datesep}{\renewcommand*{\DTMbretondatesep}{#1}}
\DTMdefkey{breton}{timesep}{\renewcommand*{\DTMbretontimesep}{#1}}
\DTMdefchoicekey{breton}{ord}[\@dtm@val\@dtm@nr]{level,raise,omit,sc}{%
 \ifcase\@dtm@nr\relax
   \renewcommand*{\DTMbretonfmtordsuffix}[1]{##1}%
 \or
   \renewcommand*{\DTMbretonfmtordsuffix}[1]{%
    \DTMtexorpdfstring{\protect\textsuperscript{##1}}{##1}}%
 \or
   \renewcommand*{\DTMbretonfmtordsuffix}[1]{}%
 \or
   \renewcommand*{\DTMbretonfmtordsuffix}[1]{%
    \DTMtexorpdfstring{\protect\textsc{##1}}{##1}}%
 \fi
}
\DTMdefboolkey{breton}{mapzone}[true]{}
\DTMsetbool{breton}{mapzone}{true}
\DTMdefboolkey{breton}{showdayofmonth}[true]{}
\DTMsetbool{breton}{showdayofmonth}{true}
\DTMdefboolkey{breton}{showyear}[true]{}
\DTMsetbool{breton}{showyear}{true}
\DTMnewstyle
 {breton}% label
 {% date style
   \renewcommand*\DTMdisplaydate[4]{%
     \DTMifbool{breton}{showdayofmonth}
     {\DTMbretonordinal{##3}\DTMbretondaymonthsep}%
     {}%
     \DTMbretonmonthname{##2}%
     \DTMifbool{breton}{showyear}%
     {%
       \DTMbretonmonthyearsep
       \number##1 % space intended
     }%
     {}%
   }%
   \renewcommand*\DTMDisplaydate{\DTMdisplaydate}%
 }%
 {% time style (use default)
   \DTMsettimestyle{default}%
 }%
 {% zone style
   \DTMresetzones
   \DTMbretonzonemaps
   \renewcommand*{\DTMdisplayzone}[2]{%
     \DTMifbool{breton}{mapzone}%
     {\DTMusezonemapordefault{##1}{##2}}%
     {%
       \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
       \ifDTMshowzoneminutes\DTMbretontimesep\DTMtwodigits{##2}\fi
     }%
   }%
 }%
 {% full style
   \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate
     \DTMdisplaydate{##1}{##2}{##3}{##4}%
     \DTMbretondatetimesep
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone
     \DTMbretontimezonesep
     \DTMdisplayzone{##8}{##9}%
    \fi
   }%
   \renewcommand*{\DTMDisplay}{\DTMdisplay}%
 }%
\DTMnewstyle
 {breton-numeric}% label
 {% date style
    \renewcommand*\DTMdisplaydate[4]{%
      \DTMifbool{breton}{showdayofmonth}%
      {%
        \number##3 % space intended
        \DTMbretondatesep
      }%
      {}%
      \number##2 % space intended
      \DTMifbool{breton}{showyear}%
      {%
        \DTMbretondatesep
        \number##1 % space intended
      }%
      {}%
    }%
    \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
 }%
 {% time style
    \renewcommand*\DTMdisplaytime[3]{%
      \number##1 % space intended
      \DTMbretontimesep\DTMtwodigits{##2}%
      \ifDTMshowseconds\DTMbretontimesep\DTMtwodigits{##3}\fi
    }%
 }%
 {% zone style
   \DTMresetzones
   \DTMbretonzonemaps
   \renewcommand*{\DTMdisplayzone}[2]{%
     \DTMifbool{breton}{mapzone}%
     {\DTMusezonemapordefault{##1}{##2}}%
     {%
       \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
       \ifDTMshowzoneminutes\DTMbretontimesep\DTMtwodigits{##2}\fi
     }%
   }%
 }%
 {% full style
   \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate
     \DTMdisplaydate{##1}{##2}{##3}{##4}%
     \DTMbretondatetimesep
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone
     \DTMbretontimezonesep
     \DTMdisplayzone{##8}{##9}%
    \fi
   }%
   \renewcommand*{\DTMDisplay}{\DTMdisplay}%
 }
\newcommand*{\DTMbretonzonemaps}{%
  \DTMdefzonemap{01}{00}{CET}%
  \DTMdefzonemap{02}{00}{CEST}%
}

\DTMifcaseregional
{}% do nothing
{\DTMsetstyle{breton}}
{\DTMsetstyle{breton-numeric}}
\ifcsundef{date\CurrentTrackedDialect}
{%
  \ifundef\datebreton
  {% do nothing
  }%
  {%
    \def\datebreton{%
      \DTMifcaseregional
      {}% do nothing
      {\DTMsetstyle{breton}}%
      {\DTMsetstyle{breton-numeric}}%
    }%
  }%
}%
{%
  \csdef{date\CurrentTrackedDialect}{%
    \DTMifcaseregional
    {}% do nothing
    {\DTMsetstyle{breton}}%
    {\DTMsetstyle{breton-numeric}}%
  }%
}%
\endinput
%%
%% End of file `datetime2-breton.ldf'.
