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))
let the system to format numbers and dates based on locale
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
else
 
value-- =fmt dateStri18n['datetime']['format']['y'] ..=== "fmt "'Y' ..=== value
end
dateStrvalue = self.langObj:formatDate("F"fmt, "1value..'-"'..mmStr.."'-1"'..dStr)
 
value = prefix .. value .. suffix .. calendar