I use angularjs in project.
I get array of objects from the server. Each object contains few properties and one of them is date property.
Here is the Array
var dates = []; dates.push(new Date("2019/06/25")); dates.push(new Date("2019/06/26")); dates.push(new Date("2019/06/27")); dates.push(new Date("2019/06/28")); function GFG_Fun() { var maximumDate=new Date(Math.max.apply(null, dates)); var minimumDate=new Date(Math.min.apply(null, dates)); }