summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/datetime2-italian/datetime2-italian.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/datetime2-italian/datetime2-italian.dtx')
-rw-r--r--Master/texmf-dist/source/latex/datetime2-italian/datetime2-italian.dtx100
1 files changed, 77 insertions, 23 deletions
diff --git a/Master/texmf-dist/source/latex/datetime2-italian/datetime2-italian.dtx b/Master/texmf-dist/source/latex/datetime2-italian/datetime2-italian.dtx
index df151199e0e..1c194b04535 100644
--- a/Master/texmf-dist/source/latex/datetime2-italian/datetime2-italian.dtx
+++ b/Master/texmf-dist/source/latex/datetime2-italian/datetime2-italian.dtx
@@ -20,8 +20,6 @@
% \iffalse
% Doc-Source file to use with LaTeX2e
% Copyright (C) 2015 Nicola Talbot, all rights reserved.
-%
-% I have added dates in formed short e ampm format
% \fi
% \iffalse
%<*driver>
@@ -38,7 +36,7 @@
pdftitle={datetime2.sty Italian Module}]{hyperref}
-\CheckSum{414}
+\CheckSum{467}
\renewcommand*{\usage}[1]{\hyperpage{#1}}
\renewcommand*{\main}[1]{\hyperpage{#1}}
@@ -62,13 +60,12 @@
%
%\title{Italian Module for datetime2 Package}
%\author{Nicola L. C. Talbot (inactive)}
-%\date{2015-03-27 (v1.0)}
+%\date{2015-05-01 (v1.3)}
%\maketitle
%
-%This module is currently unmaintained and may be subject to change.
-%If you want to volunteer to take over maintanance, contact me at
-%\url{http://www.dickimaw-books.com/contact.html}
+% This module is currently maintained and may be subject to change.
%
+% The Current Maintainer of this work is Claudio Duchi claduc at libero dot it
%\begin{abstract}
%This is the Italian language module for the \sty{datetime2}
%package. If you want to use the settings in this module you must
@@ -100,10 +97,13 @@
%This file contains the settings that use UTF-8 characters. This
%file is loaded if XeLaTeX or LuaLaTeX are used. Please make sure
%your text editor is set to UTF-8 if you want to view this code.
-%\changes{1.0}{2015-03-27}{Initial release}
+%\changes{1.0}{2015-03-10}{Initial release}
+%\changes{1.1}{2015-04-10}{Add timestyle italianampm% }
+%\changes{1.2}{2015-04-16}{Add timestyle italian-twenty-four% }
+%\changes{1.3}{2015-05-01}{bug fif% }
% Identify module
% \begin{macrocode}
-\ProvidesDateTimeModule{italian-utf8}[2015/04/10 v1.1]
+\ProvidesDateTimeModule{italian-utf8}[2015/05/01 v1.3]
% \end{macrocode}
%\begin{macro}{\DTMitalianordinal}
% \begin{macrocode}
@@ -118,6 +118,7 @@
% \begin{macrocode}
\newcommand*{\DTMitalianmonthname}[1]{%
\ifcase#1
+ \or
gennaio%
\or
febbraio%
@@ -147,7 +148,6 @@
%\end{macro}
%
%
-
%
%\begin{macro}{\DTMitalianweekdayname}
%These are provided here but not currently used in the date format.
@@ -178,6 +178,7 @@
% \begin{macrocode}
\newcommand*{\DTMitalianshortmonthname}[1]{%
\ifcase#1
+ \or
gen.%
\or
feb.%
@@ -245,14 +246,15 @@
%\texttt{datetime2-italian-utf8.ldf} file as the non-ASCII
%characters are made active in that situation and would need
%protecting against expansion.
-%\changes{1.0}{2015-03-27}{Initial release}
+%\changes{1.0}{2015-03-10}{Initial release}
+%\changes{1.1}{2015-04-10}{Add timestyle italianampm% }
+%\changes{1.2}{2015-04-16}{Add timestyle italian-twenty-four% }
+%\changes{1.3}{2015-05-01}{bug fif% }
% Identify module
% \begin{macrocode}
-\ProvidesDateTimeModule{italian-ascii}[2015/04/10 v1.1]
+\ProvidesDateTimeModule{italian-ascii}[2015/05/01 v1.3]
% \end{macrocode}
%
-%If abbreviated dates are supported, short month names should be
-%likewise provided.
%\begin{macro}{\DTMitalianordinal}
% \begin{macrocode}
\newcommand*{\DTMitalianordinal}[1]{%
@@ -384,7 +386,10 @@
%
%\subsection{Main Italian Module (\texttt{datetime2-italian.ldf})}
%\changes{1.0}{2015-03-10}{Initial release}
-%\changes{1.1}{2015-04-10}{updating}
+%\changes{1.1}{2015-04-10}{Add timestyle italianampm% }
+%\changes{1.2}{2015-04-16}{Add timestyle italian-twenty-four% }
+%\changes{1.3}{2015-05-01}{bug fif% }
+%
%\iffalse
% \begin{macrocode}
%<*datetime2-italian.ldf>
@@ -393,7 +398,7 @@
%
% Identify Module
% \begin{macrocode}
-\ProvidesDateTimeModule{italian}[2015/04/10 v1.1]
+\ProvidesDateTimeModule{italian}[2015/05/01 v1.3]
% \end{macrocode}
% Need to find out if XeTeX or LuaTeX are being used.
% \begin{macrocode}
@@ -416,10 +421,12 @@
%
% Define the \texttt{italian} style.
% The time style is the same as the "default" style
-% provided by \sty{datetime2}. This may need correcting.
+% provided by \sty{datetime2}.
%
-% Allow the user a way of configuring the "italian" and
-% "italian-numeric" styles. This doesn't use the package wide
+% the packet defines the styles: "italian",
+% "italian-numeric", "italianampm" and "italian-twenty-four" styles.
+%
+%This doesn't use the package wide
% separators such as
% \cs{dtm@datetimesep} in case other date formats are also required.
%\begin{macro}{\DTMitaliandaymonthsep}
@@ -466,8 +473,8 @@
% \end{macrocode}
%\end{macro}
%
-%Provide keys that can be used in \cs{DTMlangsetup} to set these
-%separators.
+% Provide keys that can be used in \cs{DTMlangsetup} to set these
+% separators.
% \begin{macrocode}
\DTMdefkey{italian}{daymonthsep}{\renewcommand*{\DTMitaliandaymonthsep}{#1}}
\DTMdefkey{italian}{monthyearsep}{\renewcommand*{\DTMitalianmonthyearsep}{#1}}
@@ -589,7 +596,7 @@
}%
{% time style
\renewcommand*\DTMitaliantimesep{\DTMitaliantimesep}%
- \DTMsettimestyle{default}%ampm
+ \DTMsettimestyle{default}%
}%
{% zone style
\DTMresetzones
@@ -757,6 +764,54 @@
}%
% \end{macrocode}
%
+% Define italian-twenty-four style.
+%
+% \begin{macrocode}
+ \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
+ }%
+ }%
+% \end{macrocode}
+%
%
%\begin{macro}{\DTMitalianzonemaps}
% The time zone mappings are set through this command, which can be
@@ -769,7 +824,6 @@
}
% \end{macrocode}
%\end{macro}
-
% Switch style according to the \opt{useregional} setting.
% \begin{macrocode}
\DTMifcaseregional