TimeUtilities

Utility class containing a set of time related functions.

aaa_modules.time_utilities.isDinnerTime()[source]
Return type:bool
aaa_modules.time_utilities.isInTimeRange(timeRangesString, epochSeconds=None)[source]

Determines if the current time is in the timeRange string.

Parameters:
  • timeRangesString (str) – one or multiple time range in 24-hour format. Example: ‘10-12’, or ‘6-9, 7-7, 8:30 - 14:45’, or ‘19 - 8’ (wrap around)
  • epochSeconds (int) – seconds since epoch, optional
Return type:

boolean

Raise:

ValueError if the time range string is invalid

aaa_modules.time_utilities.isKidsSleepTime(epochSeconds=None)[source]
Parameters:epochSeconds (int) – seconds since epoch, optional
Returns:true if it is kids’ nap or sleep time.
aaa_modules.time_utilities.stringToTimeRangeLists(timeRangesString)[source]

Return a list of time ranges. Each list item is itself a list of 4 elements: startTime, startMinute, endTime, endMinute.

Return type:list
Raise:ValueError if the time range string is invalid