I have an array of dates $myArray
(2012-09-31,1999-01-23,2018-08-29,1808-04-20,2017-11-05,1001-10-01,)
I want to list these dates in most current to oldest, i am using a function
function myFunction() {
myArray.sort(function(a, b){return b-a});
}
The above function does not seem to order the array in any particular way.