Modul:Chronik: Unterschied zwischen den Versionen

keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 36: Zeile 36:
-- Ist eine Zeitspanne wie "3. bis 5. Mai" angegeben, kopiere Monat aus Enddatum  
-- Ist eine Zeitspanne wie "3. bis 5. Mai" angegeben, kopiere Monat aus Enddatum  
local sds = checkYear(dates[0], year)
local sds = checkYear(dates[1], year)
local sd=human_to_form_date(dates[0])
local sd = human_to_form_date(dates[1])
local data = {
local data = {
-- Erstmal das Startdatum schreiben
-- Erstmal das Startdatum schreiben
["SDstring"] = dates[0],
["SDstring"] = dates[1],
["Startdatum"] = sd,
["Startdatum"] = sd,
["Startjahr"] = get_year(sd),
["Startjahr"] = get_year(sd),
["Starttag"] = get_monthday(sd),
["Starttag"] = get_monthday(sd),
["length"] = len(dates),
["length"] = c.len(dates),
["year"] = year,
["year"] = year,
}
}
local ed=nil
local ed
if len(dates) >= 2 then
if c.len(dates) >= 2 then
-- War eine Zeitspanne angegeben gibt es ein Endatum
-- War eine Zeitspanne angegeben gibt es ein Endatum
ed=human_to_form_date(dates[1])
ed=human_to_form_date(dates[2])
data["EDstring"] = dates[1]
data["EDstring"] = dates[2]
data["Enddatum"] = ed
data["Enddatum"] = ed
data["Endjahr"] = get_year(ed)
data["Endjahr"] = get_year(ed)
data["Endtag"] = get_monthday(ed)
data["Endtag"] = get_monthday(ed)
end
end
if len(dates) >= 3 then
if c.len(dates) >= 3 then
data["3 is"] = dates[2]
data["3 is"] = dates[3]
end
end
return data
return data
82.367

Bearbeitungen