Modul:LinkSubformDatum
Aus FürthWiki
Die Dokumentation für dieses Modul kann unter Modul:LinkSubformDatum/Doku erstellt werden
local p = {}
local c = require( "Module:Common" )
function p.GetMonthday(frame)
pf = frame:getParent()
args = pf.args
months={
[1] = "Januar",
[2] = "Februar",
[3] = "März",
[4] = "April",
[5] = "Mai",
[6] = "Juni",
[7] = "Juli",
[8] = "August",
[9] = "September",
[10] = "Oktober",
[11] = "November",
[12] = "Dezember"}
date = args[1]
date_array=split(date, "/")
if isEmpty(date_array[2]) then
return ""
else
mn = months[tonumber(date_array[1])]
date_array[2] = string.gsub(date_array[2], '0*', '', 1)
end
return date_array[2]:gsub("%s+", "") .. ". " .. mn
end
function p.GetYear(frame)
pf = frame:getParent()
args = pf.args
date = args[1]
date_array=split(date, "/")
return date_array[0]
end
return p