# Periods
@periods.reset [{label: t('none')}]
data.periods.forEach (p) =>
- d = new Date p[2]
- d.setHours 0, 0, 0, 0
- p = @periods.add key: p[0], label: p[1], sinceDate: d
+ d = moment p[2]
+ date = new Date d.get('year'), d.get('month'), d.get('date')
+ p = @periods.add key: p[0], label: p[1], sinceDate: date
requestMeasures: (key, period = null) ->
if period
p = predicate
predicate = (issue) =>
- (new Date(issue.creationDate) >= period.get('sinceDate')) && p issue
+ creationDate = new Date moment(issue.creationDate).format()
+ (creationDate >= period.get('sinceDate')) && p issue
if requestIssues && !@state.get 'hasIssues'
@requestIssues(@key).done => @_filterByIssues(predicate)