How can I check if date is in given format or not. It must be function like this
function isInGivenFormat(date,format)
{
//some checking
}
For example, isInGivenFormat("12:45:02","hh:mm:ss") must return true and isInGivenFormat("12:45:02 PM","hh:mm:ss") must return false.
How can I achive this functionality with Javascript/Jquery?
You can use the Date.parseExact() function of the date.js library