Commit 5c618419 authored by Ahmad Nemati's avatar Ahmad Nemati

git pu

parent fdfb9d9d
......@@ -63,6 +63,7 @@ async function run() {
function add(total,dates)
{
let found=false
dates = _.orderBy(dates)
for (let i=0;i<adder.length;i++)
if (adder[i].total === total)
{
......@@ -71,12 +72,13 @@ function add(total,dates)
adder[i].dates.push(dates[z])
adder[i].dates=_.uniq(adder[i].dates)
adder[i].countDay=adder[i].dates.length
}
if (found)
return
adder.push({total:total,dates:dates})
adder.push({total:total,dates:dates,countDay:dates.length})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment