Hi all
I have a json format which has two objects Created_date and Reply_date. Created_date has a date on which a message is created and the Reply_date tells when the user has replied to that messge. So I am getting the Created_date as follows
var createDate = new Date(Created_date);
var newDate = createDate.getDate();
var month = createDate.getMonth();
var monthArray = new Array ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
var year = createDate.getFullYear();
var compareMonth = monthArray(month);
var displayDate = compareMonth+ " "+ newDate+" , "+ year;
alert(displayDate);
So this returns the created date. Now I would like to compare the created date and the reply date. If both the created date and reply date are the same for example if both the created date and reply date are Apr 07 2014, then I would like to print "today" else I would like to print that particular day on which it was replied. So how do I do this guys any ideas?