mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-07 18:09:47 +00:00
Update src/common/datetime/check_time.ts
Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
This commit is contained in:
@@ -99,11 +99,11 @@ export const checkTimeInRange = (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (afterDate) {
|
if (afterDate) {
|
||||||
return isAfter(now, afterDate) || now.getTime() === afterDate.getTime();
|
return !isBefore(now, afterDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (beforeDate) {
|
if (beforeDate) {
|
||||||
return isBefore(now, beforeDate) || now.getTime() === beforeDate.getTime();
|
return !isAfter(now, beforeDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user