From 38a9804bf0448f3c987903d2601175f1750e9fe3 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Mon, 28 Jan 2019 17:45:12 +0100 Subject: 2019-01-28 17:06:00 --- tex/context/base/mkiv/core-con.mkiv | 64 ++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 37 deletions(-) (limited to 'tex/context/base/mkiv/core-con.mkiv') diff --git a/tex/context/base/mkiv/core-con.mkiv b/tex/context/base/mkiv/core-con.mkiv index 5ccc5ed35..d6838d835 100644 --- a/tex/context/base/mkiv/core-con.mkiv +++ b/tex/context/base/mkiv/core-con.mkiv @@ -190,10 +190,10 @@ %D want to use as meaningful commands as possible, and because \TEX\ already %D uses up some of those, we save the original meanings. -\savenormalmeaning\time -\savenormalmeaning\year -\savenormalmeaning\month -\savenormalmeaning\day +% \savenormalmeaning\time +% \savenormalmeaning\year +% \savenormalmeaning\month +% \savenormalmeaning\day %D \macros %D {month,MONTH} @@ -218,7 +218,7 @@ %D \showsetup{month} %D \showsetup{MONTH} -\let\month \monthlong +\let\month\monthlong \unexpanded\def\MONTH #1{\WORD{\month {#1}}} \unexpanded\def\MONTHLONG #1{\WORD{\monthlong {#1}}} @@ -408,18 +408,8 @@ %D %D \typebuffer \getbuffer -\setupsystem - [\c!y=\normalyear, - \c!m=\normalmonth, - \c!d=\normalday] - \newtoks \everycurrentdate -\def\syst_converters_check_date - {\edef\temp{\systemparameter\c!d}\scratchcounterone \ifx\temp\empty\normalday \else\temp\fi - \edef\temp{\systemparameter\c!m}\scratchcountertwo \ifx\temp\empty\normalmonth\else\temp\fi - \edef\temp{\systemparameter\c!y}\scratchcounterthree\ifx\temp\empty\normalyear \else\temp\fi} - \unexpanded\def\currentdate {\dosingleempty\syst_converters_current_date} @@ -427,40 +417,40 @@ {\dontleavehmode \begingroup \the\everycurrentdate - \syst_converters_check_date \clf_currentdate - {#1}% - {\currentdatespecification}% - {\labellanguage}% - \scratchcounterone - \scratchcountertwo - \scratchcounterthree + {#1}{\currentdatespecification}{\labellanguage}% + \normalyear\normalmonth\normalday \endgroup} \unexpanded\def\date {\dodoubleempty\syst_converters_date} \def\syst_converters_date[#1][#2]% - {\begingroup + {\dontleavehmode + \begingroup + \scratchcounterone \normalyear + \scratchcountertwo \normalmonth + \scratchcounterthree\normalday \iffirstargument - \setupsystem[#1]% + \letdummyparameter\c!y\empty + \letdummyparameter\c!m\empty + \letdummyparameter\c!d\empty + \getdummyparameters[#1]% + \edef\temp{\dummyparameter\c!y}\ifx\temp\empty\else\scratchcounterone \temp\fi + \edef\temp{\dummyparameter\c!m}\ifx\temp\empty\else\scratchcountertwo \temp\fi + \edef\temp{\dummyparameter\c!d}\ifx\temp\empty\else\scratchcounterthree\temp\fi + \relax \fi - \syst_converters_check_date - \syst_converters_current_date[#2]% + \the\everycurrentdate + \clf_currentdate + {#1}{\currentdatespecification}{\labellanguage}% + \scratchcounterone\scratchcountertwo\scratchcounterthree \endgroup} \def\rawdate[#1]% expandable and no labels - {\begingroup - \syst_converters_check_date - \clf_currentdate - {#1}% - {\currentdatespecification}% - {}% - \scratchcounterone - \scratchcountertwo - \scratchcounterthree - \relax - \endgroup} + {\clf_currentdate + {#1}{\currentdatespecification}{}% + \normalyear\normalmonth\normalday} %D \macros %D {currenttime} -- cgit v1.2.3