Modulo:Ciclismo: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
m configurazione
m lang
Riga 7:
local getArgs = require('Module:Arguments').getArgs
local mWikidata = require('Module:Wikidata')
local cfg = mw.loadData("'Module:Ciclismo/Configuration"')
cfg.i18n = cfg.i18n[mw.language.getContentLanguage():getCode()]
 
Riga 25:
setmetatable(self, { __index = StagesTable })
self.stages = {}
local lang = mw.language.getContentLanguage()
local ids = mWikidata._getProperty( { 'P527', formatting = 'raw', from = from }, true ) or {}
for _, id in ipairs(ids) do
local timestamp = mWikidata._getProperty( { 'P585', n = 1, formatting = 'raw', from = id } )
local year, month, day = timestamp:match('(%d+)%-(%d%d)%-(%d%d).+')
local lang = mw.language.getContentLanguage()
local month = lang:formatDate('F', tonumber(year) .. '-' .. month .. '-' .. day)
self.stages[#self.stages + 1] = {