We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents bc3b6ed + 8820a6a commit deceef3Copy full SHA for deceef3
1 file changed
src/validate.js
@@ -363,9 +363,16 @@ function F_VALIDATE(disabledHL) {
363
this.$toDate = (timeFrame.getEndDate() || "");
364
/** @type {string} */
365
this.$toTime = (timeFrame.getToTime() || "");
366
+
367
+ /*
368
+ * To avoid any issues with time zones, report expired
369
+ * restrictions 1-2 days after.
370
+ */
371
+ var past = new Date();
372
+ past.setDate(past.getDate() - 2); /* 2..days().ago() */
373
/** @type {boolean} */
- this.$isInThePast = new Date(this.$toDate +
- " " + this.$toTime) < new Date();
374
+ this.$isInThePast = new Date(this.$toDate + " " +
375
+ this.$toTime) < past;
376
377
Object.defineProperties(this, {
378
_to: { enumerable: false },
0 commit comments