67 060
contributi
(Collectiontable fixed) |
(Year only modification) |
||
Riga 170: | Riga 170: | ||
AccValues[#AccValues + 1] = GenericItem | AccValues[#AccValues + 1] = GenericItem | ||
elseif SnakValue.mainsnak.datavalue['type'] == 'time' then | elseif SnakValue.mainsnak.datavalue['type'] == 'time' then | ||
-- "+2367-00-00T00:00:00Z" | |||
local Instant = Value['time'] | |||
local OutputFormat = "ITEstesa" | |||
if string.sub(Instant, 6, 7) == "00" or string.sub(Instant, 9, 10) == "00" then | |||
Instant = Instant:sub(1, 5) .. "-01-01" | |||
OutputFormat = "SoloAnno" | |||
end | |||
if AddSemantic then | if AddSemantic then | ||
AccValues[#AccValues + 1] = "[[" .. Header[2] .. "::" .. Value['time'] .. "|" .. frame:expandTemplate{title = 'TimeL', args = {Tipo='ITEstesa', Istante=Value['time']}} .. "]]" | --AccValues[#AccValues + 1] = "[[" .. Header[2] .. "::" .. Value['time'] .. "|" .. frame:expandTemplate{title = 'TimeL', args = {Tipo='ITEstesa', Istante=Value['time']}} .. "]]" | ||
AccValues[#AccValues + 1] = "[[" .. Header[2] .. "::" .. instant .. "|" .. frame:expandTemplate{title = 'TimeL', args = {Tipo=OutputFormat, Istante=Instant}} .. "]]" | |||
else | else | ||
AccValues[#AccValues + 1] = frame:expandTemplate{title = 'TimeL', args = {Tipo='ITEstesa', Istante=Value['time']}} | --AccValues[#AccValues + 1] = frame:expandTemplate{title = 'TimeL', args = {Tipo='ITEstesa', Istante=Value['time']}} | ||
AccValues[#AccValues + 1] = frame:expandTemplate{title = 'TimeL', args = {Tipo=OutputFormat, Istante=Instant}} | |||
end | end | ||
elseif SnakValue.mainsnak.datavalue.type == 'quantity' then | elseif SnakValue.mainsnak.datavalue.type == 'quantity' then |