Time
datethyme.Time
Bases: OptionalTime
, BaseModel
Methods:
-
__and__
– -
__pow__
– -
validate_time
– -
serialize_date
– -
__str__
– -
__repr__
– -
__bool__
– -
__add__
– -
__sub__
– -
__eq__
– -
__lt__
– -
__gt__
– -
__le__
– -
__ge__
– -
__hash__
– -
parse
– -
if_valid
–Parse a string and return an instance of Time if possible; otherwise None.
-
now
– -
from_minutes
– -
none
– -
to_minutes
– -
to_seconds
– -
minutes_to
– -
minutes_from
– -
add_hours_wraparound
– -
add_minutes_wraparound
– -
add_seconds_wraparound
– -
add_hours
– -
add_minutes
– -
add_seconds
–
Attributes:
-
model_config
– -
hour
(int
) – -
minute
(int
) – -
second
(float
) –
model_config = ConfigDict(frozen=True)
class-attribute
instance-attribute
hour: int
instance-attribute
minute: int = Field(default=0)
class-attribute
instance-attribute
second: float = Field(default=0.0)
class-attribute
instance-attribute
__and__(date: Date) -> DateTime
__pow__(other: Time) -> TimeSpan
validate_time(raw_time: str | dict | list | tuple) -> dict[str, str | int | float]
classmethod
serialize_date() -> str
__str__() -> str
__repr__() -> str
__bool__()
__add__(mins: int | float) -> Time
__sub__(mins: int | float) -> Time
__eq__(other: Any) -> bool
__lt__(other: Time) -> bool
__gt__(other: Time) -> bool
__le__(other: Time) -> bool
__ge__(other: Time) -> bool
__hash__() -> int
parse(time_string: str) -> Self
classmethod
if_valid(time_string: str) -> Self | NoneTime
classmethod
Parse a string and return an instance of Time if possible; otherwise None.