This commit is contained in:
tiago.kayaya
2022-01-28 15:59:01 +01:00
parent 5a214aebf4
commit 252bd24eee
7 changed files with 22 additions and 22 deletions
+2 -7
View File
@@ -15,7 +15,7 @@ export class SortService {
});
}
}
sortArrayByDate(myArray: any) {
console.log(myArray[0].taskStartDate);
if(myArray.length > 0){
@@ -26,13 +26,8 @@ export class SortService {
}
sortDate(array = [], path: string) {
return array.sort( (a,b)=> {
return new Date(this.ObjectService.deepFind(b, path)).getTime() -
new Date(this.ObjectService.deepFind(a, path)).getTime()
return new Date(this.ObjectService.deepFind(b, path)).getTime() - new Date(this.ObjectService.deepFind(a, path)).getTime()
})
}
}