[Solved] Compare dates as strings in typescript


You can convert it to a date and then compare them:

function convertDate(d)
{
	var parts = d.split("https://stackoverflow.com/");
	return new Date(parts[1], parts[0]);
}

var start = convertDate('05/2014');
var end = convertDate('05/2018');


alert(start < end);

2

solved Compare dates as strings in typescript