Skip to content

Commit 7b41ef0

Browse files
authored
Merge pull request gpiozero#734 from RPi-Distro/lurch-patch-1
TimeOfDay docstring clarifications
2 parents d1e28a1 + f27ff9d commit 7b41ef0

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

gpiozero/internal_devices.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,8 @@ class TimeOfDay(InternalDevice):
343343
344344
pause()
345345
346-
Note that *start_time* and *end_time* may be reversed, indicating a time
347-
period which cross midnight.
346+
Note that *start_time* may be greater than *end_time*, indicating a time
347+
period which crosses midnight.
348348
349349
:param ~datetime.time start_time:
350350
The time from which the device will be considered active.
@@ -415,9 +415,10 @@ def value(self):
415415
"""
416416
Returns :data:`True` when the system clock reads between
417417
:attr:`start_time` and :attr:`end_time`, and :data:`False` otherwise.
418-
If :attr:`start_time` and :attr:`end_time` are reversed (indicating a
418+
If :attr:`start_time` is greater than :attr:`end_time` (indicating a
419419
period that crosses midnight), then this returns :data:`True` when the
420-
is greater than :attr:`start_time` or less than :attr:`end_time`.
420+
current time is greater than :attr:`start_time` or less than
421+
:attr:`end_time`.
421422
"""
422423
now = datetime.utcnow().time() if self.utc else datetime.now().time()
423424
if self.start_time < self.end_time:

0 commit comments

Comments
 (0)