Convert your date representation to Javascript Date object instances and perform validation using those. Subtract the two date instances to get the delta amount of milliseconds between the two.