Bürokraten, Oberflächenadministratoren, SMW-Administratoren, SMW-Kuratoren, SMW-Editoren, Oversighter, Administratoren, Widget-Bearbeiter
215.197
Bearbeitungen
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
| Zeile 2: | Zeile 2: | ||
local c = require( "Module:Common" ) | local c = require( "Module:Common" ) | ||
function p.LinkFormDate( frame ) | function p.LinkFormDate(frame) | ||
pf = frame:getParent() | pf = frame:getParent() | ||
args = pf.args | args = pf.args | ||
| Zeile 38: | Zeile 38: | ||
end | end | ||
function p.FormatDate( frame ) | function p.FormatDate(frame) | ||
pf = frame:getParent() | pf = frame:getParent() | ||
args = pf.args | args = pf.args | ||
| Zeile 57: | Zeile 57: | ||
end | end | ||
function p.HumanToFormDate (frame) | function p.HumanToFormDate(frame) | ||
-- Converts a human date (3. Februar 1955) to 1955/02/03, like SMW needs | -- Converts a human date (3. Februar 1955) to 1955/02/03, like SMW needs | ||
pf = frame:getParent() | pf = frame:getParent() | ||
| Zeile 66: | Zeile 66: | ||
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 | ||
return date_array[0] | return date_array[0] | ||
elseif isEmpty(date_array[2]) then | elseif isEmpty(date_array[2]) then | ||
-- When datestring contains monthname and year | -- When datestring contains monthname and year | ||
return date_array[0].." "..date_array[1] | return date_array[0].." "..date_array[1] | ||
else | else | ||
| Zeile 77: | Zeile 75: | ||
mnr = getMonthnr(date_array[1]) | mnr = getMonthnr(date_array[1]) | ||
mnr = string.format("%02d", mnr) | mnr = string.format("%02d", mnr) | ||
return date_array[2].."/"..mnr.."/"..day | |||
end | end | ||
end | end | ||
return p | return p | ||
Bearbeitungen