Skip to content

Commit ead96e2

Browse files
committed
Add date support
1 parent b47b281 commit ead96e2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

scripts/lua-placeholders-types.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ end
115115
function str_param:val()
116116
local value = self:raw_val()
117117
if value then
118+
if type(value) == 'table' and type(value.year) == 'number' then
119+
value = '\\printdateTeX{' .. value.year .. '/' .. value.month .. '/' .. value.day .. '}'
120+
end
118121
local formatted, _ = string.gsub(value, '\n', ' ')
119122
return formatted
120123
end

0 commit comments

Comments
 (0)