how to compare two date strings in javascript