Skip to content
Snippets Groups Projects
Commit e6992aa8 authored by Hugo SUBTIL's avatar Hugo SUBTIL
Browse files

New date handling for year

parent 7b477667
No related branches found
No related tags found
No related merge requests found
......@@ -219,10 +219,11 @@ function aggregating(data, doctype) {
const reducer = (accumulator, currentValue) => accumulator + currentValue.load
if (doctype === rangeDate.an.doctype) {
const year = moment().year()
// console.log(data)
var filtered = data.filter(function(el) {
return el.year == year
})
const time = moment()
const time = moment().startOf('year')
return [
{
load: filtered.reduce(reducer, 0),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment