diff options
-rw-r--r-- | posixtz.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/posixtz.lua b/posixtz.lua index 74d5d98..ae84275 100644 --- a/posixtz.lua +++ b/posixtz.lua @@ -3,7 +3,7 @@ -- Copyright (C) 2011 H. Andrew Latchman <aldevel@jamailca.com> -- -- Performs some validation of TZ string --- based on fields to determine offset and dst settings +-- based on fields needed to determine offset and dst settings -- -- See http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html -- TZ variable, with no leading colon @@ -14,10 +14,10 @@ -- Import Section -- declare everything this module needs from outside local error = error -local string = string local tonumber = tonumber local pairs = pairs local ipairs = ipairs +local string = require('string') local core = require('posixtz.core') -- Rest of the code is part of module "posixtz" @@ -137,7 +137,7 @@ function parse ( str ) local remaindays = tonumber(dayofyear) for i, n in ipairs(monkey) do if remaindays > n then - -- Jnday is not in this month + -- dayofyear is not in this month remaindays = remaindays - n else month = i @@ -160,7 +160,7 @@ function parse ( str ) -- n format (zero-based Julian day, [0 <= n <= 364/5], counting Feb 29) t.nday = string.match(spec, '^(%d+)') if t.nday then - + -- TODO: determine if the desired year is a leap year monkey[2] = 29 whichmonth(t.nday + 1) |