[latex3-commits] [git/LaTeX3-latex3-l3build] master: Normalise dates to YYYY-MM-DD (aaeeee0)

Joseph Wright joseph.wright at morningstar2.co.uk
Sun May 6 19:04:58 CEST 2018


Repository : https://github.com/latex3/l3build
On branch  : master
Link       : https://github.com/latex3/l3build/commit/aaeeee02c84bde1f4f20d8cd1f03ac443bfecbd8

>---------------------------------------------------------------

commit aaeeee02c84bde1f4f20d8cd1f03ac443bfecbd8
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Sun May 6 18:04:58 2018 +0100

    Normalise dates to YYYY-MM-DD
    
    This will require .tlg updates in some cases, but
    cuts down on the information we loose.


>---------------------------------------------------------------

aaeeee02c84bde1f4f20d8cd1f03ac443bfecbd8
 l3build-check.lua |    9 ++++-----
 l3build.dtx       |    4 ++--
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/l3build-check.lua b/l3build-check.lua
index fd5371d..0a0caa6 100644
--- a/l3build-check.lua
+++ b/l3build-check.lua
@@ -89,14 +89,10 @@ local function formatlog(logfile, newfile, engine, errlevels)
     maxprintline = maxprintline + 1 -- Deal with an out-by-one error
   end
   local function killcheck(line)
-      -- Skip lines containing file dates
-      if match(line, "[^<]%d%d%d%d/%d%d/%d%d") then
-        return true
-      elseif
       -- Skip \openin/\openout lines in web2c 7.x
       -- As Lua doesn't allow "(in|out)", a slightly complex approach:
       -- do a substitution to check the line is exactly what is required!
-        match(
+      if match(
           gsub(line, "^\\openin", "\\openout"), "^\\openout%d%d? = "
         ) then
         return true
@@ -137,6 +133,9 @@ local function formatlog(logfile, newfile, engine, errlevels)
         line = gsub(line, pattern, "../%1")
       end
     end
+    -- Print only 'place-marker' (ISO) dates
+    line = gsub(line, "%d%d%d%d%-%d%d%-%d%d", "YYYY-MM-DD")
+    line = gsub(line, "%d%d%d%d/%d%d/%d%d", "YYYY-MM-DD")
     -- Deal with the fact that "(.aux)" may have still a leading space
     line = gsub(line, "^ %(%.aux%)", "(.aux)")
     -- Merge all of .fd data into one line so will be removed later
diff --git a/l3build.dtx b/l3build.dtx
index 55b9837..b0ba748 100644
--- a/l3build.dtx
+++ b/l3build.dtx
@@ -749,14 +749,14 @@
 %   \item Lines before the \cs{START}, after the \cs{END} and within
 %     \cs{OMIT}/\cs{TIMO} blocks
 %   \item Entirely blank lines, including those consisting only of spaces.
-%   \item Lines containing file dates in format
-%    \texttt{\meta{yyyy}/\meta{mm}/\meta{dd}}.
 %  \item Lines starting \cs{openin} or \cs{openout}.
 % \end{itemize}
 % Modifications made in lines are:
 % \begin{itemize}
 %   \item Removal spaces at the start of lines.
 %   \item Removal of |./| at start of file names.
+%   \item Conversion of dates (YYYY-MM-DD or YYYY/MM/DD format) to the
+%     place-holder |YYYY-MM-DD|
 %   \item Standardisation of the list of units known to \TeX{} (\pdfTeX{}
 %     and \LuaTeX{} add a small number of additional units which are not
 %     known to \TeX90 or \XeTeX{}, (u)p\TeX{} adds some additional non-standard





More information about the latex3-commits mailing list