version 1.0.5
This commit is contained in:
parent
f6a78b99fe
commit
57239561f7
|
@ -36,19 +36,17 @@ export class Scheduler {
|
||||||
let now = new Date()
|
let now = new Date()
|
||||||
|
|
||||||
// set the target time
|
// set the target time
|
||||||
let targetTime = (
|
const targetTime = start.timeOfDay
|
||||||
!start.timeOfDay
|
? new Date(
|
||||||
? start.date
|
now.getFullYear(),
|
||||||
: new Date(
|
now.getMonth(),
|
||||||
now.getFullYear(),
|
now.getDate(),
|
||||||
now.getMonth(),
|
start.timeOfDay.hour,
|
||||||
now.getDate(),
|
start.timeOfDay.minute ?? 0,
|
||||||
start.timeOfDay.hour,
|
start.timeOfDay.seconds ?? 0,
|
||||||
start.timeOfDay.minute ?? 0,
|
0
|
||||||
start.timeOfDay.seconds ?? 0,
|
)
|
||||||
0
|
: start.date ?? now
|
||||||
)
|
|
||||||
)!
|
|
||||||
|
|
||||||
// if the target time has already passed today, set it for tomorrow
|
// if the target time has already passed today, set it for tomorrow
|
||||||
if (start.timeOfDay && now > targetTime) {
|
if (start.timeOfDay && now > targetTime) {
|
||||||
|
|
Loading…
Reference in New Issue