import { timestampToHuman } from './timestamp' ; export function diff ( start , end ) { const dates = [ ] ; let currentDate = start ; const addDays = ( days ) => { const date = new Date ( ) ; date . setDate ( date . getDate ( ) + days ) ; return date . getTime ( ) ; } ; while ( currentDate <= end ) { dates . push ( timestampToHuman ( currentDate ) ) ; currentDate = addDays . call ( currentDate , 1 ) ; } return dates ; }