Modul:Chronik: Unterschied zwischen den Versionen

Aus FürthWiki

Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 20: Zeile 20:
function dateParsing(s, year)
function dateParsing(s, year)
-- Parses a date down where s is the datestring and year can be nil or string
-- Parses a date down where s is the datestring and year can be nil or string
return s
ds = s
return ds
end
end


return p
return p

Version vom 20. August 2025, 13:10 Uhr

local p = {}
local c = require( "Module:Common" )

function p.Semantify(frame)
	pf = frame:getParent()
	args = pf.args
	title = mw.title.getCurrentTitle()
	
	-- Wenn das Lemma eine Jahreszahl ist, merken
	year = nil
	if c.istJahreszahl(frame) == "true" then
		year = title.text
    end
    date = dateParsing(args[1], year)
    
	return date .. ': ' .. args[2] .. 
		' t:' .. title.text .. ' a:' .. tostring(year) ..'<-'
end

function dateParsing(s, year)
	-- Parses a date down where s is the datestring and year can be nil or string
	
	ds = s
	return ds
end

return p