fixed the javascript date parsing so it should work in all browsers