diff options
author | Karl Berry <karl@freefriends.org> | 2015-04-10 20:55:01 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-04-10 20:55:01 +0000 |
commit | 0d527272b84ca6a34b5ea36669490b69238341de (patch) | |
tree | 44fd760eb9c842a3a2868c8ebefef70ce5c60fad /Master/texmf-dist/tex/latex/datetime2-italian/datetime2-italian.ldf | |
parent | 8c3034b5cd54c82925a751f02ee0d81e13b063fa (diff) |
datetime2-italian (10apr15)
git-svn-id: svn://tug.org/texlive/trunk@36761 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/datetime2-italian/datetime2-italian.ldf')
-rw-r--r-- | Master/texmf-dist/tex/latex/datetime2-italian/datetime2-italian.ldf | 240 |
1 files changed, 170 insertions, 70 deletions
diff --git a/Master/texmf-dist/tex/latex/datetime2-italian/datetime2-italian.ldf b/Master/texmf-dist/tex/latex/datetime2-italian/datetime2-italian.ldf index 986108fb31a..968f59a5133 100644 --- a/Master/texmf-dist/tex/latex/datetime2-italian/datetime2-italian.ldf +++ b/Master/texmf-dist/tex/latex/datetime2-italian/datetime2-italian.ldf @@ -17,7 +17,9 @@ %% 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'. +%% The Current Maintainer of this work is Claudio Duchi +%% +%% 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 @@ -39,7 +41,7 @@ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} -\ProvidesDateTimeModule{italian}[2015/03/27 v1.0] +\ProvidesDateTimeModule{italian}[2015/04/10 v1.1] \RequirePackage{ifxetex,ifluatex} \ifxetex \RequireDateTimeModule{italian-utf8} @@ -62,81 +64,112 @@ \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]{% - \DTMifbool{italian}{showdayofmonth} - {\DTMitalianordinal{##3}\DTMitaliandaymonthsep}% - {}% - \DTMitalianmonthname{##2}% - \DTMifbool{italian}{showyear}% - {% - \DTMitalianmonthyearsep - \number##1 % space intended - }% - {}% - }% - \renewcommand*\DTMDisplaydate[4]{% - \DTMifbool{italian}{showdayofmonth} - {% - \DTMitalianordinal{##3}\DTMitaliandaymonthsep - \DTMitalianmonthname{##2}% - }% - {\DTMitalianMonthname{##2}}% - \DTMifbool{italian}{showyear}% - {% - \DTMitalianmonthyearsep - \number##1 % space intended - }% - {}% - }% - }% - {% time style (use default) - \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 - }% - }% +{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}%ampm +}% +{% 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 @@ -190,6 +223,73 @@ }% \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 + }% + }% \newcommand*{\DTMitalianzonemaps}{% \DTMdefzonemap{01}{00}{CET}% \DTMdefzonemap{02}{00}{CEST}% |