Modul:DateTime: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(2020-01-01, https://de.wikipedia.org/w/index.php?title=Wikipedia:Administratoren/Anfragen&curid=6974524&diff=198261848&oldid=198260830) |
|||
Zeile 1: | Zeile 1: | ||
local DateTime = { serial = "2020- | local DateTime = { serial = "2020-03-01", | ||
suite = "DateTime", | suite = "DateTime", | ||
item = 20652535 } | item = 20652535 } | ||
Zeile 1.364: | Zeile 1.364: | ||
"local", | "local", | ||
DateTime.item ) | DateTime.item ) | ||
if d then | if type( d ) == "table" then | ||
local wk | local wk | ||
if d.slang then | if d.slang then | ||
Zeile 1.812: | Zeile 1.812: | ||
local r = false | local r = false | ||
if type( self ) == "table" then | if type( self ) == "table" then | ||
local opts = { lang = | local slang = self.lang or "en" | ||
local babel | local opts = { lang = slang } | ||
local babel | |||
if type( adapt ) == "table" then | if type( adapt ) == "table" then | ||
if type( adapt.lang ) == "string" then | if type( adapt.lang ) == "string" then | ||
Zeile 1.827: | Zeile 1.828: | ||
opts.lonely = adapt.lonely | opts.lonely = adapt.lonely | ||
end | end | ||
babel = mw.language.new( opts.lang ) | babel = mw.language.new( opts.lang:lower() ) | ||
if babel then | if babel then | ||
local shift, show, stamp, suffix, limit4, locally | local shift, show, stamp, suffix, limit4, locally | ||
Zeile 1.839: | Zeile 1.840: | ||
end | end | ||
if ask and ask:find( "Mon4", 1, true ) then | if ask and ask:find( "Mon4", 1, true ) then | ||
local mon4 = World.months4[ opts.lang ] | local mon4 = World.months4[ opts.lang:lower() ] | ||
if mon4 and mon4[ self.month ] then | if mon4 and mon4[ self.month ] then | ||
limit4 = true | limit4 = true | ||
Zeile 1.895: | Zeile 1.896: | ||
bucket = World[ suite ] | bucket = World[ suite ] | ||
if bucket then | if bucket then | ||
m = bucket[ opts.lang ] | m = bucket[ opts.lang:lower() ] | ||
if slang then | if slang then | ||
x = bucket[ slang ] | x = bucket[ slang:lower() ] | ||
end | end | ||
if m then | if m then | ||
Zeile 2.110: | Zeile 2.111: | ||
r1 = "c" | r1 = "c" | ||
elseif ask == "*" then | elseif ask == "*" then | ||
if World. | if World.present then | ||
r1 = World. | if assigned.hour then | ||
if assigned.dom or assigned.month or assigned.year then | |||
r1 = | if World.present.both and | ||
World.present.date and | |||
World.present.time then | |||
r1 = World.present.both | |||
:gsub( "$date", World.present.date ) | |||
:gsub( "$time", World.present.time ) | |||
else | |||
r1 = World.present.date | |||
end | |||
end | |||
r1 = r1 or World.present.time | |||
else | |||
r1 = World.present.date | |||
end | |||
end | end | ||
r1 = r1 or "c" | |||
else | else | ||
local template = World.templates[ ask ] | local template = World.templates[ ask ] | ||
Zeile 2.123: | Zeile 2.138: | ||
if tmp then | if tmp then | ||
template = tmp[ ask ] | template = tmp[ ask ] | ||
end | |||
if not template then | |||
local i = slang:find( "-", 3, true ) | |||
if i then | |||
slang = slang:sub( 1, i - 1 ):lower() | |||
tmp = World.templates[ slang ] | |||
if tmp then | |||
template = tmp[ ask ] | |||
end | |||
end | |||
end | end | ||
end | end | ||
Zeile 2.144: | Zeile 2.169: | ||
end | end | ||
if template.lift and | if template.lift and | ||
(assigned.dom or | ( assigned.dom or | ||
not ( assigned.month or assigned.year or assigned.bc ) | |||
) then | ) then | ||
local stamp = false | local stamp = false |