One way to compare client-side would be to make a date object from each
valid string, get the month/year and compare, similar to this:
var date1 = new Date('Fri Aug 1 18:52:21 UTC+0530 2014');
var date2 = new Date('2014-08-12T13:09:00');
var date1Short = date1.getMonth() + 1 + '/' + date1.getFullYear();
var date2Short = date2.getMonth() + 1 + '/' + date2.getFullYear();
if(date1Short === date2Short){
} else {
}
DEMO - Comparing month and year values
Alternative Formatting
var date1Short = date1.getMonth() + '' + date1.getFullYear();
var date2Short = date2.getMonth() + '' + date2.getFullYear();
If you need to compare server side, use the same getMonth()/getFullYear()... methods to pass the values to the server.