mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-07 01:50:31 +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) {
|
||||
return isAfter(now, afterDate) || now.getTime() === afterDate.getTime();
|
||||
return !isBefore(now, afterDate);
|
||||
}
|
||||
|
||||
if (beforeDate) {
|
||||
return isBefore(now, beforeDate) || now.getTime() === beforeDate.getTime();
|
||||
return !isAfter(now, beforeDate);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user