Modul:RO: Unterschied zwischen den Versionen

Aus ipsc.de
Zur Navigation springen Zur Suche springen
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 6: Zeile 6:
  pt = title:getContent()
  pt = title:getContent()
  local match = os.date('%y')..'%-%d%d%-(%d%d+)'
  local match = os.date('%y')..'%-%d%d%-(%d%d+)'
  local out = match..' -> '
  local new = '01'
  for w in string.gmatch(pt, match) do
  for w in string.gmatch(pt, match) do
   out = out..' '..w
   if w > new then
  new = w + 1
  end
  end
  end
  return out
  return new
end
end


return p
return p

Version vom 15. Dezember 2020, 18:25 Uhr

Die Dokumentation für dieses Modul kann unter Modul:RO/Doku erstellt werden

local p = {}

function p.next(frame)
 local page = frame.args[1]
 title  = mw.title .new(page)
 pt = title:getContent()
 local match = os.date('%y')..'%-%d%d%-(%d%d+)'
 local new = '01'
 for w in string.gmatch(pt, match) do
  if w > new then
   new = w + 1
  end
 end
 return new
end

return p