diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3doc.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3doc.dtx | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx b/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx index 43a05058002..01bc02e5e31 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx @@ -29,7 +29,7 @@ \askforoverwritefalse \preamble -Copyright (C) 1990-2017 The LaTeX3 Project +Copyright (C) 1990-2017,2019 The LaTeX3 Project It may be distributed and/or modified under the conditions of the LaTeX Project Public License (LPPL), either version 1.3c of @@ -77,7 +77,7 @@ and all files in that bundle must be distributed together. % % \title{The \cls{l3doc} class} % \author{\Team} -% \date{Released 2019-01-01} +% \date{Released 2019-01-12} % \maketitle % \tableofcontents % @@ -1351,6 +1351,8 @@ and all files in that bundle must be distributed together. { The~deprecated~function(s)~'#1'~should~have~been~removed~on~#2. } \msg_new:nnn { l3doc } { date-format } { The~date~'#1'~should~be~given~in~YYYY-MM-DD~format. } +\msg_new:nnn { l3doc } { future-date } + { The~added/updated~date~'#2'~of~'#1'~is~in~the~future. } \msg_new:nnn { l3doc } { syntax-nested-function } { The~'syntax'~environment~should~be~used~in~the~ @@ -2370,8 +2372,8 @@ and all files in that bundle must be distributed together. \bool_set_true:N \l_@@_macro_noTF_bool \bool_set_true:N \l_@@_macro_TF_bool } , - added .code:n = { \@@_date_set:Nn \l_@@_date_added_tl {#1} }, - updated .code:n = { \@@_date_set:Nn \l_@@_date_updated_tl {#1} } , + added .code:n = { \@@_date_set_past:Nn \l_@@_date_added_tl {#1} }, + updated .code:n = { \@@_date_set_past:Nn \l_@@_date_updated_tl {#1} } , deprecated .code:n = { \@@_deprecated_on:n {#1} } , tested .code:n = { } , label .code:n = @@ -2385,9 +2387,11 @@ and all files in that bundle must be distributed together. } % \end{macrocode} % -% \begin{macro}{\@@_date_set:Nn} +% \begin{macro}{\@@_date_set:Nn,\@@_date_set_past:Nn} % Normalize the date into the format \texttt{YYYY-MM-DD}; more -% precisely month and day are allowed to be single digits. +% precisely month and day are allowed to be single digits. The +% \cs{@@_date_set_past:Nn} function only allows dates in the past (or +% same day). % \begin{macrocode} \cs_new_protected:Npn \@@_date_set:Nn #1#2 { @@ -2399,6 +2403,17 @@ and all files in that bundle must be distributed together. \tl_set:Nn #1 { 1970-01-01 } } } +\cs_new_protected:Npn \@@_date_set_past:Nn #1#2 + { + \@@_date_set:Nn #1 {#2} + \exp_args:No \@@_date_compare:nNnT + {#1} > { \tex_year:D - \tex_month:D - \tex_day:D } + { + \msg_error:nnxx { l3doc } { future-date } + { \tl_to_str:N \l_@@_macro_argument_tl } + {#1} + } + } % \end{macrocode} % \end{macro} % |