I just try to check a string whether a date or not. This is my code in angular JS.
var mydt= "2015/07/29";
document.write(angular.isDate(mydt));
This always return false. But actually this is a date.
But when I try this code,
var cur_date = new Date();
document.write(cur_date);
document.write(angular.isDate(cur_date));
The executed result is,
Wed Jul 29 2015 15:15:13 GMT+0530 (Sri Lanka Standard Time) true
I'm wondering why we cannot check simple date format like "yyyy/mm/dd" in simple way.