fixed bad patterns for 5.2

updated rockspec for 2.1 release
This commit is contained in:
Thijs Schreijer
2013-09-16 22:05:29 +02:00
parent 3fa19a191f
commit 097dad2152
2 changed files with 5 additions and 5 deletions

View File

@@ -2,9 +2,9 @@ package = "date"
version = "2.1.0-1"
description = {
summary = "Date & Time module for Lua 5.x",
summary = "Date & Time module for Lua 5.1/5.2",
detailed = [[
Pure Lua Date & Time module for Lua 5.x featuring date and Time string
Pure Lua Date & Time module for Lua 5.1/5.2 featuring date and Time string
parsing, time addition & subtraction, time span calculation, support for
ISO 8601 Dates, local time support, strftime-like formatting.
]],
@@ -17,7 +17,7 @@ dependencies = {
}
source = {
url = "https://github.com/Tieske/uuid/archive/version_2.1.tar.gz",
url = "https://github.com/Tieske/date/archive/version_2.1.tar.gz",
dir = "date-version_2.1",
}

View File

@@ -335,14 +335,14 @@
repeat -- print(sw:aimchr())
if sw("^[tT:]?%s*(%d%d?):",seth) then --print("$Time")
_ = sw("^%s*(%d%d?)",setr) and sw("^%s*:%s*(%d%d?)",sets) and sw("^(%.%d+)",adds)
elseif sw("^(%d+)[/\%s,-]?%s*") then --print("$Digits")
elseif sw("^(%d+)[/\\%s,-]?%s*") then --print("$Digits")
x, c = tonumber(sw[1]), len(sw[1])
if (x >= 70) or (m and d and (not y)) or (c > 3) then
sety( x + ((x >= 100 or c>3)and 0 or 1900) )
else
if m then setd(x) else m = x end
end
elseif sw("^(%a+)[/\%s,-]?%s*") then --print("$Words")
elseif sw("^(%a+)[/\\%s,-]?%s*") then --print("$Words")
x = sw[1]
if inlist(x, sl_months, 2, sw) then
if m and (not d) and (not y) then d, m = m, false end