Returns true if str is a date and time.
isDateTime(str, [format], [returnDateObj])
str |
string, string to format |
format |
string, optional, format to check |
returnDateObj |
boolean, optional, if true then returns JS Date object |
You can specify date and time format. The format can contain following
elements: mm, dd, yyyy, mon in any order with any formatting characters. For example 'mm.dd.yyyy', 'dd-mm-yyyy', 'mon dd, yyyy'.
If format is not specified, then the format will be taken from
w2utils.settings.dateFormat and w2utils.settings.timeFormat.
If the third argument format is true, then the method will return JavaScritp Date object is the date is valid