From 55575b7cad42dac55b4a5f699c33363489cb502d Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Fri, 25 Jan 2019 20:34:48 +0100 Subject: 2019-01-25 20:15:00 --- tex/context/base/mkiv/core-con.mkiv | 43 ++++++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 10 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 cc42e9b46..85b988c88 100644 --- a/tex/context/base/mkiv/core-con.mkiv +++ b/tex/context/base/mkiv/core-con.mkiv @@ -408,15 +408,33 @@ %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!y}\scratchcounterone \ifx\temp\empty\normalyear \else\temp\fi + \edef\temp{\systemparameter\c!m}\scratchcountertwo \ifx\temp\empty\normalmonth\else\temp\fi + \edef\temp{\systemparameter\c!d}\scratchcounterthree\ifx\temp\empty\normalday \else\temp\fi} + \unexpanded\def\currentdate {\dosingleempty\syst_converters_current_date} \def\syst_converters_current_date[#1]% - {\begingroup + {\dontleavehmode + \begingroup \the\everycurrentdate - \clf_currentdate{#1}{\currentdatespecification}{\labellanguage}% + \syst_converters_check_date + \clf_currentdate + {#1}% + {\currentdatespecification}% + {\labellanguage}% + \scratchcounterone + \scratchcountertwo + \scratchcounterthree \endgroup} \unexpanded\def\date @@ -425,19 +443,24 @@ \def\syst_converters_date[#1][#2]% {\begingroup \iffirstargument - \letdummyparameter\c!d\normalday - \letdummyparameter\c!m\normalmonth - \letdummyparameter\c!y\normalyear - \getdummyparameters[#1]% - \normalday \directdummyparameter\c!d\relax - \normalmonth\directdummyparameter\c!m\relax - \normalyear \directdummyparameter\c!y\relax + \setupsystem[#1]% \fi + \syst_converters_check_date \syst_converters_current_date[#2]% \endgroup} \def\rawdate[#1]% expandable and no labels - {\clf_currentdate{#1}{\currentdatespecification}{}} + {\begingroup + \syst_converters_check_date + \clf_currentdate + {#1}% + {\currentdatespecification}% + {}% + \scratchcounterone + \scratchcountertwo + \scratchcounterthree + \relax + \endgroup} %D \macros %D {currenttime} -- cgit v1.2.3