replace date.parse with thke moment.js date library so as to comparity with the server date calculations