diff options
author | Karl Berry <karl@freefriends.org> | 2018-07-20 22:07:31 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-07-20 22:07:31 +0000 |
commit | 508092db4c6970ec4149a2d3e78db1777858e542 (patch) | |
tree | fafa3efa3490dcd3922f69aade9052e3b1bff36f | |
parent | 74cf182a295fac33607870e90e1f8cb33fa22f9a (diff) |
datetime2 (20jul18)
git-svn-id: svn://tug.org/texlive/trunk@48236 c570f23f-e606-0410-a88d-b1316a301751
15 files changed, 334 insertions, 161 deletions
diff --git a/Master/texmf-dist/doc/latex/datetime2/CHANGES b/Master/texmf-dist/doc/latex/datetime2/CHANGES index a978a00e2ce..3435b72e1f0 100644 --- a/Master/texmf-dist/doc/latex/datetime2/CHANGES +++ b/Master/texmf-dist/doc/latex/datetime2/CHANGES @@ -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, diff --git a/Master/texmf-dist/doc/latex/datetime2/README b/Master/texmf-dist/doc/latex/datetime2/README index 208bce8ae08..5f393336d87 100644 --- a/Master/texmf-dist/doc/latex/datetime2/README +++ b/Master/texmf-dist/doc/latex/datetime2/README @@ -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 diff --git a/Master/texmf-dist/doc/latex/datetime2/datetime2.pdf b/Master/texmf-dist/doc/latex/datetime2/datetime2.pdf Binary files differindex 566371182a8..a15e11feb43 100644 --- a/Master/texmf-dist/doc/latex/datetime2/datetime2.pdf +++ b/Master/texmf-dist/doc/latex/datetime2/datetime2.pdf diff --git a/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-babel.pdf b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-babel.pdf Binary files differindex 475b6986b57..578625e683e 100644 --- a/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-babel.pdf +++ b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-babel.pdf diff --git a/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-calc.pdf b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-calc.pdf Binary files differindex e1ffdb55273..02e2ba10da7 100644 --- a/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-calc.pdf +++ b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-calc.pdf diff --git a/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-filedate.pdf b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-filedate.pdf Binary files differindex d951ae6dc0c..3e2c3e54d23 100644 --- a/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-filedate.pdf +++ b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-filedate.pdf diff --git a/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-hyperref.pdf b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-hyperref.pdf Binary files differindex de54cef3b2f..b26477e0e40 100644 --- a/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-hyperref.pdf +++ b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-hyperref.pdf diff --git a/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-journal.pdf b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-journal.pdf Binary files differindex 240315500da..5fd36633352 100644 --- a/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-journal.pdf +++ b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-journal.pdf diff --git a/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-styles.pdf b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-styles.pdf Binary files differindex 31fa4321a35..76dbfd1e824 100644 --- a/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-styles.pdf +++ b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-styles.pdf diff --git a/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-styles.tex b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-styles.tex index 6d11198794e..28d042f7297 100644 --- a/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-styles.tex +++ b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-styles.tex @@ -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} - -Default: \DTMnow. \DTMuse{mydate}. -\typeout{Date-Time (default): \DTMnow. \DTMuse{mydate}.} - -\DTMsetstyle{iso} - -ISO: \DTMnow. \DTMuse{mydate}. -\typeout{Date-Time (iso): \DTMnow. \DTMuse{mydate}.} - -\DTMsetstyle{pdf} - -PDF: \DTMnow. \DTMuse{mydate}. -\typeout{Date-Time (pdf): \DTMnow. \DTMuse{mydate}.} - -\DTMsetstyle{ddmmyyyy} - -ddmmyyyy: \DTMnow. \DTMuse{mydate}. -\typeout{Date-Time (ddmmyyyy): \DTMnow. \DTMuse{mydate}.} +\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.}% +} -\DTMsetstyle{dmyyyy} +\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}. + }% +} -dmyyyy: \DTMnow. \DTMuse{mydate}. -\typeout{Date-Time (dmyyyy): \DTMnow. \DTMuse{mydate}.} +\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} -\DTMsetstyle{dmyy} +\testdate{default} -dmyy: \DTMnow. \DTMuse{mydate}. -\typeout{Date-Time (dmyy): \DTMnow. \DTMuse{mydate}.} +\testdate{iso} -\DTMsetstyle{mmddyyyy} +\testdate{pdf} -mmddyyyy: \DTMnow. \DTMuse{mydate}. -\typeout{Date-Time (mmddyyyy): \DTMnow. \DTMuse{mydate}.} +\testdate{ddmmyyyy} -\DTMsetstyle{mdyyyy} +\testdate{dmyyyy} -mdyyyy: \DTMnow. \DTMuse{mydate}. -\typeout{Date-Time (mdyyyy): \DTMnow. \DTMuse{mydate}.} +\testdate{dmyy} -\DTMsetstyle{mdyy} +\testdate{mmddyyyy} -mdyy: \DTMnow. \DTMuse{mydate}. -\typeout{Date-Time (mdyy): \DTMnow. \DTMuse{mydate}.} +\testdate{mdyyyy} -\DTMsetstyle{yyyymd} +\testdate{mdyy} -yyyymd: \DTMnow. \DTMuse{mydate}. -\typeout{Date-Time (yyyymd): \DTMnow. \DTMuse{mydate}.} +\testdate{yyyymd} -Testing time styles. +\chapter{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 @@ Testing time styles. \DTMsavetime{2401}{24:01:00} \DTMsavetime{0001}{00:01:00} -\DTMsettimestyle{hmmss} - -hmmss: \DTMcurrenttime. \DTMusetime{mydate}. -\DTMusetime{mydate2}. -\DTMusetime{noon}. -\DTMusetime{midnight1}. -\DTMusetime{midnight2}. -\DTMusetime{8am}. -\DTMusetime{8pm}. -\DTMusetime{1203}. -\DTMusetime{2401}. -\DTMusetime{0001}. - -\typeout{Time (hmmss): \DTMcurrenttime. - \DTMusetime{mydate}. - \DTMusetime{mydate2}. - \DTMusetime{noon}. - \DTMusetime{midnight1}. - \DTMusetime{midnight2}. - \DTMusetime{8am}. - \DTMusetime{8pm}. - \DTMusetime{1203}. - \DTMusetime{2401}. - \DTMusetime{0001}. -} +\testtime{hmmss} -\DTMsettimestyle{englishampm} -ampm: \DTMcurrenttime. -\DTMusetime{mydate}. -\DTMusetime{mydate2}. -\DTMusetime{noon}. -\DTMusetime{midnight1}. -\DTMusetime{midnight2}. -\DTMusetime{8am}. -\DTMusetime{8pm}. -\DTMusetime{1203}. -\DTMusetime{2401}. -\DTMusetime{0001}. - -\typeout{Time (ampm): \DTMcurrenttime. -\DTMusetime{mydate}. -\DTMusetime{mydate2}. -\DTMusetime{noon}. -\DTMusetime{midnight1}. -\DTMusetime{midnight2}. -\DTMusetime{8am}. -\DTMusetime{8pm}. -\DTMusetime{1203}. -\DTMusetime{2401}. -\DTMusetime{0001}. -} +\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}. +\bigskip + +(Redefining \verb|\DTMenglishampmfmt| for following test.) +\testtime{englishampm} \end{document} diff --git a/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-xe.pdf b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-xe.pdf Binary files differindex 2345f4b2feb..bcf2d0b7eab 100644 --- a/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-xe.pdf +++ b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-xe.pdf 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 diff --git a/Master/texmf-dist/tex/latex/datetime2/datetime2-calc.sty b/Master/texmf-dist/tex/latex/datetime2/datetime2-calc.sty index a3cc47301d5..989794768a2 100644 --- a/Master/texmf-dist/tex/latex/datetime2/datetime2-calc.sty +++ b/Master/texmf-dist/tex/latex/datetime2/datetime2-calc.sty @@ -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@julianday @@ -340,6 +340,13 @@ \pgfcalendarjuliantoweekday{\@dtm@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}% {% diff --git a/Master/texmf-dist/tex/latex/datetime2/datetime2.sty b/Master/texmf-dist/tex/latex/datetime2/datetime2.sty index 8e0881bcda4..6d643d62467 100644 --- a/Master/texmf-dist/tex/latex/datetime2/datetime2.sty +++ b/Master/texmf-dist/tex/latex/datetime2/datetime2.sty @@ -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@pdfcreationdate{\pdffeedback creationdate}% }% {% - \ifdef\TeXOSQueryNow + \ifdef\LocaleNowStamp {% - \TeXOSQueryNow{\dtm@pdfcreationdate}% - \ifdefempty\dtm@pdfcreationdate + \ifx\LocaleNowStamp\empty + \else + \let\dtm@pdfcreationdate\LocaleNowStamp + \fi + }% + {% + \ifdef\TeXOSQueryNow {% - \undef\dtm@pdfcreationdate + \TeXOSQueryNow{\dtm@pdfcreationdate}% + \ifdefempty\dtm@pdfcreationdate + {% + \undef\dtm@pdfcreationdate + }% + {}% }% {}% }% - {}% }% } \newcommand*{\dtm@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@TZhour}{\@dtm@timezonehour}% \cslet{@dtm@#1@TZminute}{\@dtm@timezoneminute}% } +\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 +} \newrobustcmd{\DTMsavenow}[1]{% \cslet{@dtm@#1@year}{\@dtm@currentyear}% \cslet{@dtm@#1@month}{\@dtm@currentmonth}% |