Modul:Jahrestag: Unterschied zwischen den Versionen

K
Entfernte den Schutz von „Modul:Jahrestag
Keine Bearbeitungszusammenfassung
K (Entfernte den Schutz von „Modul:Jahrestag“)
 
(3 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt)
Zeile 9: Zeile 9:
local ma = str.split(title, '.')
local ma = str.split(title, '.')
local day, month, month_nr
local day, month, month_nr
local md, mu
local md, mu -- month down/month up
if c.len(ma) == 1 then
if c.len(ma) == 1 then
day = 0
day = 0
Zeile 74: Zeile 74:
-- A weng ungampert, aber funktioniert ;-)
-- A weng ungampert, aber funktioniert ;-)
t=t..woche(1, month) ..
t=t..p.woche(1, month) ..
woche(8, month) ..
p.woche(8, month) ..
woche(15, month) ..
p.woche(15, month) ..
woche(22, month) ..
p.woche(22, month) ..
woche(29, month)
p.woche(29, month)
t=t..'</table>'
t=t..'</table>'
return t
return t
end  
end  


function woche(d, month)
function p.woche(day, month)
a=6
local a = 6
if d == 29 then
if day == 29 then
if arr.contains({'April', 'Juni', 'September', 'November'}, month) then
if arr.contains({'April', 'Juni', 'September', 'November'}, month) then
a=1
a=1
Zeile 95: Zeile 95:
end
end
t = '<tr>'
local t = '<tr>'
for i=d, d+a do
for i=day, day + a do
     t=t..'<td align="right">[['..i..'. ' .. month .. '|' .. i .. ']]</td>'
     t = t .. '<td align="right">[['..i..'. ' .. month .. '|' .. i .. ']]</td>'
end
end
t = t..'</tr>'
t = t..'</tr>'