82.367
Bearbeitungen
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
| Zeile 5: | Zeile 5: | ||
function p.Kalender(frame) | function p.Kalender(frame) | ||
local | local args = frame:getParent().args | ||
local title = mw.title.getCurrentTitle().text | |||
local | local ma = str.split(title, '.') | ||
local ma=str.split( | local day, month, month_nr | ||
local day | local md, mu | ||
local | |||
if #ma == 0 then | if #ma == 0 then | ||
day = 0 | day = 0 | ||
| Zeile 26: | Zeile 25: | ||
end | end | ||
t='<table class="wikitable monatsbox">'.. | local t='<table class="wikitable monatsbox">'.. | ||
'<tr>' | |||
-- Von Januar aus wieder auf Dezember springen | -- Von Januar aus wieder auf Dezember springen | ||
md = month_nr-1 | md = month_nr - 1 | ||
if md == 0 then | if md == 0 then | ||
md = 12 | md = 12 | ||
| Zeile 53: | Zeile 52: | ||
-- Von Dezember aus wieder auf Januar springen | -- Von Dezember aus wieder auf Januar springen | ||
mu = month_nr+1 | mu = month_nr + 1 | ||
if mu == 13 then | if mu == 13 then | ||
mu = 1 | mu = 1 | ||
| Zeile 75: | Zeile 74: | ||
-- A weng ungampert, aber funktioniert ;-) | -- A weng ungampert, aber funktioniert ;-) | ||
t=t.. | t=t..woche(1, month) .. | ||
woche(8, month) .. | |||
woche(15, month) .. | |||
woche(22, month) .. | |||
woche(29, month) | |||
t=t..'</table>' | t=t..'</table>' | ||
return t | return t | ||
end | end | ||
function | function woche(d, month) | ||
a=6 | a=6 | ||
if d == 29 then | if d == 29 then | ||
| Zeile 98: | Zeile 97: | ||
t = '<tr>' | t = '<tr>' | ||
for i=d, d+a do | for i=d, d+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>' | ||
return t | return t | ||
end | end | ||
return p | return p | ||