The Dates string array is created using data from the backend object in the following manner:
const dates: string[] = this.data.map((item:any) => item.date.jsdate);
Here is the resulting array:
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)
]
The type of dates is "object"
What is the best way to find the latest date in the jsdates array?
Can the max function from date-fns library be used for this purpose?