82.367
Bearbeitungen
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 | local d=split(s, '-') | ||
local sd=human_to_form_date(d[1]) | |||
local sd=human_to_form_date( | |||
local data = { | local data = { | ||
["Startdatum"] = sd, | ["Startdatum"] = sd, | ||
["Startjahr"] = get_year(sd), | ["Startjahr"] = get_year(sd), | ||
["Starttag"] = get_monthday(sd), | ["Starttag"] = get_monthday(sd), | ||
} | } | ||
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 | ||