summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/datetime2
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-07-20 22:07:31 +0000
committerKarl Berry <karl@freefriends.org>2018-07-20 22:07:31 +0000
commit508092db4c6970ec4149a2d3e78db1777858e542 (patch)
treefafa3efa3490dcd3922f69aade9052e3b1bff36f /Master/texmf-dist/source/latex/datetime2
parent74cf182a295fac33607870e90e1f8cb33fa22f9a (diff)
datetime2 (20jul18)
git-svn-id: svn://tug.org/texlive/trunk@48236 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/datetime2')
-rw-r--r--Master/texmf-dist/source/latex/datetime2/datetime2.dtx226
-rw-r--r--Master/texmf-dist/source/latex/datetime2/datetime2.ins6
2 files changed, 199 insertions, 33 deletions
diff --git a/Master/texmf-dist/source/latex/datetime2/datetime2.dtx b/Master/texmf-dist/source/latex/datetime2/datetime2.dtx
index 569cd0b0ef7..8791e302ed5 100644
--- a/Master/texmf-dist/source/latex/datetime2/datetime2.dtx
+++ b/Master/texmf-dist/source/latex/datetime2/datetime2.dtx
@@ -1,13 +1,13 @@
%\iffalse
-% datetime2.dtx generated using makedtx version 1.1 (c) Nicola Talbot
+% datetime2.dtx generated using makedtx version 1.2 (c) Nicola Talbot
% Command line args:
-% -author "Nicola Talbot"
% -src "datetime2.sty\Z=>datetime2.sty"
% -src "datetime2-calc.sty\Z=>datetime2-calc.sty"
-% -section "chapter"
+% -author "Nicola Talbot"
% -doc "datetime2-manual.tex"
+% -section "chapter"
% datetime2
-% Created on 2016/7/12 13:25
+% Created on 2018/7/20 12:36
%\fi
%\iffalse
%<*package>
@@ -30,7 +30,7 @@
%\fi
% \iffalse
% Doc-Source file to use with LaTeX2e
-% Copyright (C) 2016 Nicola Talbot, all rights reserved.
+% Copyright (C) 2018 Nicola Talbot, all rights reserved.
% \fi
% \iffalse
%<*driver>
@@ -47,7 +47,7 @@
pdfauthor={Nicola L.C. Talbot},
pdftitle={datetime2: date and time formats}]{hyperref}
-\CheckSum{2558}
+\CheckSum{2622}
\RecordChanges
\DisableCrossrefs
@@ -91,11 +91,11 @@
%
%\MakeShortVerb{"}
%
-%\title{datetime2 v1.5.2:
+%\title{datetime2 v1.5.3:
%date and time formats}
%\author{Nicola L. C. Talbot\\\url{http://www.dickimaw-books.com/}}
%
-%\date{2016-07-12}
+%\date{2018-07-20}
%\maketitle
%
%\begin{abstract}
@@ -2608,7 +2608,7 @@
%\DTMsaveddatetojulianday{mydate}{\myct}
%\end{verbatim}
%
-%\begin{definition}[\DescribeMacro\DTMsaveddateoffsettojuliandate]
+%\begin{definition}[\DescribeMacro\DTMsaveddateoffsettojulianday]
%\cs{DTMsaveddateoffsettojulianday}\marg{name}\marg{offset}\marg{register}
%\end{definition}
%This is like the previous command but converts the date obtained by
@@ -5686,7 +5686,7 @@
%\changes{1.0}{2015-03-24}{Initial release}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datetime2}[2016/07/12 v1.5.2 (NLCT) date and time formats]
+\ProvidesPackage{datetime2}[2018/07/20 v1.5.3 (NLCT) date and time formats]
% \end{macrocode}
% Use \sty{tracklang} to find out what languages have been loaded.
% \begin{macrocode}
@@ -5727,7 +5727,23 @@
{%
% \end{macrocode}
%Neither \cs{pdfcreationdate} nor \cs{pdffeedback} are defined.
-%(The \TeX\ format is most probably \XeLaTeX.) If \sty{texosquery}
+%(The \TeX\ format is most probably \XeLaTeX.)
+%If the \sty{locale} package has been loaded, \cs{LocaleNowStamp}
+%should be available.
+% \begin{macrocode}
+ \ifdef\LocaleNowStamp
+ {%
+ \ifx\LocaleNowStamp\empty
+% \end{macrocode}
+%OS query failed, so there's no point trying directly with
+%\sty{texosquery}.
+% \begin{macrocode}
+ \else
+ \let\dtm@pdfcreationdate\LocaleNowStamp
+ \fi
+ }%
+% \end{macrocode}
+% If \sty{texosquery}
%has been loaded, then the current date and time can be fetched
%using \ics{TeXOSQueryNow} provided the shell escape has been
%enabled. (It might not be, so don't automatically load
@@ -5736,19 +5752,21 @@
%been defined.
%\changes{1.5.2}{2016-07-12}{added check for \cs{TeXOSQueryNow}}
% \begin{macrocode}
- \ifdef\TeXOSQueryNow
{%
- \TeXOSQueryNow{\dtm@pdfcreationdate}%
- \ifdefempty\dtm@pdfcreationdate
+ \ifdef\TeXOSQueryNow
{%
+ \TeXOSQueryNow{\dtm@pdfcreationdate}%
+ \ifdefempty\dtm@pdfcreationdate
+ {%
% \end{macrocode}
%Failed (maybe shell escape has been disabled).
% \begin{macrocode}
- \undef\dtm@pdfcreationdate
+ \undef\dtm@pdfcreationdate
+ }%
+ {}%
}%
{}%
}%
- {}%
}%
}
% \end{macrocode}
@@ -7465,7 +7483,12 @@
Z%
}%
{%
- \ifnum##1<0\else+\fi\DTMtwodigits{##1}%
+% \end{macrocode}
+%\changes{1.5.3}{2018-07-20}{added space after test}
+%A space is needed after the conditional to prevent an unwanted
+%\cs{relax} from being inserted if the time zone is negative.
+% \begin{macrocode}
+ \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
\ifDTMshowzoneminutes\DTMsep{hourmin}\DTMtwodigits{##2}\fi
}%
}%
@@ -7518,7 +7541,12 @@
Z%
}%
{%
- \ifnum##1<0\else+\fi\DTMtwodigits{##1}%
+% \end{macrocode}
+%\changes{1.5.3}{2018-07-20}{added space after test}
+%A space is needed after the conditional to prevent an unwanted
+%\cs{relax} from being inserted if the time zone is negative.
+% \begin{macrocode}
+ \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
\ifDTMshowzoneminutes:\DTMtwodigits{##2}\fi
}%
}%
@@ -7571,7 +7599,12 @@
Z%
}%
{%
- \ifnum##1<0\else+\fi\DTMtwodigits{##1}'\DTMtwodigits{##2}'%
+% \end{macrocode}
+%\changes{1.5.3}{2018-07-20}{added space after test}
+%A space is needed after the conditional to prevent an unwanted
+%\cs{relax} from being inserted if the time zone is negative.
+% \begin{macrocode}
+ \ifnum##1<0 \else+\fi\DTMtwodigits{##1}'\DTMtwodigits{##2}'%
}%
}%
}%
@@ -7616,7 +7649,12 @@
Z%
}%
{%
- \ifnum##1<0\else+\fi\DTMtwodigits{##1}%
+% \end{macrocode}
+%\changes{1.5.3}{2018-07-20}{added space after test}
+%A space is needed after the conditional to prevent an unwanted
+%\cs{relax} from being inserted if the time zone is negative.
+% \begin{macrocode}
+ \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
\ifDTMshowzoneminutes\DTMsep{hourmin}\DTMtwodigits{##2}\fi
}%
}%
@@ -7671,7 +7709,12 @@
Z%
}%
{%
- \ifnum##1<0\else+\fi\DTMtwodigits{##1}%
+% \end{macrocode}
+%\changes{1.5.3}{2018-07-20}{added space after test}
+%A space is needed after the conditional to prevent an unwanted
+%\cs{relax} from being inserted if the time zone is negative.
+% \begin{macrocode}
+ \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
\ifDTMshowzoneminutes\DTMsep{hourmin}\DTMtwodigits{##2}\fi
}%
}%
@@ -7728,7 +7771,12 @@
Z%
}%
{%
- \ifnum##1<0\else+\fi\DTMtwodigits{##1}%
+% \end{macrocode}
+%\changes{1.5.3}{2018-07-20}{added space after test}
+%A space is needed after the conditional to prevent an unwanted
+%\cs{relax} from being inserted if the time zone is negative.
+% \begin{macrocode}
+ \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
\ifDTMshowzoneminutes\DTMsep{hourmin}\DTMtwodigits{##2}\fi
}%
}%
@@ -7785,7 +7833,12 @@
Z%
}%
{%
- \ifnum##1<0\else+\fi\DTMtwodigits{##1}%
+% \end{macrocode}
+%\changes{1.5.3}{2018-07-20}{added space after test}
+%A space is needed after the conditional to prevent an unwanted
+%\cs{relax} from being inserted if the time zone is negative.
+% \begin{macrocode}
+ \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
\ifDTMshowzoneminutes\DTMsep{hourmin}\DTMtwodigits{##2}\fi
}%
}%
@@ -7841,7 +7894,12 @@
Z%
}%
{%
- \ifnum##1<0\else+\fi\DTMtwodigits{##1}%
+% \end{macrocode}
+%\changes{1.5.3}{2018-07-20}{added space after test}
+%A space is needed after the conditional to prevent an unwanted
+%\cs{relax} from being inserted if the time zone is negative.
+% \begin{macrocode}
+ \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
\ifDTMshowzoneminutes\DTMsep{hourmin}\DTMtwodigits{##2}\fi
}%
}%
@@ -7896,7 +7954,12 @@
Z%
}%
{%
- \ifnum##1<0\else+\fi\DTMtwodigits{##1}%
+% \end{macrocode}
+%\changes{1.5.3}{2018-07-20}{added space after test}
+%A space is needed after the conditional to prevent an unwanted
+%\cs{relax} from being inserted if the time zone is negative.
+% \begin{macrocode}
+ \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
\ifDTMshowzoneminutes\DTMsep{hourmin}\DTMtwodigits{##2}\fi
}%
}%
@@ -7953,7 +8016,12 @@
Z%
}%
{%
- \ifnum##1<0\else+\fi\DTMtwodigits{##1}%
+% \end{macrocode}
+%\changes{1.5.3}{2018-07-20}{added space after test}
+%A space is needed after the conditional to prevent an unwanted
+%\cs{relax} from being inserted if the time zone is negative.
+% \begin{macrocode}
+ \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
\ifDTMshowzoneminutes\DTMsep{hourmin}\DTMtwodigits{##2}\fi
}%
}%
@@ -8010,7 +8078,12 @@
Z%
}%
{%
- \ifnum##1<0\else+\fi\DTMtwodigits{##1}%
+% \end{macrocode}
+%\changes{1.5.3}{2018-07-20}{added space after test}
+%A space is needed after the conditional to prevent an unwanted
+%\cs{relax} from being inserted if the time zone is negative.
+% \begin{macrocode}
+ \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
\ifDTMshowzoneminutes\DTMsep{hourmin}\DTMtwodigits{##2}\fi
}%
}%
@@ -8066,7 +8139,12 @@
Z%
}%
{%
- \ifnum##1<0\else+\fi\DTMtwodigits{##1}%
+% \end{macrocode}
+%\changes{1.5.3}{2018-07-20}{added space after test}
+%A space is needed after the conditional to prevent an unwanted
+%\cs{relax} from being inserted if the time zone is negative.
+% \begin{macrocode}
+ \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
\ifDTMshowzoneminutes\DTMsep{hourmin}\DTMtwodigits{##2}\fi
}%
}%
@@ -8122,7 +8200,12 @@
{hhmm}% label
{%
\renewcommand*\DTMdisplaytime[3]{%
- \ifnum##1<0\else+\fi\DTMtwodigits{##1}%
+% \end{macrocode}
+%\changes{1.5.3}{2018-07-20}{added space after test}
+%A space is needed after the conditional to prevent an unwanted
+%\cs{relax} from being inserted if the time zone is negative.
+% \begin{macrocode}
+ \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
\ifDTMshowzoneminutes\DTMsep{hourmin}\DTMtwodigits{##2}\fi
}%
}
@@ -8245,6 +8328,38 @@
%\end{macro}
%
%\begin{macro}{\DTMsavenow}
+%\changes{1.5.3}{??}{new}
+%Save the date-time stamp in PDF format.
+% \begin{macrocode}
+\newrobustcmd*{\DTMsavepdftimestamp}[2]{%
+ \edef\@dtm@tmp{#2}%
+ \ifx\@dtm@tmp\empty
+ \cslet{@dtm@#1@year}{0}%
+ \cslet{@dtm@#1@month}{0}%
+ \cslet{@dtm@#1@day}{0}%
+ \cslet{@dtm@#1@dow}{0}%
+ \cslet{@dtm@#1@hour}{0}%
+ \cslet{@dtm@#1@minute}{0}%
+ \cslet{@dtm@#1@second}{0}%
+ \cslet{@dtm@#1@TZhour}{0}%
+ \cslet{@dtm@#1@TZminute}{0}%
+ \else
+ \expandafter\@dtm@parsepdfdatetime\@dtm@tmp\@dtm@endparsepdfdatetime
+ \cslet{@dtm@#1@year}{\@dtm@year}%
+ \cslet{@dtm@#1@month}{\@dtm@month}%
+ \cslet{@dtm@#1@day}{\@dtm@day}%
+ \cslet{@dtm@#1@dow}{\@dtm@dow}%
+ \cslet{@dtm@#1@hour}{\@dtm@hour}%
+ \cslet{@dtm@#1@minute}{\@dtm@minute}%
+ \cslet{@dtm@#1@second}{\@dtm@second}%
+ \cslet{@dtm@#1@TZhour}{\@dtm@timezonehour}%
+ \cslet{@dtm@#1@TZminute}{\@dtm@timezoneminute}%
+ \fi
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\DTMsavenow}
%Save the current time.
% \begin{macrocode}
\newrobustcmd{\DTMsavenow}[1]{%
@@ -8746,7 +8861,7 @@
%\section{datetime2-calc.sty code}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datetime2-calc}[2016/07/12 v1.5.2 (NLCT)]
+\ProvidesPackage{datetime2-calc}[2018/07/20 v1.5.3 (NLCT)]
% \end{macrocode}
% Load other required packages
% \begin{macrocode}
@@ -9312,6 +9427,57 @@
% \end{macrocode}
%\end{macro}
%
+%These are shared with the \sty{locale} package, so they may already
+%be defined.
+%\begin{macro}{\dtmMondayIndex}
+%\changes{1.5.3}{??}{new}
+% \begin{macrocode}
+\def\dtmMondayIndex{0}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\dtmTuesdayIndex}
+%\changes{1.5.3}{??}{new}
+% \begin{macrocode}
+\def\dtmTuesdayIndex{1}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\dtmWednesdayIndex}
+%\changes{1.5.3}{??}{new}
+% \begin{macrocode}
+\def\dtmWednesdayIndex{2}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\dtmThursdayIndex}
+%\changes{1.5.3}{??}{new}
+% \begin{macrocode}
+\def\dtmThursdayIndex{3}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\dtmFridayIndex}
+%\changes{1.5.3}{??}{new}
+% \begin{macrocode}
+\def\dtmFridayIndex{4}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\dtmSaturdayIndex}
+%\changes{1.5.3}{??}{new}
+% \begin{macrocode}
+\def\dtmSaturdayIndex{5}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\dtmSundayIndex}
+%\changes{1.5.3}{??}{new}
+% \begin{macrocode}
+\def\dtmSundayIndex{6}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\DTMweekdayname}
%\changes{1.3}{2016-01-22}{new}
% \begin{macrocode}
diff --git a/Master/texmf-dist/source/latex/datetime2/datetime2.ins b/Master/texmf-dist/source/latex/datetime2/datetime2.ins
index b9087ee09f3..91a29acb334 100644
--- a/Master/texmf-dist/source/latex/datetime2/datetime2.ins
+++ b/Master/texmf-dist/source/latex/datetime2/datetime2.ins
@@ -1,14 +1,14 @@
-% datetime2.ins generated using makedtx version 1.1 2016/7/12 13:25
+% datetime2.ins generated using makedtx version 1.2 2018/7/20 12:36
\input docstrip
\preamble
datetime2.dtx
- Copyright 2016 Nicola Talbot
+ Copyright 2018 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.
+ of this license or (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