Dates string array is constructed from backend data object as below:
const dates: string[] = this.data.map((item:any) => item.date.jsdate);
The result is
dates = [
Thu Jan 12 2015 00:00:00 GMT+0530 (India Time),
Tue Feb 25 2015 00:00:00 GMT+0530 (India Time),
Sun Jan 28 2016 00:00:00 GMT+0530 (India Time)
]
typeof(dates) is "object"
How to find the get the latest date among the jsdates array?
Is it possible to apply max function of date-fns?