Modulo:Categoria per anno
local p = {}
function err(msg) string.format('msg', msg) end
function p._main(args) local s
local mWikidata = require('Modulo:Wikidata') local mString = require('Modulo:String')
local from = args.from local localValue = args.localValue local wikidataProp = args.wikidataProp or 'P571' local wikidataValue = mWikidata._getProperty( { wikidataProp, localValue, from = from } ) local catPart = args.catPart
if ! catPart then return err('richiesto parametro catPart') end
if wikidataValue then -- @TODO mString.match does not work out of a frame local year = mString._match( { s = wikidataValue, pattern = '%d%d%d%d', nomatch = } )
if year and year ~= then s = string.format( , string.format(catPart, year) ) end end
return s end
function p.main(frame) local getArgs = require('Modulo:Arguments').getArgs return p.main( getArgs(frame) ) end
return p