fixing date parsing issue in Safari