Modul:DateTime: Unterschied zwischen den Versionen

426 Bytes hinzugefügt ,  26. Februar 2014
update
(update)
(update)
Zeile 1: Zeile 1:
--[=[ 2014-02-24
--[=[ 2014-02-26
Date and time utilities
Date and time utilities
]=]
]=]
Zeile 347: Zeile 347:
         -- 23 Dec 2013
         -- 23 Dec 2013
         s, sx = mw.ustring.match( analyse,
         s, sx = mw.ustring.match( analyse,
                                   "^([%a&;]+%.?) (.*)$" )
                                   "^([%a&;]+%.?) ?(.*)$" )
         if s then
         if s then
             local n = Parser.monthNumber( s )
             local n = Parser.monthNumber( s )
Zeile 511: Zeile 511:
                     if #s == 2 then
                     if #s == 2 then
                         r.min = tonumber( s )
                         r.min = tonumber( s )
                         if sx == "" then              
                         if sx == "" then
                             sx = false
                             sx = false
                         end
                         end
Zeile 607: Zeile 607:
     --    analyse  -- string, starting with year
     --    analyse  -- string, starting with year
     --    assign  -- table
     --    assign  -- table
    --    allow    -- true, if less than 4 digits permitted
     -- Returns:
     -- Returns:
     --    table, extended if parsed
     --    table, extended if parsed
Zeile 623: Zeile 624:
             if s then
             if s then
                 sx = analyse:sub( 5 )
                 sx = analyse:sub( 5 )
            else
                local suffix
                s, sx, suffix = analyse:match( "^(%d+)([ ,]?)(.*)$" )
                if s then
                    local j = #sx
                    n = #s
                    if n < 4  and  ( j == 1 or #suffix == 0 ) then
                        sx = analyse:sub( n + j )
                    else
                        s = false
                    end
                end
             end
             end
         end
         end
Zeile 695: Zeile 708:
             if rO.zone then
             if rO.zone then
                 rS = s
                 rS = s
            else
                rO = false
             end
             end
         end
         end
Anonymer Benutzer