Skip to content

Commit

Permalink
Simplify string.format() copies
Browse files Browse the repository at this point in the history
  • Loading branch information
josephwright committed Oct 28, 2018
1 parent 411a3f7 commit b56e6a4
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions l3kernel/l3luatex.dtx
Expand Up @@ -340,7 +340,6 @@ local open = io.open
local os_clock = os.clock
local os_date = os.date
local setcatcode = tex.setcatcode
local str_format = string.format
local sprint = tex.sprint
local write = tex.write
local utf8_char = unicode.utf8.char
Expand Down Expand Up @@ -449,16 +448,16 @@ local function filemoddate(name)
else
local hours = floor(off / 60)
local mins = abs(off - hours * 60)
timezone = str_format("%+03d", hours)
.. "'" .. str_format("%02d", mins) .. "'"
timezone = format("%+03d", hours)
.. "'" .. format("%02d", mins) .. "'"
end
write("D:"
.. str_format("%04d", d.year)
.. str_format("%02d", d.month)
.. str_format("%02d", d.day)
.. str_format("%02d", d.hour)
.. str_format("%02d", d.min)
.. str_format("%02d", d.sec)
.. format("%04d", d.year)
.. format("%02d", d.month)
.. format("%02d", d.day)
.. format("%02d", d.hour)
.. format("%02d", d.min)
.. format("%02d", d.sec)
.. timezone)
end
end
Expand Down

0 comments on commit b56e6a4

Please sign in to comment.