Old code was invalid and did not work in IE or Firefox (wasn't ISO 8601 compliant). The new code works across browsers and returns an object instead of doing all the code in function ( a bit more extensible ). Old code saved in date.checker.old.invalid.js