Modul:Citation/utilities: Unterschied zwischen den Versionen

keine Bearbeitungszusammenfassung
KKeine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 133: Zeile 133:
return '[' .. 'https://doi.org/' .. mw.uri.encode( doi )
return '[' .. 'https://doi.org/' .. mw.uri.encode( doi )
.. ' ' .. doi .. ']'
.. ' ' .. doi .. ']'
end
function cu.getDate( aDate, aFormat, errorMsg )
local function formatDate( aDate, aFormat )
return mw.getContentLanguage():formatDate( aFormat, aDate, true )
end
if aDate ~='' then
local success, t;
success, t = pcall( formatDate, aDate, aFormat )
if success then
return t
else
cu.addErrorMsg( errorMsg )
return ''
end
else
return ''
end
end
end


return cu
return cu
Anonymer Benutzer