Modul:Chronik: Unterschied zwischen den Versionen

keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 27: Zeile 27:
function dateParsing(frame, s, year)
function dateParsing(frame, 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
local sds, eds=split(s, '-')
local d=split(s, '-')
local sd=human_to_form_date(d[1])
local sd=human_to_form_date(sds)
local ed=human_to_form_date(eds)
local data = {
local data = {
["Startdatum"] = sd,
["Startdatum"] = sd,
["Startjahr"] = get_year(sd),
["Startjahr"] = get_year(sd),
["Starttag"] = get_monthday(sd),
["Starttag"] = get_monthday(sd),
["Enddatum"] = ed,
["Endjahr"] = get_year(ed),
["Endtag"] = get_monthday(ed),
}
}
local ed=nil
if #d == 2 then
ed=human_to_form_date(d[2])
data["Enddatum"] = ed
data["Endjahr"] = get_year(ed)
data["Endtag"] = get_monthday(ed)
end
return data
return data
end
end


return p
return p
82.367

Bearbeitungen