texlive[48236] Master/texmf-dist: datetime2 (20jul18)
commits+karl at tug.org
commits+karl at tug.org
Sat Jul 21 00:07:32 CEST 2018
Revision: 48236
http://tug.org/svn/texlive?view=revision&revision=48236
Author: karl
Date: 2018-07-21 00:07:31 +0200 (Sat, 21 Jul 2018)
Log Message:
-----------
datetime2 (20jul18)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/datetime2/CHANGES
trunk/Master/texmf-dist/doc/latex/datetime2/README
trunk/Master/texmf-dist/doc/latex/datetime2/datetime2.pdf
trunk/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-babel.pdf
trunk/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-calc.pdf
trunk/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-filedate.pdf
trunk/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-hyperref.pdf
trunk/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-journal.pdf
trunk/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-styles.pdf
trunk/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-styles.tex
trunk/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-xe.pdf
trunk/Master/texmf-dist/source/latex/datetime2/datetime2.dtx
trunk/Master/texmf-dist/source/latex/datetime2/datetime2.ins
trunk/Master/texmf-dist/tex/latex/datetime2/datetime2-calc.sty
trunk/Master/texmf-dist/tex/latex/datetime2/datetime2.sty
Modified: trunk/Master/texmf-dist/doc/latex/datetime2/CHANGES
===================================================================
--- trunk/Master/texmf-dist/doc/latex/datetime2/CHANGES 2018-07-20 22:07:13 UTC (rev 48235)
+++ trunk/Master/texmf-dist/doc/latex/datetime2/CHANGES 2018-07-20 22:07:31 UTC (rev 48236)
@@ -1,3 +1,8 @@
+1.5.3 (2018-07-20):
+
+ * Bug fix: removed unwanted \relax inserted in negative time zones
+ for all base numeric styles.
+
1.5.2 (2016-07-12):
* Added \DTMifhasstyle, \DTMifhasdatestyle, \DTMifhastimestyle,
Modified: trunk/Master/texmf-dist/doc/latex/datetime2/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/datetime2/README 2018-07-20 22:07:13 UTC (rev 48235)
+++ trunk/Master/texmf-dist/doc/latex/datetime2/README 2018-07-20 22:07:31 UTC (rev 48236)
@@ -1,6 +1,6 @@
-LaTeX Package : datetime2 v1.5.2
+LaTeX Package : datetime2 v1.5.3
-Last Modified : 2016-07-12
+Last Modified : 2018-07-20
Author : Nicola Talbot
Modified: trunk/Master/texmf-dist/doc/latex/datetime2/datetime2.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-babel.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-calc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-filedate.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-hyperref.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-journal.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-styles.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-styles.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-styles.tex 2018-07-20 22:07:13 UTC (rev 48235)
+++ trunk/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-styles.tex 2018-07-20 22:07:31 UTC (rev 48236)
@@ -3,66 +3,82 @@
% to be installed.
% arara: pdflatex
-\documentclass[english]{article}
+\documentclass[english]{report}
\usepackage{datetime2}
%\DTMsetup{showseconds=false,datesep=/,timesep=.}
-\begin{document}
-\DTMsavetimestamp{mydate}{2015-04-01T08:05:00+01:00}
-\DTMsavetimestamp{mydate2}{2015-04-01T08:13:45+01:00}
+\newcommand{\testdate}[1]{%
+ \DTMsetstyle{#1}\section{Style `#1'}\par
+ \begin{tabular}{ll}
+ Now: & \DTMnow.\\
+ Positive Time Zone: & \DTMuse{mydate+}\\
+ Negative Time Zone: & \DTMuse{mydate-}\\
+ Zero Time Zone: & \DTMuse{mydate0}
+ \end{tabular}\par
+ \typeout{Date-Time (#1): \DTMnow.}%
+}
-Default: \DTMnow. \DTMuse{mydate}.
-\typeout{Date-Time (default): \DTMnow. \DTMuse{mydate}.}
+\newcommand{\testtime}[1]{%
+ \DTMsettimestyle{#1}%
+ \section{#1}\par
+ \begin{tabular}{ll}
+ Now: & \DTMcurrenttime.\\
+ 0 milliseconds: & \DTMusetime{mydate+}.\\
+ 45 milliseconds: & \DTMusetime{mydate2}.\\
+ Noon: & \DTMusetime{noon}.\\
+ Midnight (0hrs): & \DTMusetime{midnight1}.\\
+ Midnight (24hrs): & \DTMusetime{midnight2}.\\
+ Morning: & \DTMusetime{8am}.\\
+ Evening: & \DTMusetime{8pm}.\\
+ Post-Midday: & \DTMusetime{1203}.\\
+ Post-Midnight (24hr): & \DTMusetime{2401}.\\
+ Post-Midnight (0hr): & \DTMusetime{0001}.
+ \end{tabular}\par
+ \typeout{Time (#1): \DTMcurrenttime.
+ \DTMusetime{mydate}.
+ \DTMusetime{mydate2}.
+ \DTMusetime{noon}.
+ \DTMusetime{midnight1}.
+ \DTMusetime{midnight2}.
+ \DTMusetime{8am}.
+ \DTMusetime{8pm}.
+ \DTMusetime{1203}.
+ \DTMusetime{2401}.
+ \DTMusetime{0001}.
+ }%
+}
-\DTMsetstyle{iso}
+\begin{document}
+\chapter{Date-Time Styles}
+\DTMsavetimestamp{mydate+}{2015-04-01T08:05:00+01:00}
+\DTMsavetimestamp{mydate-}{2015-04-01T08:05:00-01:00}
+\DTMsavetimestamp{mydate0}{2015-04-01T08:05:00+00:00}
-ISO: \DTMnow. \DTMuse{mydate}.
-\typeout{Date-Time (iso): \DTMnow. \DTMuse{mydate}.}
+\testdate{default}
-\DTMsetstyle{pdf}
+\testdate{iso}
-PDF: \DTMnow. \DTMuse{mydate}.
-\typeout{Date-Time (pdf): \DTMnow. \DTMuse{mydate}.}
+\testdate{pdf}
-\DTMsetstyle{ddmmyyyy}
+\testdate{ddmmyyyy}
-ddmmyyyy: \DTMnow. \DTMuse{mydate}.
-\typeout{Date-Time (ddmmyyyy): \DTMnow. \DTMuse{mydate}.}
+\testdate{dmyyyy}
-\DTMsetstyle{dmyyyy}
+\testdate{dmyy}
-dmyyyy: \DTMnow. \DTMuse{mydate}.
-\typeout{Date-Time (dmyyyy): \DTMnow. \DTMuse{mydate}.}
+\testdate{mmddyyyy}
-\DTMsetstyle{dmyy}
+\testdate{mdyyyy}
-dmyy: \DTMnow. \DTMuse{mydate}.
-\typeout{Date-Time (dmyy): \DTMnow. \DTMuse{mydate}.}
+\testdate{mdyy}
-\DTMsetstyle{mmddyyyy}
+\testdate{yyyymd}
-mmddyyyy: \DTMnow. \DTMuse{mydate}.
-\typeout{Date-Time (mmddyyyy): \DTMnow. \DTMuse{mydate}.}
+\chapter{Time Styles}
-\DTMsetstyle{mdyyyy}
-
-mdyyyy: \DTMnow. \DTMuse{mydate}.
-\typeout{Date-Time (mdyyyy): \DTMnow. \DTMuse{mydate}.}
-
-\DTMsetstyle{mdyy}
-
-mdyy: \DTMnow. \DTMuse{mydate}.
-\typeout{Date-Time (mdyy): \DTMnow. \DTMuse{mydate}.}
-
-\DTMsetstyle{yyyymd}
-
-yyyymd: \DTMnow. \DTMuse{mydate}.
-\typeout{Date-Time (yyyymd): \DTMnow. \DTMuse{mydate}.}
-
-Testing time styles.
-
+\DTMsavetimestamp{mydate2}{2015-04-01T08:13:45+01:00}
\DTMsavetime{noon}{12:00:00}
\DTMsavetime{midnight1}{00:00:00}
\DTMsavetime{midnight2}{24:00:00}
@@ -72,70 +88,15 @@
\DTMsavetime{2401}{24:01:00}
\DTMsavetime{0001}{00:01:00}
-\DTMsettimestyle{hmmss}
+\testtime{hmmss}
-hmmss: \DTMcurrenttime. \DTMusetime{mydate}.
-\DTMusetime{mydate2}.
-\DTMusetime{noon}.
-\DTMusetime{midnight1}.
-\DTMusetime{midnight2}.
-\DTMusetime{8am}.
-\DTMusetime{8pm}.
-\DTMusetime{1203}.
-\DTMusetime{2401}.
-\DTMusetime{0001}.
+\testtime{englishampm}
-\typeout{Time (hmmss): \DTMcurrenttime.
- \DTMusetime{mydate}.
- \DTMusetime{mydate2}.
- \DTMusetime{noon}.
- \DTMusetime{midnight1}.
- \DTMusetime{midnight2}.
- \DTMusetime{8am}.
- \DTMusetime{8pm}.
- \DTMusetime{1203}.
- \DTMusetime{2401}.
- \DTMusetime{0001}.
-}
+\renewcommand*{\DTMenglishampmfmt}[1]{\protect\textsc{#1}}
-\DTMsettimestyle{englishampm}
-ampm: \DTMcurrenttime.
-\DTMusetime{mydate}.
-\DTMusetime{mydate2}.
-\DTMusetime{noon}.
-\DTMusetime{midnight1}.
-\DTMusetime{midnight2}.
-\DTMusetime{8am}.
-\DTMusetime{8pm}.
-\DTMusetime{1203}.
-\DTMusetime{2401}.
-\DTMusetime{0001}.
+\bigskip
-\typeout{Time (ampm): \DTMcurrenttime.
-\DTMusetime{mydate}.
-\DTMusetime{mydate2}.
-\DTMusetime{noon}.
-\DTMusetime{midnight1}.
-\DTMusetime{midnight2}.
-\DTMusetime{8am}.
-\DTMusetime{8pm}.
-\DTMusetime{1203}.
-\DTMusetime{2401}.
-\DTMusetime{0001}.
-}
+(Redefining \verb|\DTMenglishampmfmt| for following test.)
+\testtime{englishampm}
-\renewcommand*{\DTMenglishampmfmt}[1]{\protect\textsc{#1}}
-
-(ampm sc) \DTMcurrenttime.
-\DTMusetime{mydate}.
-\DTMusetime{mydate2}.
-\DTMusetime{noon}.
-\DTMusetime{midnight1}.
-\DTMusetime{midnight2}.
-\DTMusetime{8am}.
-\DTMusetime{8pm}.
-\DTMusetime{1203}.
-\DTMusetime{2401}.
-\DTMusetime{0001}.
-
\end{document}
Modified: trunk/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-xe.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/datetime2/datetime2.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/datetime2/datetime2.dtx 2018-07-20 22:07:13 UTC (rev 48235)
+++ trunk/Master/texmf-dist/source/latex/datetime2/datetime2.dtx 2018-07-20 22:07:31 UTC (rev 48236)
@@ -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"
+% -author "Nicola Talbot"
+% -doc "datetime2-manual.tex"
% -section "chapter"
-% -doc "datetime2-manual.tex"
% 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 at 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 at pdfcreationdate}%
- \ifdefempty\dtm at pdfcreationdate
+ \ifdef\TeXOSQueryNow
{%
+ \TeXOSQueryNow{\dtm at pdfcreationdate}%
+ \ifdefempty\dtm at pdfcreationdate
+ {%
% \end{macrocode}
%Failed (maybe shell escape has been disabled).
% \begin{macrocode}
- \undef\dtm at pdfcreationdate
+ \undef\dtm at 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 at tmp{#2}%
+ \ifx\@dtm at tmp\empty
+ \cslet{@dtm@#1 at year}{0}%
+ \cslet{@dtm@#1 at month}{0}%
+ \cslet{@dtm@#1 at day}{0}%
+ \cslet{@dtm@#1 at dow}{0}%
+ \cslet{@dtm@#1 at hour}{0}%
+ \cslet{@dtm@#1 at minute}{0}%
+ \cslet{@dtm@#1 at second}{0}%
+ \cslet{@dtm@#1 at TZhour}{0}%
+ \cslet{@dtm@#1 at TZminute}{0}%
+ \else
+ \expandafter\@dtm at parsepdfdatetime\@dtm at tmp\@dtm at endparsepdfdatetime
+ \cslet{@dtm@#1 at year}{\@dtm at year}%
+ \cslet{@dtm@#1 at month}{\@dtm at month}%
+ \cslet{@dtm@#1 at day}{\@dtm at day}%
+ \cslet{@dtm@#1 at dow}{\@dtm at dow}%
+ \cslet{@dtm@#1 at hour}{\@dtm at hour}%
+ \cslet{@dtm@#1 at minute}{\@dtm at minute}%
+ \cslet{@dtm@#1 at second}{\@dtm at second}%
+ \cslet{@dtm@#1 at TZhour}{\@dtm at timezonehour}%
+ \cslet{@dtm@#1 at TZminute}{\@dtm at 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}
Modified: trunk/Master/texmf-dist/source/latex/datetime2/datetime2.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/datetime2/datetime2.ins 2018-07-20 22:07:13 UTC (rev 48235)
+++ trunk/Master/texmf-dist/source/latex/datetime2/datetime2.ins 2018-07-20 22:07:31 UTC (rev 48236)
@@ -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
Modified: trunk/Master/texmf-dist/tex/latex/datetime2/datetime2-calc.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/datetime2/datetime2-calc.sty 2018-07-20 22:07:13 UTC (rev 48235)
+++ trunk/Master/texmf-dist/tex/latex/datetime2/datetime2-calc.sty 2018-07-20 22:07:31 UTC (rev 48236)
@@ -7,11 +7,11 @@
%% datetime2.dtx (with options: `datetime2-calc.sty,package')
%%
%% 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
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datetime2-calc}[2016/07/12 v1.5.2 (NLCT)]
+\ProvidesPackage{datetime2-calc}[2018/07/20 v1.5.3 (NLCT)]
\RequirePackage{pgfkeys}
\RequirePackage{pgfcalendar}
\newcount\@dtm at julianday
@@ -340,6 +340,13 @@
\pgfcalendarjuliantoweekday{\@dtm at julianday}{\count@}%
\edef#2{\number\count@}%
}
+\def\dtmMondayIndex{0}
+\def\dtmTuesdayIndex{1}
+\def\dtmWednesdayIndex{2}
+\def\dtmThursdayIndex{3}
+\def\dtmFridayIndex{4}
+\def\dtmSaturdayIndex{5}
+\def\dtmSundayIndex{6}
\newrobustcmd{\DTMweekdayname}[1]{%
\ifcsdef{DTM\languagename weekdayname}%
{%
Modified: trunk/Master/texmf-dist/tex/latex/datetime2/datetime2.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/datetime2/datetime2.sty 2018-07-20 22:07:13 UTC (rev 48235)
+++ trunk/Master/texmf-dist/tex/latex/datetime2/datetime2.sty 2018-07-20 22:07:31 UTC (rev 48236)
@@ -7,11 +7,11 @@
%% datetime2.dtx (with options: `datetime2.sty,package')
%%
%% 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
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\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]
\RequirePackage{tracklang}
\RequirePackage{etoolbox}
\RequirePackage{xkeyval}[2006/11/18]
@@ -53,16 +53,25 @@
\edef\dtm at pdfcreationdate{\pdffeedback creationdate}%
}%
{%
- \ifdef\TeXOSQueryNow
+ \ifdef\LocaleNowStamp
{%
- \TeXOSQueryNow{\dtm at pdfcreationdate}%
- \ifdefempty\dtm at pdfcreationdate
+ \ifx\LocaleNowStamp\empty
+ \else
+ \let\dtm at pdfcreationdate\LocaleNowStamp
+ \fi
+ }%
+ {%
+ \ifdef\TeXOSQueryNow
{%
- \undef\dtm at pdfcreationdate
+ \TeXOSQueryNow{\dtm at pdfcreationdate}%
+ \ifdefempty\dtm at pdfcreationdate
+ {%
+ \undef\dtm at pdfcreationdate
+ }%
+ {}%
}%
{}%
}%
- {}%
}%
}
\newcommand*{\dtm at yearmonthsep}{-}
@@ -961,7 +970,7 @@
Z%
}%
{%
- \ifnum##1<0\else+\fi\DTMtwodigits{##1}%
+ \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
\ifDTMshowzoneminutes\DTMsep{hourmin}\DTMtwodigits{##2}\fi
}%
}%
@@ -1010,7 +1019,7 @@
Z%
}%
{%
- \ifnum##1<0\else+\fi\DTMtwodigits{##1}%
+ \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
\ifDTMshowzoneminutes:\DTMtwodigits{##2}\fi
}%
}%
@@ -1058,7 +1067,7 @@
Z%
}%
{%
- \ifnum##1<0\else+\fi\DTMtwodigits{##1}'\DTMtwodigits{##2}'%
+ \ifnum##1<0 \else+\fi\DTMtwodigits{##1}'\DTMtwodigits{##2}'%
}%
}%
}%
@@ -1099,7 +1108,7 @@
Z%
}%
{%
- \ifnum##1<0\else+\fi\DTMtwodigits{##1}%
+ \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
\ifDTMshowzoneminutes\DTMsep{hourmin}\DTMtwodigits{##2}\fi
}%
}%
@@ -1150,7 +1159,7 @@
Z%
}%
{%
- \ifnum##1<0\else+\fi\DTMtwodigits{##1}%
+ \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
\ifDTMshowzoneminutes\DTMsep{hourmin}\DTMtwodigits{##2}\fi
}%
}%
@@ -1203,7 +1212,7 @@
Z%
}%
{%
- \ifnum##1<0\else+\fi\DTMtwodigits{##1}%
+ \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
\ifDTMshowzoneminutes\DTMsep{hourmin}\DTMtwodigits{##2}\fi
}%
}%
@@ -1256,7 +1265,7 @@
Z%
}%
{%
- \ifnum##1<0\else+\fi\DTMtwodigits{##1}%
+ \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
\ifDTMshowzoneminutes\DTMsep{hourmin}\DTMtwodigits{##2}\fi
}%
}%
@@ -1307,7 +1316,7 @@
Z%
}%
{%
- \ifnum##1<0\else+\fi\DTMtwodigits{##1}%
+ \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
\ifDTMshowzoneminutes\DTMsep{hourmin}\DTMtwodigits{##2}\fi
}%
}%
@@ -1358,7 +1367,7 @@
Z%
}%
{%
- \ifnum##1<0\else+\fi\DTMtwodigits{##1}%
+ \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
\ifDTMshowzoneminutes\DTMsep{hourmin}\DTMtwodigits{##2}\fi
}%
}%
@@ -1411,7 +1420,7 @@
Z%
}%
{%
- \ifnum##1<0\else+\fi\DTMtwodigits{##1}%
+ \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
\ifDTMshowzoneminutes\DTMsep{hourmin}\DTMtwodigits{##2}\fi
}%
}%
@@ -1464,7 +1473,7 @@
Z%
}%
{%
- \ifnum##1<0\else+\fi\DTMtwodigits{##1}%
+ \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
\ifDTMshowzoneminutes\DTMsep{hourmin}\DTMtwodigits{##2}\fi
}%
}%
@@ -1515,7 +1524,7 @@
Z%
}%
{%
- \ifnum##1<0\else+\fi\DTMtwodigits{##1}%
+ \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
\ifDTMshowzoneminutes\DTMsep{hourmin}\DTMtwodigits{##2}\fi
}%
}%
@@ -1559,7 +1568,7 @@
{hhmm}% label
{%
\renewcommand*\DTMdisplaytime[3]{%
- \ifnum##1<0\else+\fi\DTMtwodigits{##1}%
+ \ifnum##1<0 \else+\fi\DTMtwodigits{##1}%
\ifDTMshowzoneminutes\DTMsep{hourmin}\DTMtwodigits{##2}\fi
}%
}
@@ -1622,6 +1631,31 @@
\cslet{@dtm@#1 at TZhour}{\@dtm at timezonehour}%
\cslet{@dtm@#1 at TZminute}{\@dtm at timezoneminute}%
}
+\newrobustcmd*{\DTMsavepdftimestamp}[2]{%
+ \edef\@dtm at tmp{#2}%
+ \ifx\@dtm at tmp\empty
+ \cslet{@dtm@#1 at year}{0}%
+ \cslet{@dtm@#1 at month}{0}%
+ \cslet{@dtm@#1 at day}{0}%
+ \cslet{@dtm@#1 at dow}{0}%
+ \cslet{@dtm@#1 at hour}{0}%
+ \cslet{@dtm@#1 at minute}{0}%
+ \cslet{@dtm@#1 at second}{0}%
+ \cslet{@dtm@#1 at TZhour}{0}%
+ \cslet{@dtm@#1 at TZminute}{0}%
+ \else
+ \expandafter\@dtm at parsepdfdatetime\@dtm at tmp\@dtm at endparsepdfdatetime
+ \cslet{@dtm@#1 at year}{\@dtm at year}%
+ \cslet{@dtm@#1 at month}{\@dtm at month}%
+ \cslet{@dtm@#1 at day}{\@dtm at day}%
+ \cslet{@dtm@#1 at dow}{\@dtm at dow}%
+ \cslet{@dtm@#1 at hour}{\@dtm at hour}%
+ \cslet{@dtm@#1 at minute}{\@dtm at minute}%
+ \cslet{@dtm@#1 at second}{\@dtm at second}%
+ \cslet{@dtm@#1 at TZhour}{\@dtm at timezonehour}%
+ \cslet{@dtm@#1 at TZminute}{\@dtm at timezoneminute}%
+ \fi
+}
\newrobustcmd{\DTMsavenow}[1]{%
\cslet{@dtm@#1 at year}{\@dtm at currentyear}%
\cslet{@dtm@#1 at month}{\@dtm at currentmonth}%
More information about the tex-live-commits
mailing list