     # 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


        if histParams.from
          fromDate = histParams.from
#          fromDate = moment(histParams.from).format("DD-MM-YYYY")

        # When time-slider is used, hist_parameters.from is not supposed to be defined
        else if histParams.time_range

      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')
      }

