Modul:Jahrestag: Unterschied zwischen den Versionen
Aus FürthWiki
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
| Zeile 12: | Zeile 12: | ||
'<th>[[:Kategorie:Februar|Februar]]</th>'.. | '<th>[[:Kategorie:Februar|Februar]]</th>'.. | ||
'<th>►</th>'.. | '<th>►</th>'.. | ||
'</th>'.. | '</th>' | ||
t = t..'<tr>' | |||
for i=1, 7 do | |||
t=t..'<td>'..i..'</td>' | |||
end | |||
t = t..'</tr>' | |||
t = t..'</table>' | |||
return t | return t | ||
end | end | ||
Version vom 22. Januar 2025, 19:19 Uhr
p.Kalender
Diese Funktion bildet einen Monatstage-Kasten ab und wird per #invoke: eingebunden. Der Monat wird dem Lemma entnommen, weshalb diese Funktion keine Attribute benötigt.
p.woche
Eine nur von p.Kalender genutzte Funktion, welche die Anzahl der Wochentage für den jeweiligen Monat berechnet.
local p = {}
local c = require( "Module:Common" )
function p.Kalender( frame )
pf = frame:getParent()
args = pf.args
pt = mw.title.getCurrentTitle().text
t = '<table class="wikitable">'..
'<tr>'..
'<th>◄</th>'..
'<th>[[:Kategorie:Februar|Februar]]</th>'..
'<th>►</th>'..
'</th>'
t = t..'<tr>'
for i=1, 7 do
t=t..'<td>'..i..'</td>'
end
t = t..'</tr>'
t = t..'</table>'
return t
end
function Jahre(year)
t = '[['..tostring(year-1)..'|◄]] | ' ..
'[['..tostring(year-5)..']] | ' ..
'[['..tostring(year-4)..']] | ' ..
'[['..tostring(year-3)..']] | ' ..
'[['..tostring(year-2)..']] | ' ..
'[['..tostring(year-1)..']] | ' ..
'[['..tostring(year)..']] | ' ..
'[['..tostring(year+1)..']] | ' ..
'[['..tostring(year+2)..']] | ' ..
'[['..tostring(year+3)..']] | ' ..
'[['..tostring(year+4)..']] | ' ..
'[['..tostring(year+5)..']] | ' ..
'[['..tostring(year+1)..'|►]]<br>'
return t
end
function Jahrzehnt(year)
t = '[['..tostring(year-10)..'|◄]] | '..
'Jahrzehnt | '..
'[['..tostring(year+10)..'|►]]<br>'
return t
end
return p