I have a string field that is used to get different values. Some of the values โโobtained are dates. Now I need to check if the received value is a date or not? The received date may be in different formats again.
I tried Date.parse() , it works if the format is dd-mm-yyyy hh:mm , but I have several dates received as ( 26/05/2015 06:20:57 +00:00 ).
How to compare if a string is a valid date or not?
source share