From f68f59a8625bc76f04fe0f5e292eab41fde302b3 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 10 Nov 2015 22:19:05 +0000 Subject: datetime2 (10nov15) git-svn-id: svn://tug.org/texlive/trunk@38814 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/datetime2/datetime2-calc.sty | 2 +- .../texmf-dist/tex/latex/datetime2/datetime2.sty | 86 +++++++++++++++++++++- 2 files changed, 86 insertions(+), 2 deletions(-) (limited to 'Master/texmf-dist/tex/latex') diff --git a/Master/texmf-dist/tex/latex/datetime2/datetime2-calc.sty b/Master/texmf-dist/tex/latex/datetime2/datetime2-calc.sty index 6e696c1ad77..d496ec76abd 100644 --- a/Master/texmf-dist/tex/latex/datetime2/datetime2-calc.sty +++ b/Master/texmf-dist/tex/latex/datetime2/datetime2-calc.sty @@ -39,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{datetime2-calc}[2015/09/15 v1.1 (NLCT)] +\ProvidesPackage{datetime2-calc}[2015/11/10 v1.2 (NLCT)] \RequirePackage{pgfkeys} \RequirePackage{pgfcalendar} \newcount\@dtm@julianday diff --git a/Master/texmf-dist/tex/latex/datetime2/datetime2.sty b/Master/texmf-dist/tex/latex/datetime2/datetime2.sty index e008544f1b6..8f99dc1e594 100644 --- a/Master/texmf-dist/tex/latex/datetime2/datetime2.sty +++ b/Master/texmf-dist/tex/latex/datetime2/datetime2.sty @@ -39,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{datetime2}[2015/09/15 v1.1 (NLCT) date and time formats] +\ProvidesPackage{datetime2}[2015/11/10 v1.2 (NLCT) date and time formats] \RequirePackage{tracklang} \RequirePackage{etoolbox} \RequirePackage{xkeyval}[2006/11/18] @@ -524,6 +524,23 @@ \csdef{@dtm@datestyle@#1}{#2}% }% } +\newcommand*{\DTMrenewdatestyle}[2]{% + \ifcsundef{@dtm@datestyle@#1}% + {% + \PackageError{datetime2}{Date style `#1' doesn't exist}{}% + }% + {% + \csdef{@dtm@datestyle@#1}{#2}% + }% +} +\newcommand*{\DTMprovidedatestyle}[2]{% + \ifcsdef{@dtm@datestyle@#1}% + {% + }% + {% + \csdef{@dtm@datestyle@#1}{#2}% + }% +} \newcommand*{\DTMnewtimestyle}[2]{% \ifcsdef{@dtm@timestyle@#1}% {% @@ -533,6 +550,23 @@ \csdef{@dtm@timestyle@#1}{#2}% }% } +\newcommand*{\DTMrenewtimestyle}[2]{% + \ifcsundef{@dtm@timestyle@#1}% + {% + \PackageError{datetime2}{Time style `#1' doesn't exist}{}% + }% + {% + \csdef{@dtm@timestyle@#1}{#2}% + }% +} +\newcommand*{\DTMprovidetimestyle}[2]{% + \ifcsdef{@dtm@timestyle@#1}% + {% + }% + {% + \csdef{@dtm@timestyle@#1}{#2}% + }% +} \newcommand*{\DTMnewzonestyle}[2]{% \ifcsdef{@dtm@zonestyle@#1}% {% @@ -542,6 +576,23 @@ \csdef{@dtm@zonestyle@#1}{#2}% }% } +\newcommand*{\DTMrenewzonestyle}[2]{% + \ifcsundef{@dtm@zonestyle@#1}% + {% + \PackageError{datetime2}{Zone style `#1' doesn't exist}{}% + }% + {% + \csdef{@dtm@zonestyle@#1}{#2}% + }% +} +\newcommand*{\DTMprovidezonestyle}[2]{% + \ifcsdef{@dtm@zonestyle@#1}% + {% + }% + {% + \csdef{@dtm@zonestyle@#1}{#2}% + }% +} \newcommand*{\DTMdefzonemap}[3]{% \csdef{@dtm@zonemap@\DTMtwodigits{#1}:\DTMtwodigits{#2}}{#3}% } @@ -611,6 +662,39 @@ }% }% } +\newcommand*{\DTMrenewstyle}[5]{% + \ifcsundef{@dtm@style@#1}% + {% + \PackageError{datetime2}{Style `#1' doesn't exist}{}% + }% + {% + \DTMrenewdatestyle{#1}{#2}% + \DTMrenewtimestyle{#1}{#3}% + \DTMrenewzonestyle{#1}{#4}% + \csdef{@dtm@style@#1}{% + \csuse{@dtm@datestyle@#1}% + \csuse{@dtm@timestyle@#1}% + \csuse{@dtm@zonestyle@#1}% + #5% + }% + }% +} +\newcommand*{\DTMprovidestyle}[5]{% + \ifcsdef{@dtm@style@#1}% + {% + }% + {% + \DTMprovidedatestyle{#1}{#2}% + \DTMprovidetimestyle{#1}{#3}% + \DTMprovidezonestyle{#1}{#4}% + \csdef{@dtm@style@#1}{% + \csuse{@dtm@datestyle@#1}% + \csuse{@dtm@timestyle@#1}% + \csuse{@dtm@zonestyle@#1}% + #5% + }% + }% +} \newrobustcmd*{\DTMsetdatestyle}[1]{% \ifcsdef{@dtm@datestyle@#1}% {\csuse{@dtm@datestyle@#1}}% -- cgit v1.2.3