Skip to content

Commit 09962d8

Browse files
committed
Bug in the reminder fixed:
The reminder was entered one day too early.
1 parent f8a7806 commit 09962d8

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

docs/bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ <h2>1. Erinnerung einstellen</h2>
6161
<label for="reminder-days-select">Tage vor Abfuhr erinnern:</label>
6262
<select id="reminder-days-select">
6363
<!-- Options for days -->
64-
<option value="0">Am Tag selbst</option>
6564
<option value="1" selected>1 Tag</option>
6665
<option value="2">2 Tage</option>
6766
<option value="3">3 Tage</option>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "abfallalarm",
33
"displayName": "AbfallAlarm",
4-
"version": "0.1.2",
4+
"version": "0.1.3",
55
"description": "AbfallAlarm ist eine intuitive und benutzerfreundliche WebApp, die darauf abzielt, das Leben der Bürger von Arnsberg zu vereinfachen, indem sie eine zuverlässige Erinnerungsfunktion für den städtischen Abfallkalender bietet.",
66
"main": "index.js",
77
"scripts": {

public/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ <h2>1. Erinnerung einstellen</h2>
6161
<label for="reminder-days-select">Tage vor Abfuhr erinnern:</label>
6262
<select id="reminder-days-select">
6363
<!-- Options for days -->
64-
<option value="0">Am Tag selbst</option>
6564
<option value="1" selected>1 Tag</option>
6665
<option value="2">2 Tage</option>
6766
<option value="3">3 Tage</option>

src/IcsModifier.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ export default class IcsModifier {
5151
const hoursUntilMidnight = this.reminderHours === 0 ? 0 : 24 - this.reminderHours;
5252

5353
// Use reminderDays directly as daysPart
54-
const daysPart = this.reminderDays;
54+
let daysPart = this.reminderDays;
55+
// daysPart is 1 set to 0
56+
if (daysPart === 1) {
57+
daysPart = 0;
58+
}
5559

5660
// Create the trigger string
5761
const trigger = `-P${daysPart}DT${hoursUntilMidnight}H0M0S`;

0 commit comments

Comments
 (0)