Skip to content

Helpers reference

Datetime helper functions.

Functions

timeless.helpers.days_to_hours(days: int) -> float

Days to hours conversion.

Source code in timeless/helpers.py
def days_to_hours(days: int) -> float:
    """Days to hours conversion."""
    return days * hours_per_day

timeless.helpers.days_to_minutes(days: int) -> float

Days to minutes conversion.

Source code in timeless/helpers.py
def days_to_minutes(days: int) -> float:
    """Days to minutes conversion."""
    return days * minutes_per_day

timeless.helpers.days_to_seconds(days: int) -> float

Days to seconds conversion.

Source code in timeless/helpers.py
def days_to_seconds(days: int) -> float:
    """Days to seconds conversion."""
    return days * seconds_per_day

timeless.helpers.hours_to_days(hours: int) -> float

Hours to days conversion.

Source code in timeless/helpers.py
def hours_to_days(hours: int) -> float:
    """Hours to days conversion."""
    return hours / hours_per_day

timeless.helpers.hours_to_minutes(hours: int) -> float

Hours to minutes conversion.

Source code in timeless/helpers.py
def hours_to_minutes(hours: int) -> float:
    """Hours to minutes conversion."""
    return hours * minutes_per_hour

timeless.helpers.hours_to_seconds(hours: int) -> float

Hours to seconds conversion.

Source code in timeless/helpers.py
def hours_to_seconds(hours: int) -> float:
    """Hours to seconds conversion."""
    return hours * seconds_per_hour

timeless.helpers.minutes_to_days(minutes: int) -> float

Minutes to days conversion.

Source code in timeless/helpers.py
def minutes_to_days(minutes: int) -> float:
    """Minutes to days conversion."""
    return minutes / minutes_per_day

timeless.helpers.minutes_to_hours(minutes: int) -> float

Minutes to hours conversion.

Source code in timeless/helpers.py
def minutes_to_hours(minutes: int) -> float:
    """Minutes to hours conversion."""
    return minutes / minutes_per_hour

timeless.helpers.minutes_to_seconds(minutes: int) -> float

Minutes to seconds conversion.

Source code in timeless/helpers.py
def minutes_to_seconds(minutes: int) -> float:
    """Minutes to seconds conversion."""
    return minutes * seconds_per_minute

timeless.helpers.seconds_to_days(seconds: int) -> float

Seconds to days conversion.

Source code in timeless/helpers.py
def seconds_to_days(seconds: int) -> float:
    """Seconds to days conversion."""
    return seconds / seconds_per_day

timeless.helpers.seconds_to_hours(seconds: int) -> float

Seconds to hours conversion.

Source code in timeless/helpers.py
def seconds_to_hours(seconds: int) -> float:
    """Seconds to hours conversion."""
    return seconds / seconds_per_hour

timeless.helpers.seconds_to_minutes(seconds: int) -> float

Seconds to minutes conversion.

Source code in timeless/helpers.py
def seconds_to_minutes(seconds: int) -> float:
    """Seconds to minutes conversion."""
    return seconds / seconds_per_minute