Modulu:Wikidata: berrikuspenen arteko aldeak
Ezabatutako edukia Gehitutako edukia
tracking time precision |
fix leading zeros in year, remove datetime precisions not used, remove tracking |
||
24. lerroa:
[8] = "$1s", -- precision: decade
-- the following use the format of #time parser function
[9] = "Y", -- precision: year
[10] = "F Y", -- precision: month
[11] = "F j, Y", -- precision: day
["beforenow"] = "$1 BCE", -- how to format negative numbers for precisions 0 to 5
477 ⟶ 474 lerroa:
local card = math.floor(math.abs(intyear) / 10) * 10
ret = mw.ustring.gsub(i18n.datetime[8], "$1", tostring(card)) .. addon .. calendar_add
elseif
ret = tostring(intyear) .. addon .. calendar_add
elseif precision == 10 then -- month
timestamp = timestamp .. " + 1 day" -- formatDate yyyy-mm-00 returns the previous month
ret, _ = string.gsub(d(i18n.datetime[10]), "([ %[])0+", "
else -- precision 11, day
▲ ret, _ = string.gsub(d(i18n.datetime[11]), " 0+", " ")
end
return ret, sortkey
|