interface DateTimeObj { time : Date ; } export function dateTimeComparator ( a , b ) { if ( a . time < b . time ) { return - 1 ; } if ( a . time > b . time ) { return 1 ; } return 0 ; } export function dateTimeComparatorReverse ( a , b ) { if ( a . time < b . time ) { return 1 ; } if ( a . time > b . time ) { return - 1 ; } return 0 ; }