[latex3-commits] [l3svn] 07/07: l3build: Format dates correctly

noreply at latex-project.org noreply at latex-project.org
Thu Oct 8 19:31:52 CEST 2015


This is an automated email from the git hooks/post-receive script.

joseph pushed a commit to branch master
in repository l3svn.

commit 41ed4aa91ccccf0563ffc8e0303cbc50ce00c276
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Thu Oct 8 18:31:13 2015 +0100

    l3build: Format dates correctly
    
    ISO form seems best for input, but most LaTeX stuff expects
    YYYY/MM/DD.
---
 l3build/l3build.lua |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/l3build/l3build.lua b/l3build/l3build.lua
index c7075c9..b6ed55c 100644
--- a/l3build/l3build.lua
+++ b/l3build/l3build.lua
@@ -1671,6 +1671,7 @@ end
 if versionform ~= "" and not setversion_update_line then
   if versionform == "ProvidesPackage" then
     function setversion_update_line(line, date, version)
+      local date = string.gsub(date, "%-", "/")
       local i
       -- No real regex so do it one type at a time
       for _,i in pairs({"Class", "File", "Package"}) do
@@ -1689,6 +1690,7 @@ if versionform ~= "" and not setversion_update_line then
     end
   elseif versionform == "ProvidesExplPackage" then
     function setversion_update_line(line, date, version)
+      local date = string.gsub(date, "%-", "/")
       local i
       -- No real regex so do it one type at a time
       for _,i in pairs({"Class", "File", "Package"}) do
@@ -1708,6 +1710,7 @@ if versionform ~= "" and not setversion_update_line then
     end
   elseif versionform == "filename" then
     function setversion_update_line(line, date, version)
+      local date = string.gsub(date, "%-", "/")
       if string.match(line, "^\\def\\filedate{%d%d%d%d/%d%d/%d%d}$") then
         line = "\\def\\filedate{" .. date .. "}"
       end
@@ -1718,6 +1721,7 @@ if versionform ~= "" and not setversion_update_line then
     end
   elseif versionform == "ExplFileName" then
     function setversion_update_line(line, date, version)
+      local date = string.gsub(date, "%-", "/")
       if string.match(line, "^\\def\\ExplFileDate{%d%d%d%d/%d%d/%d%d}$") then
         line = "\\def\\ExplFileDate{" .. date .. "}"
       end

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the latex3-commits mailing list