Tag Archives: parse
Date from ISO 8601 string
Javascript is full of surprises and browser compatibility is even more exciting. For some reason, I thought all browsers or Javascript engines had support for creating dates from ISO 8601 strings. Like this: var myDate = new Date("2010-09-21T02:57:00Z"); console.log(myDate); // Mon Sep 20 2010 19:57:00 GMT-0700 (Pacific Daylight Time) Turns out that does not work [...]
Equivalent of parseInt() in Freemarker
Programming languages have methods to cast integers to strings and strings to integers, but usually is had to find equivalents to parseInt(), a Javascript function that basically removes all non-numeric characters from a string and returns the resulting integer. Today, while working on a Freemarker template, I had to convert strings like “40 ms.” and [...]
More updates to Mooml coming soon
I’ve been very busy lately, both with spaniards.es and at work. Too much stuff to do. Nevertheless, I’ve been working lately on a version of Mooml that does not rely on with/eval. The problem of using eval (which has bad reputation but is used every time we parse JSON -unless you use this- or load [...]
