Content deleted Content added
tidy module so that all local functions are available to the global functions |
update function getDateValue to make use of the formatting ability already written for the latter functions |
||
Line 546:
end
-- This is used to get a date value for date_of_birth (P569), etc. which won't be linked
-- At present the local formatDate(date, precision, timezone) function doesn't handle timezone
▲-- is "time". Dates and times are stored in ISO 8601 format.
-- So I'll just supply "Z" in the call to formatDate below:
p.getDateValue = function(frame)
local propertyID = mw.text.trim(frame.args[1] or "")
Line 559 ⟶ 560:
local out = {}
for k, v in pairs(entity.claims[propertyID]) do
if v.mainsnak.
local timestamp = v.mainsnak.datavalue.value.time
▲ out[#out + 1] = parseDateValue(timestamp, date_format, date_addon)
end
end
|