aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/js
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2011-12-04 16:32:06 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2011-12-04 16:32:06 -0500
commitd1808f886236e02fa5de7bdfd3c956845eca7e8e (patch)
treea839986fce23c2a41291040eb9e1f6b74c6ab787 /lib/js
parentd46a56f2281e5f992484df00debe8b8f97097e31 (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/js')
-rw-r--r--lib/js/urweb.js4
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