Fix: ajout d'heure ajoute des minutes

Lors du passage à Lyre, on ajoutait 6 minutes
This commit is contained in:
2023-01-08 23:20:54 +01:00
parent 9eaeceafc4
commit 404539a004
2 changed files with 7 additions and 3 deletions

View File

@ -285,8 +285,12 @@ export class RdDCalendrier extends Application {
}
/* -------------------------------------------- */
async positionnerHeure(indexHeure) {
await this.setNewTimestamp(new RdDTimestamp({ indexDate: this.timestamp.indexDate + (this.timestamp.heure < indexHeure ? 0 : 1) }).addHeures(indexHeure))
async positionnerHeure(heure) {
const indexDate = this.timestamp.indexDate;
const addDay = this.timestamp.heure < heure ? 0 : 1;
await this.setNewTimestamp(new RdDTimestamp({
indexDate: indexDate + addDay, indexHeure: 0 })
.addHeures(heure))
}
/* -------------------------------------------- */