Fixed the JavaScript date format for good? I hope?

Fixes #2008 again.