Ajout du graphique de temps cumulé sur l'année

ou les 12 derniers mois.
This commit is contained in:
Sébastien ANDRE
2023-08-11 17:24:36 +02:00
parent a27e4127dd
commit f600d34963
3 changed files with 53 additions and 24 deletions

View File

@@ -2,22 +2,10 @@ import { Injectable } from '@angular/core';
@Injectable()
export class DateService {
private milliSeconInDay: number;
constructor() {
this.milliSeconInDay = 1000 * 60 * 60 * 24;
}
public addDays(currentDate: Date, nbDays: number): Date {
const tmpDate = new Date(currentDate.getTime());
tmpDate.setDate(tmpDate.getDate() + nbDays);
// const totalMilliSeconds = nbDays * this.milliSeconInDay;
// const currentTime = currentDate.getTime();
// const tmpDate = new Date(currentDate.getTime());
// tmpDate.setTime(currentTime + totalMilliSeconds);
return tmpDate;
}