Modul:DateTime: Unterschied zwischen den Versionen
2020-04-08 Special:Permalink/198707378#2_×_Systemnachricht,_2_×_BETA
Zeile 1: | Zeile 1: | ||
local DateTime = { serial = "2020- | local DateTime = { serial = "2020-04-08", | ||
suite = "DateTime", | suite = "DateTime", | ||
item = 20652535 } | item = 20652535 } | ||
Zeile 526: | Zeile 526: | ||
if amount <= 4 then | if amount <= 4 then | ||
r.year = tonumber( analyse ) | r.year = tonumber( analyse ) | ||
elseif | elseif amount == 14 then | ||
-- timestamp | -- timestamp | ||
r.year = tonumber( analyse:sub( 1, 4 ) ) | r.year = tonumber( analyse:sub( 1, 4 ) ) | ||
r.month = tonumber( analyse:sub( 5, | r.month = tonumber( analyse:sub( 5, 6 ) ) | ||
r.dom = tonumber( analyse:sub( 7, | r.dom = tonumber( analyse:sub( 7, 8 ) ) | ||
r.hour = tonumber( analyse:sub( 9, | r.hour = tonumber( analyse:sub( 9, 10 ) ) | ||
r.min = tonumber( analyse:sub( 11, | r.min = tonumber( analyse:sub( 11, 12 ) ) | ||
r.sec = tonumber( analyse:sub( 13, | r.sec = tonumber( analyse:sub( 13, 14 ) ) | ||
else | else | ||
r = false | r = false | ||
Zeile 1.849: | Zeile 1.849: | ||
end | end | ||
if self.hour then | if self.hour then | ||
stamp = string.format( "%s %02d:", stamp, self.hour ) | if stamp then | ||
stamp = stamp .. " " | |||
else | |||
stamp = "" | |||
end | |||
stamp = string.format( "%s%02d:", stamp, self.hour ) | |||
if self.min then | if self.min then | ||
stamp = string.format( "%s%02d", stamp, self.min ) | stamp = string.format( "%s%02d", stamp, self.min ) |