Modul:DateTime: Unterschied zwischen den Versionen
updates
(update) |
(updates) |
||
Zeile 1: | Zeile 1: | ||
--[=[ 2014-02 | --[=[ 2014-03-02 | ||
Date and time utilities | Date and time utilities | ||
]=] | ]=] | ||
Zeile 12: | Zeile 12: | ||
local World = { slang = "en", | local World = { slang = "en", | ||
monthsLong = { }, | monthsLong = { }, | ||
monthsParse = { } } | monthsParse = { }, | ||
months4 = { } } | |||
local Nbsp = mw.ustring.char( 160 ) | local Nbsp = mw.ustring.char( 160 ) | ||
local Tab = mw.ustring.char( 9 ) | local Tab = mw.ustring.char( 9 ) | ||
Zeile 43: | Zeile 44: | ||
[ "Sep" ] = 9 | [ "Sep" ] = 9 | ||
} | } | ||
World.months4.en = { [ 6 ] = "Jun.", | |||
[ 7 ] = "Jul." } | |||
World.templates = { [ "ISO" ] = | World.templates = { [ "ISO" ] = | ||
{ spec = "Y-m-d", | { spec = "Y-m-d", | ||
Zeile 1.067: | Zeile 1.070: | ||
r = r:gsub( string.format( "%04d", self.year ), | r = r:gsub( string.format( "%04d", self.year ), | ||
tostring( self.year ) ) | tostring( self.year ) ) | ||
end | |||
if self.month and ask and ask:find( "Mon4" ) then | |||
local mon4 = World.months4[ slang ] | |||
if mon4 then | |||
mon4 = mon4[ self.month ] | |||
if mon4 then | |||
local mon = World.monthsLong[ slang ] | |||
r = r:gsub( mon4, mon[ self.month ] ) | |||
end | |||
end | |||
end | end | ||
if suffix then | if suffix then | ||
Zeile 1.118: | Zeile 1.131: | ||
end | end | ||
if template.lift then | if template.lift then | ||
local spec = "T. | local spec = "T._Monat JJJJ hh:mm:ss Zone" | ||
local stamp = false | local stamp = false | ||
local low = ( ask == "ISO" or ask == "ISO-T" ) | local low = ( ask == "ISO" or ask == "ISO-T" ) |