title: Is it possible to make a date validation in javascript?
body: <p>I have to check if two dates differ more than two days. As an example, 01/14/2014 and 01/15/2014 would fit the criteria because there's only one day of difference, but 01/14/2014 and 01/18/2014 would not as the latter has 4 days of difference. The dates are in string format so I've tried all sorts of data casting but couldn't succeed. So to sum up, i want to know if it is possible to create an if statement that subtract the value of two dates that are in string format and give a error if the value is bigger than 'n'. Thanks!</p>