export const compareObjectsByDate = ( a , b ) => compareDateStrings ( a . date , b . date ) ; const compareDateStrings = ( a , b ) => compareDates ( new Date ( a ) , new Date ( b ) ) ; const compareDates = ( a , b ) => a . getTime ( ) - b . getTime ( ) ;