local p =
local wiki =
-- This is used to get a date value for date_of_birth (P569), etc. which won't-- be linked -- consolidate by testing if entity.claims[propertyID].mainsnak.datavalue.type-- is "time". Dates and times are stored in ISO 8601 format.p.getDateValue = function(frame) local propertyID = mw.text.trim(frame.args[1] or "") local input_parm = mw.text.trim(frame.args[2] or "") local date_format = mw.text.trim(frame.args[3] or "dmy") local date_suffix = mw.text.trim(frame.args[4] or "BC") if input_parm
'value' then -- check for negative date local suffix = "" local timestamp = v.mainsnak.datavalue.value.time if string.sub(timestamp, 1, 1)
"mdy" then out[#out + 1] = d("F j, Y") elseif date_format
"y" then -- suppress leading zeros in year local stryear = d("Y") while string.sub(stryear, 1, 1)
return p