%%
%% This is file `datetime2-italian.ldf',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% datetime2-italian.dtx  (with options: `datetime2-italian.ldf,package')
%% 
%%  datetime2-italian.dtx
%%  Copyright 2015 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.
%% 
%%  The Current Maintainer of this work is Claudio Duchi
%%  claduc at libero dot it
%% 
%%  This work has the LPPL maintenance status `maintained'.
%% 
%%  This work consists of the files datetime2-italian.dtx and
%%  datetime2-italian.ins and the derived files
%%  datetime2-italian-utf8.ldf, datetime2-italian-ascii.ldf and
%%  datetime2-italian.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{italian}[2015/05/01 v1.3]
\RequirePackage{ifxetex,ifluatex}
\ifxetex
 \RequireDateTimeModule{italian-utf8}
\else
 \ifluatex
   \RequireDateTimeModule{italian-utf8}
 \else
   \RequireDateTimeModule{italian-ascii}
 \fi
\fi
\newcommand*{\DTMitaliandaymonthsep}{\space}
\newcommand*{\DTMitalianmonthyearsep}{\space}
\newcommand*{\DTMitaliandatetimesep}{\space}
\newcommand*{\DTMitaliantimezonesep}{\space}
\newcommand*{\DTMitaliandatesep}{/}
\newcommand*{\DTMitaliantimesep}{:}
\DTMdefkey{italian}{daymonthsep}{\renewcommand*{\DTMitaliandaymonthsep}{#1}}
\DTMdefkey{italian}{monthyearsep}{\renewcommand*{\DTMitalianmonthyearsep}{#1}}
\DTMdefkey{italian}{datetimesep}{\renewcommand*{\DTMitaliandatetimesep}{#1}}
\DTMdefkey{italian}{timezonesep}{\renewcommand*{\DTMitaliantimezonesep}{#1}}
\DTMdefkey{italian}{datesep}{\renewcommand*{\DTMitaliandatesep}{#1}}
\DTMdefkey{italian}{timesep}{\renewcommand*{\DTMitaliantimesep}{#1}}

\DTMdefboolkey{italian}{abbr}[true]{}
\DTMsetbool{italian}{abbr}{false}
\DTMdefboolkey{italian}{mapzone}[true]{}
\DTMsetbool{italian}{mapzone}{true}
\DTMdefboolkey{italian}{showdayofmonth}[true]{}
\DTMsetbool{italian}{showdayofmonth}{true}
\DTMdefboolkey{italian}{showyear}[true]{}
\DTMsetbool{italian}{showyear}{true}
\newcommand*\DTMitalianam{am}%
\newcommand*\DTMitalianpm{pm}%
\newcommand*\DTMitalianmidnight{mezzanotte}%
\newcommand*\DTMitaliannoon{mezzogiorno}%
\newcommand*{\DTMitalianampmfmt}[1]{#1}
\DTMnewstyle
{italian}% label
{% date style
\renewcommand*\DTMdisplaydate[4]{%
\ifDTMshowdow
\ifnum##4>-1%
\DTMifbool{italian}{abbr}%
{\DTMitalianshortweekdayname{##4}}%
{\DTMitalianweekdayname{##4}}%
\space
\fi
\fi
\DTMifbool{italian}{showdayofmonth}%
{%
\DTMitalianordinal{##3}%
\DTMitaliandaymonthsep
}%
{}%
\DTMifbool{italian}{abbr}%
{\DTMitalianshortmonthname{##2}}%
{\DTMitalianmonthname{##2}}%
\DTMifbool{italian}{showyear}%
{%
\DTMitalianmonthyearsep\number##1 % space intended
}%
{}%
}%
\renewcommand*\DTMDisplaydate[4]{%
\ifDTMshowdow
\ifnum##4>-1%
\DTMifbool{italian}{abbr}%
{\DTMitalianshortweekdayname{##4}}%
{\DTMitalianweekdayname{##4}}%
\space
\fi
\fi
\DTMifbool{italian}{showdayofmonth}%
{%
\DTMitalianordinal{##3}%
\DTMitaliandaymonthsep
}%
{}%
\DTMifbool{italian}{abbr}%
{\DTMitalianshortmonthname{##2}}%
{\DTMitalianmonthname{##2}}%
\DTMifbool{italian}{showyear}%
{%
\DTMitalianmonthyearsep\number##1 % space intended
}%
{}%
}%
}%
{% time style
\renewcommand*\DTMitaliantimesep{\DTMitaliantimesep}%
\DTMsettimestyle{default}%
}%
{% zone style
\DTMresetzones
\DTMitalianzonemaps
\renewcommand*{\DTMdisplayzone}[2]{%
\DTMifbool{italian}{mapzone}%
{\DTMusezonemapordefault{##1}{##2}}%
{%
\ifnum##1<0\else+\fi\DTMtwodigits{##1}%
\ifDTMshowzoneminutes\DTMitaliantimesep\DTMtwodigits{##2}\fi
}%
}%
}%
{% full style
\renewcommand*{\DTMdisplay}[9]{%
\ifDTMshowdate
\DTMdisplaydate{##1}{##2}{##3}{##4}%
\DTMitaliandatetimesep
\fi
\DTMdisplaytime{##5}{##6}{##7}%
\ifDTMshowzone
\DTMitaliantimezonesep
\DTMdisplayzone{##8}{##9}%
\fi
}%
\renewcommand*{\DTMDisplay}[9]{%
\ifDTMshowdate
\DTMDisplaydate{##1}{##2}{##3}{##4}%
\DTMitaliandatetimesep
\fi
\DTMdisplaytime{##5}{##6}{##7}%
\ifDTMshowzone
\DTMitaliantimezonesep
\DTMdisplayzone{##8}{##9}%
\fi
}%
}%
\DTMnewstyle
 {italian-numeric}% label
 {% date style
    \renewcommand*\DTMdisplaydate[4]{%
      \DTMifbool{italian}{showdayofmonth}%
      {%
        \number##3 % space intended
        \DTMitaliandatesep
      }%
      {}%
      \number##2 % space intended
      \DTMifbool{italian}{showyear}%
      {%
        \DTMitaliandatesep
        \number##1 % space intended
      }%
      {}%
    }%
    \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
 }%
 {% time style
    \renewcommand*\DTMdisplaytime[3]{%
      \number##1
      \DTMitaliantimesep\DTMtwodigits{##2}%
      \ifDTMshowseconds\DTMitaliantimesep\DTMtwodigits{##3}\fi
    }%
 }%
 {% zone style
   \DTMresetzones
   \DTMitalianzonemaps
   \renewcommand*{\DTMdisplayzone}[2]{%
     \DTMifbool{italian}{mapzone}%
     {\DTMusezonemapordefault{##1}{##2}}%
     {%
       \ifnum##1<0\else+\fi\DTMtwodigits{##1}%
       \ifDTMshowzoneminutes\DTMitaliantimesep\DTMtwodigits{##2}\fi
     }%
   }%
 }%
 {% full style
   \renewcommand*{\DTMdisplay}[9]{%
    \ifDTMshowdate
     \DTMdisplaydate{##1}{##2}{##3}{##4}%
     \DTMitaliandatetimesep
    \fi
    \DTMdisplaytime{##5}{##6}{##7}%
    \ifDTMshowzone
     \DTMitaliantimezonesep
     \DTMdisplayzone{##8}{##9}%
    \fi
   }%
   \renewcommand*{\DTMDisplay}{\DTMdisplay}%
 }
 \DTMnewtimestyle
 {italianampm}% label
 {%
  \renewcommand*\DTMdisplaytime[3]{%
  \ifnum##2=0
  \ifnum##1=12
  \DTMtexorpdfstring
  {\DTMitalianampmfmt{\DTMitaliannoon}}%
  {\DTMitaliannoon}%
  \else
  \ifnum##1=0
  \DTMtexorpdfstring
  {\DTMitalianampmfmt{\DTMitalianmidnight}}%
  {\DTMitalianmidnight}%
  \else
  \ifnum##1=24
  \DTMtexorpdfstring
  {\DTMitalianampmfmt{\DTMitalianmidnight}}%
  {\DTMitalianmidnight}%
  \else
  \ifnum##1<12
  \number##1
  \DTMtexorpdfstring
  {\DTMitalianampmfmt{\DTMitalianam}}%
  {\DTMitalianam}%
  \else
  \number\numexpr##1-12\relax
  \DTMtexorpdfstring
  {\DTMitalianampmfmt{\DTMitalianpm}}%
  {\DTMitalianpm}%
  \fi
  \fi
  \fi
  \fi
  \else
  \ifnum##1<13
  \ifnum##1=0
  12%
  \else
  \number##1
  \fi
  \DTMitaliantimesep\DTMtwodigits{##2}%
  \ifnum##1=12
  \DTMtexorpdfstring
  {\DTMitalianampmfmt{\DTMitalianam}}%
  {\DTMitalianpm}%
  \else
  \DTMtexorpdfstring
  {\DTMitalianampmfmt{\DTMitalianam}}%
  {\DTMitalianam}%
  \fi
  \else
  \number\numexpr##1-12\relax
  \DTMitaliantimesep\DTMtwodigits{##2}%
  \ifnum##1=24
  \DTMtexorpdfstring
  {\DTMitalianampmfmt{\DTMitalianpm}}%
  {\DTMitalianam}%
  \else
  \DTMtexorpdfstring
  {\DTMitalianampmfmt{\DTMitalianpm}}%
  {\DTMitalianpm}%
  \fi
  \fi
  \fi
  }%
 }%
 \DTMnewtimestyle
 {italian-twenty-four}% label
 {%
  \renewcommand*\DTMdisplaytime[3]{%
  \ifnum##2=0
  \ifnum##1=12
  \DTMtexorpdfstring
  {\DTMitalianampmfmt{\DTMitaliannoon}}%
  {\DTMitaliannoon}%
  \else
  \ifnum##1=0
  \DTMtexorpdfstring
  {\DTMitalianampmfmt{\DTMitalianmidnight}}%
  {\DTMitalianmidnight}%
  \else
  \ifnum##1=24
  \DTMtexorpdfstring
  {\DTMitalianampmfmt{\DTMitalianmidnight}}%
  {\DTMitalianmidnight}%
  \else
  \ifnum##1<12
  \DTMtwodigits{##1}\DTMitaliantimesep\DTMtwodigits{##2}%
  \else
  \DTMtwodigits{##1}\DTMitaliantimesep\DTMtwodigits{##2}%
  \fi
  \fi
  \fi
  \fi
  \else
  \ifnum##1<13
  \ifnum##1=0
  \DTMtwodigits{##1}%
  \else
  \DTMtwodigits{##1}\relax
  \fi
  \DTMitaliantimesep\DTMtwodigits{##2}%
  \else
  \DTMtwodigits{##1}\relax
  \DTMitaliantimesep\DTMtwodigits{##2}%
  \fi
  \fi
  }%
 }%
\newcommand*{\DTMitalianzonemaps}{%
  \DTMdefzonemap{01}{00}{CET}%
  \DTMdefzonemap{02}{00}{CEST}%
}
\DTMifcaseregional
{}% do nothing
{\DTMsetstyle{italian}}
{\DTMsetstyle{italian-numeric}}
\ifcsundef{date\CurrentTrackedDialect}
{%
  \ifundef\dateitalian
  {% do nothing
  }%
  {%
    \def\dateitalian{%
      \DTMifcaseregional
      {}% do nothing
      {\DTMsetstyle{italian}}%
      {\DTMsetstyle{italian-numeric}}%
    }%
  }%
}%
{%
  \csdef{date\CurrentTrackedDialect}{%
    \DTMifcaseregional
    {}% do nothing
    {\DTMsetstyle{italian}}%
    {\DTMsetstyle{italian-numeric}}
  }%
}%
\endinput
%%
%% End of file `datetime2-italian.ldf'.
