the one that worked for me is
createdDate = createdDate.replace(/-/g, '/').split(".")[0];
endDate = endDate.replace(/-/g, '/').split(".")[0];
i needed to compare two dates but for that i needed to parse them into date but since internet explorer doesn't support the format
2018-09-28 05:10:00+00
so i replaced the '-' with '/' and split the millisecond part using .split and then
it easily got parsed using
Date.parse(createdDate);
Date.parse(endDate);
then i compared them if deadline comes before the create date, it worked perfectly!