Modulo:FictionTV: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
+controllo nocatperanno e ns0 |
corretti pattern Lua |
||
Riga 13:
local inizio, produzione, fine, err
-- annoprimatv senza intervallo, esempio "[[2010]]" (con o senza wikilink)
inizio = annoprimatv:match('^%[?%[?(%d%d%d%d)%]?%]?$')
end
if inizio then
fine = inizio
-- intervallo tipo "[[2010]]-[[2015]]" (con o senza wikilink)
elseif mw.ustring.match(annoprimatv, '^
mw.ustring.match(annoprimatv, '^%[%[%d%d%d%d%]%]%s*[–-]%s*%[%[%d%d%d%d%]%]$') or
mw.ustring.match(annoprimatv, '^%[%[%d%d%d%d%]%]%s*[–-]%s*%d%d%d%d$') or
mw.ustring.match(annoprimatv, '^%d%d%d%d%s*[–-]%s*%[%[%d%d%d%d%]%]$') then
inizio, fine = mw.ustring.match(annoprimatv, '^%[?%[?(%d%d%d%d)%]?%]?%s*[–-]%s*%[?%[?(%d%d%d%d)%]?%]?$')
-- intervallo tipo "[[2010]] - in produzione/corso" (con o senza wikilink)
elseif mw.ustring.match(annoprimatv, '^
mw.ustring.match(annoprimatv, '^%[
mw.ustring.match(annoprimatv, '^%d%d%d%d%s*[–-]%s*in corso$') or
mw.ustring.match(annoprimatv, '^%[%[%d%d%d%d%]%]%s*[–-]%s*in corso$') then
inizio = annoprimatv:match('^%[?%[?(%d%d%d%d)%]?%]?')
produzione = ' – in produzione'
|