diff options
author | Adam Chlipala <adam@chlipala.net> | 2011-12-04 16:32:06 -0500 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2011-12-04 16:32:06 -0500 |
commit | b2d1c581afdb7ad9ede5d43158306c45177ef560 (patch) | |
tree | a839986fce23c2a41291040eb9e1f6b74c6ab787 /lib | |
parent | 30fa60cba0832e7530c8d29c056a6158b907e7f3 (diff) |
Fix client-side [int] parsing and extend server-side [time] parsing to support a format that also works portably in JavaScript
Diffstat (limited to 'lib')
-rw-r--r-- | lib/js/urweb.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js index 4fee886a..a3976fef 100644 --- a/lib/js/urweb.js +++ b/lib/js/urweb.js @@ -143,7 +143,7 @@ function addSeconds(tm, n) { function stringToTime_error(string) { var t = Date.parse(string); if (isNaN(t)) - onFail("Invalid date string: " + string); + er("Invalid date string: " + string); else return t * 1000; } @@ -962,7 +962,7 @@ function strlenGe(s, len) { function trimZeroes(s) { for (var i = 0; i < s.length; ++i) - if (s[i] != '0') { + if (s.charAt(i) != '0') { if (i > 0) return s.substring(i); else |