           word = _self.getPeriodWord(period)
           if period == "w"
             fromDate = moment().subtract(n, word).startOf('isoweek').format('YYYY-MM-DD')
-#            fromDate = moment().subtract(n, word).startOf('isoweek').format('DD-MM-YYYY')
           else
             fromDate = moment().subtract(n, word).startOf(word).format('YYYY-MM-DD')
-#            fromDate = moment().subtract(n, word).startOf(word).format('DD-MM-YYYY')
 
       resultHash = {
         from: fromDate

    # Get default year-to-date hist parameters
    @yearDates = ()->
      from: moment().startOf('year').format('YYYY-MM-DD')
#      from: moment().startOf('year').format('DD-MM-YYYY')
      to: moment().format('YYYY-MM-DD')

    # Parse a Rails model error and return an array of messages

      startYear = moment().year() if moment().month() >= fYearEndMonth

      start = moment("#{startYear}-#{fYearEndMonth + 1}-01", 'YYYY-MM-DD')
      end = angular.copy(start).add(1, 'year').subtract(1, 'day')

      resultHash = {
        start: start.format('YYYY-MM-DD')
        end: end.format('YYYY-MM-DD')
      }

