The later date
The earlier date
Optional
An object with options.
The number of seconds
differenceInSeconds
Get the number of seconds between the given dates.
// How many seconds are between// 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000?const result = differenceInSeconds( new Date(2014, 6, 2, 12, 30, 20, 0), new Date(2014, 6, 2, 12, 30, 7, 999))//=> 12 Copy
// How many seconds are between// 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000?const result = differenceInSeconds( new Date(2014, 6, 2, 12, 30, 20, 0), new Date(2014, 6, 2, 12, 30, 7, 999))//=> 12
The later date