core/utils/helpers/dateFormat.js
function(date, dateTo, mask) {

        if ( dateTo instanceof Date) {
            var count       = countDaysTo(date, dateTo)
                , month     = date.getMonth()
                , year      = date.getFullYear()
                , day       = date.getDate() + 1
                , dateObj   = new Date(year, month, day)
                , days      = []
                , i         = 0;

            for (; i < count; ++i) {
                if ( typeof(mask) != 'undefined' ) {
                    days.push(new Date(dateObj).format(mask));
                } else {
                    days.push(new Date(dateObj));
                }

                dateObj.setDate(dateObj.getDate() + 1);
            }

            return days || [];
        } else {
            throw new Error('dateTo is not instance of Date() !')
        }
    }
function(date, dateTo, mask) {

        if ( dateTo instanceof Date) {
            var count       = countDaysTo(date, dateTo)
                , month     = date.getMonth()
                , year      = date.getFullYear()
                , day       = date.getDate() + 1
                , dateObj   = new Date(year, month, day)
                , days      = []
                , i         = 0;

            for (; i < count; ++i) {
                if ( typeof(mask) != 'undefined' ) {
                    days.push(new Date(dateObj).format(mask));
                } else {
                    days.push(new Date(dateObj));
                }

                dateObj.setDate(dateObj.getDate() + 1);
            }

            return days || [];
        } else {
            throw new Error('dateTo is not instance of Date() !')
        }
    }
function ( date , dateTo , mask ) { if ( dateTo instanceof Date ) { var count = countDaysTo ( date , dateTo ) , month = date . getMonth ( ) , year = date . getFullYear ( ) , day = date . getDate ( ) + 1 , dateObj = new Date ( year , month , day ) , days = [ ] , i = 0 ; for ( ; i < count ; ++ i ) { if ( typeof ( mask ) != 'undefined' ) { days . push ( new Date ( dateObj ) . format ( mask ) ) ; } else { days . push ( new Date ( dateObj ) ) ; } dateObj . setDate ( dateObj . getDate ( ) + 1 ) ; } return days || [ ] ; } else { throw new Error ( 'dateTo is not instance of Date() !' ) } }
Will give an array of dates between the current date to a targeted date

TODO - add a closure to `ignoreWeekend()` based on Utils::Validator
TODO - add a closure to `ignoreFromList(array)` based on Utils::Validator

@param {object} dateTo
@param {string} [ mask ]

@return {array} dates
Will give an array of dates between the current date to a targeted date