summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/datetime2/datetime2.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/datetime2/datetime2.dtx')
-rw-r--r--Master/texmf-dist/source/latex/datetime2/datetime2.dtx66
1 files changed, 46 insertions, 20 deletions
diff --git a/Master/texmf-dist/source/latex/datetime2/datetime2.dtx b/Master/texmf-dist/source/latex/datetime2/datetime2.dtx
index 6cb24135673..1382798c026 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
% Command line args:
+% -doc "datetime2-manual.tex"
% -section "chapter"
% -author "Nicola Talbot"
-% -doc "datetime2-manual.tex"
% -src "datetime2.sty\Z=>datetime2.sty"
% -src "datetime2-calc.sty\Z=>datetime2-calc.sty"
% datetime2
-% Created on 2016/2/11 12:54
+% Created on 2016/6/5 13:21
%\fi
%\iffalse
%<*package>
@@ -47,8 +47,7 @@
pdfauthor={Nicola L.C. Talbot},
pdftitle={datetime2: date and time formats}]{hyperref}
-
-\CheckSum{2364}
+\CheckSum{2374}
\RecordChanges
\DisableCrossrefs
@@ -92,11 +91,11 @@
%
%\MakeShortVerb{"}
%
-%\title{datetime2 v1.4:
+%\title{datetime2 v1.5.1:
%date and time formats}
%\author{Nicola L. C. Talbot\\\url{http://www.dickimaw-books.com/}}
%
-%\date{2016-02-11}
+%\date{2016-06-05}
%\maketitle
%
%\begin{abstract}
@@ -5549,7 +5548,7 @@
%\changes{1.0}{2015-03-24}{Initial release}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datetime2}[2016/02/11 v1.4 (NLCT) date and time formats]
+\ProvidesPackage{datetime2}[2016/06/05 v1.5.1 (NLCT) date and time formats]
% \end{macrocode}
% Use \sty{tracklang} to find out what languages have been loaded.
% \begin{macrocode}
@@ -5564,6 +5563,34 @@
\RequirePackage{xkeyval}[2006/11/18]
% \end{macrocode}
%
+%\begin{macro}{\dtm@pdfcreationdate}
+%\changes{1.5}{2016-06-04}{new}
+%The \sty{luatex85} package defines \ics{pdfcreationdate} in terms of
+%\cs{pdffeedback}, but the parsing commands need a command whose
+%replacement text is directly in the PDF date time format, so define a command
+%with the full replacement text that can be used instead. This will allow
+%for any possible future changes of \cs{pdfcreationdate} that
+%require deeper levels of expansion.
+% \begin{macrocode}
+\ifdef\pdfcreationdate
+{%
+ \edef\dtm@pdfcreationdate{\pdfcreationdate}%
+}%
+{%
+% \end{macrocode}
+%\changes{1.5.1}{2016-06-05}{added check for \cs{pdffeedback}}
+% Check if newer version of Lua\TeX\ is being used but
+% \sty{luatex85} hasn't been loaded.
+% \begin{macrocode}
+ \ifdef\pdffeedback
+ {%
+ \edef\dtm@pdfcreationdate{\pdffeedback creationdate}%
+ }%
+ {}%
+}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\dtm@yearmonthsep}
% Separator between year and month for numeric dates.
% \begin{macrocode}
@@ -5733,10 +5760,10 @@
% \end{macrocode}
%\end{option}
%
-% Switch off seconds and time zone if \cs{pdfcreationdate}
+% Switch off seconds and time zone if \cs{dtm@pdfcreationdate}
% isn't defined, otherwise switch on.
% \begin{macrocode}
-\ifdef\pdfcreationdate
+\ifdef\dtm@pdfcreationdate
{%
\DTMshowsecondstrue
\DTMshowzonetrue
@@ -6038,13 +6065,13 @@
% \end{macrocode}
%\end{macro}
%
-% Find out the current time. If PDF\LaTeX\ is being used, then it
-% can be fetched from \cs{pdfcreationdate}
+% Find out the current time. If \cs{dtm@pdfcreationdate} is defined,
+% it can be fetched from that.
% \begin{macrocode}
-\ifdef\pdfcreationdate
+\ifdef\dtm@pdfcreationdate
{%
% \end{macrocode}
-% Define commands to parse \cs{pdfcreationdate}
+% Define commands to parse \cs{dtm@pdfcreationdate}
% \begin{macrocode}
\def\@dtm@parsepdfdatetime#1:#2#3#4#5#6#7#8#9{%
\def\@dtm@year{#2#3#4#5}%
@@ -6070,9 +6097,9 @@
\def\@dtm@timezoneminute{#2}%
}%
% \end{macrocode}
-% Now parse \cs{pdfcreationdate}
+% Now parse \cs{dtm@pdfcreationdate}
% \begin{macrocode}
- \expandafter\@dtm@parsepdfdatetime\pdfcreationdate\@dtm@endparsepdfdatetime
+ \expandafter\@dtm@parsepdfdatetime\dtm@pdfcreationdate\@dtm@endparsepdfdatetime
% \end{macrocode}
% Save the values.
% \begin{macrocode}
@@ -6086,8 +6113,7 @@
\let\@dtm@currenttimezoneminute\@dtm@timezoneminute
%
% \end{macrocode}
-% Lua\TeX\ doesn't provide \cs{pdffilemoddate} (but it does provide
-% \cs{pdfcreationdate}).
+% Lua\TeX\ doesn't provide \cs{pdffilemoddate}.
% \begin{macrocode}
\ifdef\pdffilemoddate
{%
@@ -6197,8 +6223,8 @@
{%
% \end{macrocode}
% \cs{pdfcreationdate} not defined. By a process of elimination, the
-% \TeX\ engine is either \XeTeX\ or it's very old. (Lua\TeX\
-% recognises \cs{pdfcreationdate}.) In this case, the
+% \TeX\ engine is either \XeTeX\ or it's very old. (Or it may be a
+% new version of Lua\TeX\ without \sty{luatex85}.) In this case, the
% seconds and time zone can't be obtained. The hour and minute need
% to be calculated from \TeX's \cs{time} primitive.
% \begin{macrocode}
@@ -8306,7 +8332,7 @@
%\section{datetime2-calc.sty code}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datetime2-calc}[2016/02/11 v1.4 (NLCT)]
+\ProvidesPackage{datetime2-calc}[2016/06/05 v1.5.1 (NLCT)]
% \end{macrocode}
% Load other required packages
% \begin{macrocode}