Ajout du graphique de temps cumulé sur l'année
ou les 12 derniers mois.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user