I have an application that works in several "cultures". I will be using many date formats.
I have a string with my format (i.e. 'd/m/y', but keep in mind this is variable) and 2 text inputs with dates in that given format.
I need to compare the dates in input box 1 to input box 2. I had a method that did this fine, until we added the international formatting.
new Date(endDate) >= new Date(startDate)
This used to work with U.S. only dates. It does not now. Is there a method I can use that works like this?:
new Date(endDate, 'd/m/y')