Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

find min and max date in array javascript

const dates = [];
dates.push(new Date('2011/06/25'));
dates.push(new Date('2011/06/26'));
dates.push(new Date('2011/06/27'));
dates.push(new Date('2011/06/28'));
const maxDate = new Date(Math.max.apply(null, dates));
const minDate = new Date(Math.min.apply(null, dates));
 
PREVIOUS NEXT
Tagged: #find #min #max #date #array #javascript
ADD COMMENT
Topic
Name
8+4 =