From d1808f886236e02fa5de7bdfd3c956845eca7e8e Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sun, 4 Dec 2011 16:32:06 -0500 Subject: Fix client-side [int] parsing and extend server-side [time] parsing to support a format that also works portably in JavaScript --- lib/js/urweb.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/js') 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 -- cgit v1.2.3