Modul:Jahrestag

Aus FürthWiki

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>one</th>
    <th>two</th>
  </th>
  <tr>
    <td>one</td>
    <td>two</td>
  </tr>
</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