Module:European and national party data/Wd: Difference between revisions

Content deleted Content added
m Protected "Module:European and national party data/Wd": High-risk template or module: 252 transclusions (more info) ([Edit=Require autoconfirmed or confirmed access] (indefinite))
m ops, no need to reformat value as a data value when there is no month nor day
 
(One intermediate revision by the same user not shown)
Line 897:
end
 
value = self.langObj:formatNum( tonumber(value) )
-- replace decimal mark based on locale
value = replaceDecimalMark(value)
 
-- add delimiters for readability
value = i18n.addDelimiters(value)
end
 
Line 1,089 ⟶ 1,085:
value = tostring(yRound)
 
local mStr = m and tostring(m) or '1'
local dStr = d and tostring(d) or '1'
local fmt
if m then
dateStr = self.langObj:formatDate("F", "1-"..m.."-1")
 
if d then
if self.mdyDate then
fmt = i18n['datetime']['format']['mdy']
dateStr = dateStr .. " " .. d .. ","
else
fmt = i18n['datetime']['format']['dmy']
dateStr = d .. " " .. dateStr
end
else
fmt = i18n['datetime']['format']['my']
end
dateStrvalue = self.langObj:formatDate("F"fmt, "1value..'-"'..mmStr.."'-1"'..dStr)
 
else
value = dateStr .. " " .. value
-- fmt i18n['datetime']['format']['y'] === fmt 'Y' === value
end