82.367
Bearbeitungen
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
| Zeile 1: | Zeile 1: | ||
local p = {} | local p = {} | ||
local c = require( "Module:Common" ) | local c = require( "Module:Common" ) | ||
local str = require("Modul:String") | |||
function p.LinkFormDate(frame) | function p.LinkFormDate(frame) | ||
| Zeile 15: | Zeile 16: | ||
months=getMonthList() | months=getMonthList() | ||
date_array=split(date, "/") | date_array=str.split(date, "/") | ||
mw.smw.set({[attr_date] = date}) | mw.smw.set({[attr_date] = date}) | ||
if isEmpty(date_array[1]) then | if isEmpty(date_array[1]) then | ||
| Zeile 24: | Zeile 25: | ||
else | else | ||
-- Dateformat is <monthname> YYYY | -- Dateformat is <monthname> YYYY | ||
mda = split(date_array[0]) | mda = str.split(date_array[0]) | ||
return mda[0] .. " [[" .. attr_year .. "::" .. mda[1] .. "]]" | return mda[0] .. " [[" .. attr_year .. "::" .. mda[1] .. "]]" | ||
end | end | ||
| Zeile 48: | Zeile 49: | ||
function format_date(date) | function format_date(date) | ||
date_array=split(date, " ") | date_array=str.split(date, " ") | ||
if isEmpty(date_array[1]) then | if isEmpty(date_array[1]) then | ||
-- When datestring contained no " ", thus is year | -- When datestring contained no " ", thus is year | ||
| Zeile 72: | Zeile 73: | ||
function human_to_form_date(date) | function human_to_form_date(date) | ||
date_array=split(date, " ") | date_array=str.split(date, " ") | ||
if isEmpty(date_array[1]) then | if isEmpty(date_array[1]) then | ||
-- When datestring contained no " ", thus is year | -- When datestring contained no " ", thus is year | ||