From 58c7c9288160407c874930aac789ef6ef3faa6b5 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Tue, 10 Sep 2019 21:16:35 +0200 Subject: 2019-09-10 20:11:00 --- tex/context/base/mkiv/core-con.lua | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'tex/context/base/mkiv/core-con.lua') diff --git a/tex/context/base/mkiv/core-con.lua b/tex/context/base/mkiv/core-con.lua index 6d71071a0..4f6090ef5 100644 --- a/tex/context/base/mkiv/core-con.lua +++ b/tex/context/base/mkiv/core-con.lua @@ -311,12 +311,15 @@ local function textime() return tonumber(osdate("%H")) * 60 + tonumber(osdate("%M")) end -function converters.year () return osdate("%Y") end -function converters.month () return osdate("%m") end -- always two digits -function converters.day () return osdate("%d") end -function converters.hour () return osdate("%H") end -function converters.minute() return osdate("%M") end -function converters.second() return osdate("%S") end +-- For consistenty we need to add day here but that conflicts with the current +-- serializer so then best is to have none from now on: + +-- function converters.year () return osdate("%Y") end +-- function converters.month () return osdate("%m") end -- always two digits +-- function converters.day () return osdate("%d") end -- conflicts +-- function converters.hour () return osdate("%H") end +-- function converters.minute() return osdate("%M") end +-- function converters.second() return osdate("%S") end converters.weekday = weekday converters.isleapyear = isleapyear @@ -330,6 +333,7 @@ implement { name = "nofdays", actions = { nofdays, context }, arguments = { "i implement { name = "year", actions = { osdate, context }, arguments = "'%Y'" } implement { name = "month", actions = { osdate, context }, arguments = "'%m'" } +implement { name = "day", actions = { osdate, context }, arguments = "'%d'" } implement { name = "hour", actions = { osdate, context }, arguments = "'%H'" } implement { name = "minute", actions = { osdate, context }, arguments = "'%M'" } implement { name = "second", actions = { osdate, context }, arguments = "'%S'" } -- cgit v1.2.3