Class reference
Reference for returned classes from some functions. These are not intended to be created by the user.
Watches
ItemNoUpdateWatch
ItemNoChangeWatch
InstantView
- class InstantView(instant)
- classmethod now()
Create a new instance with the current time
- Return type:
- add(*, hours=0, minutes=0, seconds=0, milliseconds=0, microseconds=0, nanoseconds=0)
Add time delta
- Return type:
Self- Returns:
New instance
- delta_now(now=None)
Return the delta between now and the instant. The delta will be positive, e.g. if the InstantView is from 5 seconds ago this will return a timedelta with 5 seconds.
- Parameters:
now (
InstantView|Instant|None) – optional instant to compare to instead of now, must be newer than the instant of the instant view- Return type:
- newer_than(obj=None, **kwargs)
Check if the instant is newer than the given value
- older_than(obj=None, **kwargs)
Check if the instant is older than the given value
- py_timedelta(now=None)
Return the timedelta between the instant and now
- Parameters:
now (
InstantView|Instant|None) – optional instant to compare to- Return type:
- subtract(*, hours=0, minutes=0, seconds=0, milliseconds=0, microseconds=0, nanoseconds=0)
Subtract time delta from current instant
- Return type:
Self- Returns:
New instance