Correction sur l'ajout de sauts sur 1 jour.

This commit is contained in:
Sébastien André
2021-06-29 18:10:47 +02:00
parent 28de998183
commit ba7a4fbdfb
5 changed files with 41 additions and 22 deletions

View File

@@ -11,10 +11,11 @@ export class DateService {
public AddDays(currentDate: Date, nbDays: number): Date {
const totalMilliSeconds = nbDays * this.milliSeconInDay;
const currentTime = currentDate.getTime();
const tmpDate = new Date(currentDate.getTime());
currentDate.setTime(currentTime + totalMilliSeconds);
tmpDate.setTime(currentTime + totalMilliSeconds);
return currentDate;
return tmpDate;
}
public DiffBetweenDates(beginDate: Date, endDate: Date): number {