Bürokraten, Oberflächenadministratoren, SMW-Administratoren, SMW-Kuratoren, SMW-Editoren, Oversighter, Administratoren, Widget-Bearbeiter
215.197
Bearbeitungen
Keine Bearbeitungszusammenfassung Markierung: Zurückgesetzt |
Keine Bearbeitungszusammenfassung Markierung: Manuelle Zurücksetzung |
||
| Zeile 22: | Zeile 22: | ||
local data_date = dateParsing(frame, args[1], year) | local data_date = dateParsing(frame, args[1], year) | ||
local all_data=merge_tables(data, data_date) | local all_data=merge_tables(data, data_date) | ||
return data_date["Startdatum"] .. ": " .. args[2] .. | return data_date["Startdatum"] .. ": " .. args[2] --tableToString(all_data) .. ': ' .. args[2] | ||
end | end | ||
function dateParsing(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 d= | local d=split(s, '-') | ||
local sd | local sd=human_to_form_date(d[0]) | ||
local data = { | local data = { | ||
["Startdatum"] = sd, | ["Startdatum"] = sd, | ||
["Startjahr"] = get_year(sd), | ["Startjahr"] = get_year(sd), | ||
["Starttag"] = get_monthday(sd), | ["Starttag"] = get_monthday(sd), | ||
} | } | ||
if | local ed=nil | ||
if #d > 0 then | |||
ed=human_to_form_date(d[1]) | ed=human_to_form_date(d[1]) | ||
data["Enddatum"] = ed | data["Enddatum"] = ed | ||
Bearbeitungen