Modul:Zeit: Unterschied zwischen den Versionen

Aus skandinavien-wiki.net
Keine Bearbeitungszusammenfassung
K (59 Versionen von wikivoyage:Modul:Zeit importiert)
 
(8 dazwischenliegende Versionen von einem anderen Benutzer werden nicht angezeigt)
Zeile 1: Zeile 1:
local check = require('Modul:Check')
local check = require('Modul:Check2')
local params = mw.loadData('Modul:Zeit/Params')
local params = mw.loadData('Modul:Zeit/Params')
local lang = mw.language.new ( 'de' );
local lang = mw.language.new ( 'de' );
Zeile 7: Zeile 7:
function zeit.inhalt_monat ( frame )
function zeit.inhalt_monat ( frame )
  funcParams = params['inhalt_monat']
funcParams = params['inhalt_monat']
  args = frame:getParent().args
args = frame:getParent().args
 
  local januar = args['jan'] or args['januar'] or args['std'] or args['standard'] or funcParams['jan']  
local januar = args['jan'] or args['januar'] or args['std'] or args['standard'] or funcParams['jan']
  local februar = args['feb'] or args['februar'] or args['std'] or args['standard'] or funcParams['feb']
local februar = args['feb'] or args['februar'] or args['std'] or args['standard'] or funcParams['feb']
  local maerz = args['mar'] or args['maerz'] or args['std'] or args['standard'] or funcParams['mar']  
local maerz = args['mar'] or args['maerz'] or args['std'] or args['standard'] or funcParams['mar']
  local april = args['apr'] or args['april'] or args['std'] or args['standard'] or funcParams['apr']  
local april = args['apr'] or args['april'] or args['std'] or args['standard'] or funcParams['apr']
  local mai = args['mai'] or args['std'] or args['standard'] or funcParams['mai']  
local mai = args['mai'] or args['std'] or args['standard'] or funcParams['mai']
  local juni = args['jun'] or args['juni'] or args['std'] or args['standard'] or funcParams['jun']  
local juni = args['jun'] or args['juni'] or args['std'] or args['standard'] or funcParams['jun']
  local juli = args['jul'] or args['juli'] or args['std'] or args['standard'] or funcParams['jul']
local juli = args['jul'] or args['juli'] or args['std'] or args['standard'] or funcParams['jul']
  local august = args['aug'] or args['august'] or args['std'] or args['standard'] or funcParams['aug']
local august = args['aug'] or args['august'] or args['std'] or args['standard'] or funcParams['aug']
  local september = args['sep'] or args['september'] or args['std'] or args['standard'] or funcParams['sep']  
local september = args['sep'] or args['september'] or args['std'] or args['standard'] or funcParams['sep']
  local oktober = args['okt'] or args['oktober'] or args['std'] or args['standard'] or funcParams['okt']  
local oktober = args['okt'] or args['oktober'] or args['std'] or args['standard'] or funcParams['okt']
  local november = args['nov'] or args['november'] or args['std'] or args['standard'] or funcParams['nov']
local november = args['nov'] or args['november'] or args['std'] or args['standard'] or funcParams['nov']
  local dezember = args['dez'] or args['dezember'] or args['std'] or args['standard'] or funcParams['dez']
local dezember = args['dez'] or args['dezember'] or args['std'] or args['standard'] or funcParams['dez']
 
  local ausgabe = funcParams['st']
local ausgabe = funcParams['st']
  local monat = lang:formatDate ( 'm' )
local monat = lang:formatDate ( 'm' )
 
  if monat == '01' then ausgabe = januar end
if monat == '01' then ausgabe = januar end
  if monat == '02' then ausgabe = februar end
if monat == '02' then ausgabe = februar end
  if monat == '03' then ausgabe = maerz end
if monat == '03' then ausgabe = maerz end
  if monat == '04' then ausgabe = april end
if monat == '04' then ausgabe = april end
  if monat == '05' then ausgabe = mai end
if monat == '05' then ausgabe = mai end
  if monat == '06' then ausgabe = juni end
if monat == '06' then ausgabe = juni end
  if monat == '07' then ausgabe = juli end
if monat == '07' then ausgabe = juli end
  if monat == '08' then ausgabe = august end
if monat == '08' then ausgabe = august end
  if monat == '09' then ausgabe = september end
if monat == '09' then ausgabe = september end
  if monat == '10' then ausgabe = oktober end
if monat == '10' then ausgabe = oktober end
  if monat == '11' then ausgabe = november end
if monat == '11' then ausgabe = november end
  if monat == '12' then ausgabe = dezember end
if monat == '12' then ausgabe = dezember end


  return check._testParams ( args, funcParams, 'Zeit' ) .. ausgabe
return check._testParams ( args, funcParams, 'Zeit' ) .. ausgabe
end
end


function zeit.inhalt_jahreszeit ( frame )
function zeit.inhalt_jahreszeit ( frame )
  funcParams = params['inhalt_jahreszeit']
funcParams = params['inhalt_jahreszeit']
  args = frame:getParent().args
args = frame:getParent().args
 
  local paramsTypen = { astronomisch = 'astronomisch', meteorologisch = 'meteorologisch' }
local paramsTypen = { astronomisch = 'astronomisch', meteorologisch = 'meteorologisch' }
  local errorStr = '';
local errorStr = '';
 
  local fruehling = args['fr'] or args['fruehling'] or args['std'] or args['standard'] or funcParams['fr']  
local fruehling = args['fr'] or args['fruehling'] or args['std'] or args['standard'] or funcParams['fr']
  local sommer = args['so'] or args['sommer'] or args['std'] or args['standard'] or funcParams['so']  
local sommer = args['so'] or args['sommer'] or args['std'] or args['standard'] or funcParams['so']
  local herbst = args['he'] or args['herbst'] or args['std'] or args['standard'] or funcParams['he']
local herbst = args['he'] or args['herbst'] or args['std'] or args['standard'] or funcParams['he']
  local winter = args['wi'] or args['winter'] or args['std'] or args['standard'] or funcParams['wi']
local winter = args['wi'] or args['winter'] or args['std'] or args['standard'] or funcParams['wi']
 
  local typ = args['typ'] or funcParams['typ']
local typ = args['typ'] or funcParams['typ']
 
  local ausgabe = funcParams['std']
local ausgabe = funcParams['std']
 
  if paramsTypen[typ] == nil then errorStr = check._error ('Falscher Wert für Parameter <em>typ</em>: <em>' .. typ .. '</em>', 'Zeit' ) end
if paramsTypen[typ] == nil then errorStr = check._error ('Falscher Wert für Parameter <em>typ</em>: <em>' .. typ .. '</em>', 'Zeit' ) end
  if typ == 'meteorologisch' then
if typ == 'meteorologisch' then
      local monat = lang:formatDate ( 'm' )
local monat = lang:formatDate ( 'm' )
      if monat == '01' then ausgabe = winter end
if monat == '01' then ausgabe = winter end
      if monat == '02' then ausgabe = winter end
if monat == '02' then ausgabe = winter end
      if monat == '03' then ausgabe = fruehling end
if monat == '03' then ausgabe = fruehling end
      if monat == '04' then ausgabe = fruehling end
if monat == '04' then ausgabe = fruehling end
      if monat == '05' then ausgabe = fruehling end
if monat == '05' then ausgabe = fruehling end
      if monat == '06' then ausgabe = sommer end
if monat == '06' then ausgabe = sommer end
      if monat == '07' then ausgabe = sommer end
if monat == '07' then ausgabe = sommer end
      if monat == '08' then ausgabe = sommer end
if monat == '08' then ausgabe = sommer end
      if monat == '09' then ausgabe = herbst end
if monat == '09' then ausgabe = herbst end
      if monat == '10' then ausgabe = herbst end
if monat == '10' then ausgabe = herbst end
      if monat == '11' then ausgabe = herbst end
if monat == '11' then ausgabe = herbst end
      if monat == '12' then ausgabe = winter end    
if monat == '12' then ausgabe = winter end
  end
end
  if typ == 'astronomisch' then
if typ == 'astronomisch' then
      local jahr = lang:formatDate ( 'Y' )
local jahr = lang:formatDate ( 'Y' )
      local differenz = os.difftime ( os.time(), os.time ( { year = jahr, month = '01', day = '01' } ) )
local differenz = os.difftime ( os.time(), os.time ( { year = jahr, month = '01', day = '01' } ) )
      tage = math.floor ( differenz / 86400 +0.5 )
tage = math.floor ( differenz / 86400 +0.5 )
      if tage < 78 then ausgabe = winter
if tage < 78 then ausgabe = winter
      else
else
        if tage < 178 then ausgabe = fruehling
if tage < 178 then ausgabe = fruehling
        else
else
            if tage < 265 then ausgabe = sommer
if tage < 265 then ausgabe = sommer
            else
else
              if tage < 355 then ausgabe = herbst
if tage < 355 then ausgabe = herbst
              else
else
                  ausgabe = winter
ausgabe = winter
              end
end
            end
end
        end
end
      end
end
     
  end
end
  return errorStr .. check._testParams ( args, funcParams, 'Zeit' ) .. ausgabe
return errorStr .. check._testParams ( args, funcParams, 'Zeit' ) .. ausgabe
end
end


function zeit.inhalt_saison ( frame )
function zeit.inhalt_saison ( frame )
  funcParams = params['inhalt_saison']
funcParams = params['inhalt_saison']
  args = frame:getParent().args
args = frame:getParent().args
 
  local sommer = args['so'] or args['sommer'] or args['std'] or args['standard'] or funcParams['so']
local sommer = args['so'] or args['sommer'] or args['std'] or args['standard'] or funcParams['so']
  local winter = args['wi'] or args['winter'] or args['std'] or args['standard'] or funcParams['wi']
local winter = args['wi'] or args['winter'] or args['std'] or args['standard'] or funcParams['wi']
 
  local ausgabe = funcParams['std']
local ausgabe = funcParams['std']
 
  local datum = os.date( '*t' )
-- local datum = os.date( '*t' )
  if datum['isdst'] then ausgabe = sommer else ausgabe = winter end
-- if datum['isdst'] then ausgabe = sommer else ausgabe = winter end
 
local saison = lang:formatDate ( 'I', nil , true )
  return check._testParams ( args, funcParams, 'Zeit' ) .. ausgabe
if ( saison == '1' ) then ausgabe = sommer else ausgabe = winter end
return check._testParams ( args, funcParams, 'Zeit' ) .. ausgabe
end
end


function zeit.inhalt_zeitraum ( frame )
function zeit.inhalt_zeitraum ( frame )
  local jahr = lang:formatDate ( 'Y' )
local jahr = lang:formatDate ( 'Y' )
  funcParams = params['inhalt_zeitraum']
funcParams = params['inhalt_zeitraum']
  args = frame:getParent().args
args = frame:getParent().args
 
  local errorStr = '';
local errorStr = '';
 
  local von_tag = args['von_tag'] or funcParams['von_tag']  
local von_tag = args['von_tag'] or funcParams['von_tag']
  local von_monat = args['von_monat'] or funcParams['von_monat']  
local von_monat = args['von_monat'] or funcParams['von_monat']
  local bis_monat = args['bis_monat'] or funcParams['bis_monat']
local bis_monat = args['bis_monat'] or funcParams['bis_monat']
 
  local bis_tag = args['bis_tag']
local bis_tag = args['bis_tag']
  if bis_tag == nil then  
if bis_tag == nil then  
      bis_tag = funcParams['bis_tag']  
bis_tag = funcParams['bis_tag']  
      if bis_monat == '02' then  
if bis_monat == '02' then  
        bis_tag = 28
bis_tag = 28
        if jahr / 4 == math.floor ( jahr / 4 ) then bis_tag = 29 end
if jahr / 4 == math.floor ( jahr / 4 ) then bis_tag = 29 end
      end
end
      if bis_monat == '04' then bis_tag = 30 end
if bis_monat == '04' then bis_tag = 30 end
      if bis_monat == '06' then bis_tag = 30 end
if bis_monat == '06' then bis_tag = 30 end
      if bis_monat == '09' then bis_tag = 30 end
if bis_monat == '09' then bis_tag = 30 end
      if bis_monat == '11' then bis_tag = 30 end
if bis_monat == '11' then bis_tag = 30 end
  end
end
 
  local inhalt = args['inhalt']
local inhalt = args['inhalt']
  if inhalt == nil then
if inhalt == nil then
      inhalt = funcParams['inhalt']
inhalt = funcParams['inhalt']
      errorStr = check._error ('Kein Textinhalt für den Zeitraum angegeben.', 'Zeit' )
errorStr = check._error ('Kein Textinhalt für den Zeitraum angegeben.', 'Zeit' )
  end
end


  local standard = args['std'] or args['standard'] or funcParams['std']
local standard = args['std'] or args['standard'] or funcParams['std']


  local ausgabe = standard
local ausgabe = standard


  local differenz = os.difftime ( os.time(), os.time ( { year = jahr, month = '01', day = '01' } ) )
local differenz = os.difftime ( os.time(), os.time ( { year = jahr, month = '01', day = '01' } ) )
  local heute = math.floor ( differenz / 86400 +0.5 )
local heute = math.floor ( differenz / 86400 +0.5 )
  differenz = os.difftime ( os.time( { year = jahr, month = von_monat, day = von_tag } ), os.time ( { year = jahr, month = '01', day = '01' } ) )
differenz = os.difftime ( os.time( { year = jahr, month = von_monat, day = von_tag } ), os.time ( { year = jahr, month = '01', day = '01' } ) )
  local von = math.floor ( differenz / 86400 +0.5 )
local von = math.floor ( differenz / 86400 +0.5 )
  differenz = os.difftime ( os.time( { year = jahr, month = bis_monat, day = bis_tag } ), os.time ( { year = jahr, month = '01', day = '01' } ) )
differenz = os.difftime ( os.time( { year = jahr, month = bis_monat, day = bis_tag } ), os.time ( { year = jahr, month = '01', day = '01' } ) )
  local bis = math.floor ( differenz / 86400 +0.5 )
local bis = math.floor ( differenz / 86400 +0.5 )
  if von > bis then
if von > bis then
      if jahr / 4 == math.floor ( jahr / 4 ) then von = von - 357 else von = von - 356 end
if jahr / 4 == math.floor ( jahr / 4 ) then von = von - 357 else von = von - 356 end
  end
end
 
  if heute >= von and heute <= bis then ausgabe = inhalt end
local inside = false;
 
  return errorStr .. check._testParams ( args, funcParams, 'Zeit' ) .. ausgabe
if heute >= von and heute <= bis then inside = true end
if jahr / 4 == math.floor ( jahr / 4 ) then
von = von + 357
bis = bis + 357
else
von = von + 356
bis = bis + 356
end
if heute >= von and heute <= bis then inside = true end
if inside then ausgabe = inhalt end
return errorStr .. check._testParams ( args, funcParams, 'Zeit' ) .. ausgabe
end
end


Zeile 178: Zeile 192:
if ( string.len(monatStr) == 1 ) then monatStr = '0'..monatStr end
if ( string.len(monatStr) == 1 ) then monatStr = '0'..monatStr end


--return lang:formatDate ( ausgabeFormat, tostring ( jahr + math.floor ( ( anzahl + monat - 1 ) / 12 ) )..monatStr..tag )
return lang:formatDate ( ausgabeFormat, tostring ( jahr + math.floor ( ( anzahl + monat - 1 ) / 12 ) )..monatStr..tag )
return monatStr
end
 
function zeit.addYear ( frame )
local funcParams = params['addYear']
local vArgs = frame.args
local args = frame:getParent().args
 
local anzahl = tonumber( vArgs['anzahlJahre'] or args['anzahlJahre'] or funcParams['anzahlJahre'] )
local ausgabeFormat = vArgs['format'] or args['format'] or funcParams['format']
local jahr = tonumber( vArgs['jahr'] or args['jahr'] or lang:formatDate ( 'Y' ) )
local monat = vArgs['monat'] or args['monat'] or lang:formatDate ( 'm' )
local tag = vArgs['tag'] or args['tag'] or lang:formatDate ( 'd' )
 
return lang:formatDate ( ausgabeFormat, tostring ( jahr + anzahl )..monat..tag )
end
end


return zeit
return zeit

Aktuelle Version vom 22. Februar 2023, 22:31 Uhr

Die Dokumentation für dieses Modul kann unter Modul:Zeit/doc erstellt werden

local check = require('Modul:Check2')
local params = mw.loadData('Modul:Zeit/Params')
local lang = mw.language.new ( 'de' );

local zeit = {}

function zeit.inhalt_monat ( frame )
	
	funcParams = params['inhalt_monat']
	args = frame:getParent().args
	
	local januar = args['jan'] or args['januar'] or args['std'] or args['standard'] or funcParams['jan']	
	local februar = args['feb'] or args['februar'] or args['std'] or args['standard'] or funcParams['feb']
	local maerz = args['mar'] or args['maerz'] or args['std'] or args['standard'] or funcParams['mar']	
	local april = args['apr'] or args['april'] or args['std'] or args['standard'] or funcParams['apr']	
	local mai = args['mai'] or args['std'] or args['standard'] or funcParams['mai']	
	local juni = args['jun'] or args['juni'] or args['std'] or args['standard'] or funcParams['jun']	
	local juli = args['jul'] or args['juli'] or args['std'] or args['standard'] or funcParams['jul']
	local august = args['aug'] or args['august'] or args['std'] or args['standard'] or funcParams['aug']
	local september = args['sep'] or args['september'] or args['std'] or args['standard'] or funcParams['sep']	
	local oktober = args['okt'] or args['oktober'] or args['std'] or args['standard'] or funcParams['okt']	
	local november = args['nov'] or args['november'] or args['std'] or args['standard'] or funcParams['nov']
	local dezember = args['dez'] or args['dezember'] or args['std'] or args['standard'] or funcParams['dez']
	
	local ausgabe = funcParams['st']
	local monat = lang:formatDate ( 'm' )
	
	if monat == '01' then ausgabe = januar end
	if monat == '02' then ausgabe = februar end
	if monat == '03' then ausgabe = maerz end
	if monat == '04' then ausgabe = april end
	if monat == '05' then ausgabe = mai end
	if monat == '06' then ausgabe = juni end
	if monat == '07' then ausgabe = juli end
	if monat == '08' then ausgabe = august end
	if monat == '09' then ausgabe = september end
	if monat == '10' then ausgabe = oktober end
	if monat == '11' then ausgabe = november end
	if monat == '12' then ausgabe = dezember end

	return check._testParams ( args, funcParams, 'Zeit' ) .. ausgabe
end

function zeit.inhalt_jahreszeit ( frame )
	
	funcParams = params['inhalt_jahreszeit']
	args = frame:getParent().args
	
	local paramsTypen = { astronomisch = 'astronomisch', meteorologisch = 'meteorologisch' }
	local errorStr = '';
	
	local fruehling = args['fr'] or args['fruehling'] or args['std'] or args['standard'] or funcParams['fr']	
	local sommer = args['so'] or args['sommer'] or args['std'] or args['standard'] or funcParams['so']	
	local herbst = args['he'] or args['herbst'] or args['std'] or args['standard'] or funcParams['he']
	local winter = args['wi'] or args['winter'] or args['std'] or args['standard'] or funcParams['wi']
	
	local typ = args['typ'] or funcParams['typ']
	
	local ausgabe = funcParams['std']
	
	if paramsTypen[typ] == nil then errorStr = check._error ('Falscher Wert für Parameter <em>typ</em>: <em>' .. typ .. '</em>', 'Zeit' ) end
	if typ == 'meteorologisch' then
		local monat = lang:formatDate ( 'm' )
		if monat == '01' then ausgabe = winter end
		if monat == '02' then ausgabe = winter end
		if monat == '03' then ausgabe = fruehling end
		if monat == '04' then ausgabe = fruehling end
		if monat == '05' then ausgabe = fruehling end
		if monat == '06' then ausgabe = sommer end
		if monat == '07' then ausgabe = sommer end
		if monat == '08' then ausgabe = sommer end
		if monat == '09' then ausgabe = herbst end
		if monat == '10' then ausgabe = herbst end
		if monat == '11' then ausgabe = herbst end
		if monat == '12' then ausgabe = winter end		
	end
	if typ == 'astronomisch' then
		local jahr = lang:formatDate ( 'Y' )
		local differenz = os.difftime ( os.time(), os.time ( { year = jahr, month = '01', day = '01' } ) )
		tage = math.floor ( differenz / 86400 +0.5 )
		if tage < 78 then ausgabe = winter
		else
			if tage < 178 then ausgabe = fruehling
			else
				if tage < 265 then ausgabe = sommer
				else
					if tage < 355 then ausgabe = herbst
					else
						ausgabe = winter
					end
				end
			end
		end
		
	end
	return errorStr .. check._testParams ( args, funcParams, 'Zeit' ) .. ausgabe
end

function zeit.inhalt_saison ( frame )
	
	funcParams = params['inhalt_saison']
	args = frame:getParent().args
	
	local sommer = args['so'] or args['sommer'] or args['std'] or args['standard'] or funcParams['so']
	local winter = args['wi'] or args['winter'] or args['std'] or args['standard'] or funcParams['wi']
	
	local ausgabe = funcParams['std']
	
	-- local datum = os.date( '*t' )
	-- if datum['isdst'] then ausgabe = sommer else ausgabe = winter end
	local saison = lang:formatDate ( 'I', nil , true )
	if ( saison == '1' ) then ausgabe = sommer else ausgabe = winter end
	
	return check._testParams ( args, funcParams, 'Zeit' ) .. ausgabe
end

function zeit.inhalt_zeitraum ( frame )
	
	local jahr = lang:formatDate ( 'Y' )
	funcParams = params['inhalt_zeitraum']
	args = frame:getParent().args
	
	local errorStr = '';
	
	local von_tag = args['von_tag'] or funcParams['von_tag']	
	local von_monat = args['von_monat'] or funcParams['von_monat']	
	local bis_monat = args['bis_monat'] or funcParams['bis_monat']
	
	local bis_tag = args['bis_tag']
	if bis_tag == nil then 
		bis_tag = funcParams['bis_tag'] 
		if bis_monat == '02' then 
			bis_tag = 28
			if jahr / 4 == math.floor ( jahr / 4 ) then bis_tag = 29 end
		end
		if bis_monat == '04' then bis_tag = 30 end
		if bis_monat == '06' then bis_tag = 30 end
		if bis_monat == '09' then bis_tag = 30 end
		if bis_monat == '11' then bis_tag = 30 end
	end
	
	local inhalt = args['inhalt']
	if inhalt == nil then
		inhalt = funcParams['inhalt']
		errorStr = check._error ('Kein Textinhalt für den Zeitraum angegeben.', 'Zeit' )
	end

	local standard = args['std'] or args['standard'] or funcParams['std']

	local ausgabe = standard

	local differenz = os.difftime ( os.time(), os.time ( { year = jahr, month = '01', day = '01' } ) )
	local heute = math.floor ( differenz / 86400 +0.5 )
	differenz = os.difftime ( os.time( { year = jahr, month = von_monat, day = von_tag } ), os.time ( { year = jahr, month = '01', day = '01' } ) )
	local von = math.floor ( differenz / 86400 +0.5 )
	differenz = os.difftime ( os.time( { year = jahr, month = bis_monat, day = bis_tag } ), os.time ( { year = jahr, month = '01', day = '01' } ) )
	local bis = math.floor ( differenz / 86400 +0.5 )
	if von > bis then
		if jahr / 4 == math.floor ( jahr / 4 ) then von = von - 357 else von = von - 356 end
	end
	
	local inside = false;
	
	if heute >= von and heute <= bis then inside = true end
	if jahr / 4 == math.floor ( jahr / 4 ) then 
		von = von + 357
		bis = bis + 357
	else 
		von = von + 356
		bis = bis + 356
	end
	if heute >= von and heute <= bis then inside = true end
	
	if inside then ausgabe = inhalt end
	
	return errorStr .. check._testParams ( args, funcParams, 'Zeit' ) .. ausgabe
end

function zeit.addMonth ( frame )
	
	local funcParams = params['addMonth']
	local vArgs = frame.args
	local args = frame:getParent().args

	local anzahl = tonumber( vArgs['anzahlMonate'] or args['anzahlMonate'] or funcParams['anzahlMonate'] )
	local ausgabeFormat = vArgs['format'] or args['format'] or funcParams['format']
	local jahr = tonumber( vArgs['jahr'] or args['jahr'] or lang:formatDate ( 'Y' ) )
	local monat = tonumber( vArgs['monat'] or args['monat'] or lang:formatDate ( 'm' ) )
	local tag = vArgs['tag'] or args['tag'] or lang:formatDate ( 'd' )
	
	local monatStr = tostring ( monat + anzahl - ( math.floor ( ( anzahl + monat - 1 ) / 12 ) * 12 ) )
	if ( string.len(monatStr) == 1 ) then monatStr = '0'..monatStr end

	return lang:formatDate ( ausgabeFormat, tostring ( jahr + math.floor ( ( anzahl + monat - 1 ) / 12 ) )..monatStr..tag )
end

function zeit.addYear ( frame )
	
	local funcParams = params['addYear']
	local vArgs = frame.args
	local args = frame:getParent().args

	local anzahl = tonumber( vArgs['anzahlJahre'] or args['anzahlJahre'] or funcParams['anzahlJahre'] )
	local ausgabeFormat = vArgs['format'] or args['format'] or funcParams['format']
	local jahr = tonumber( vArgs['jahr'] or args['jahr'] or lang:formatDate ( 'Y' ) )
	local monat = vArgs['monat'] or args['monat'] or lang:formatDate ( 'm' )
	local tag = vArgs['tag'] or args['tag'] or lang:formatDate ( 'd' )

	return lang:formatDate ( ausgabeFormat, tostring ( jahr + anzahl )..monat..tag )
end

return zeit