Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

sort array by date moment

let sortedDates = dates.sort(function(a, b){
  return moment(b).format('X')-moment(a).format('X')
});
 
PREVIOUS NEXT
Tagged: #sort #array #date #moment
ADD COMMENT
Topic
Name
4+5 =