I've startdate and enddate with a 7 week timerange. I'm trying to check for a condition when the range is greater than 7 days, i'd like to apply different timeFormat to it: Ex: Js:
startdate = "2015-07-04T00:00:00";
enddate = "2015-07-11T23:59:59"; //range 7 days
//pseudo code:
if (difference between (startdate & enddate) > 7){
//set timeFormat = "30days"
}else{
//set timeFormat = "7days"
}
any ideas on how to achieve this?? Thanks!