Fixed offset in date.parse to handle basic as well as extended format