remaining
Calculate the real remaining time for a start date and a timedelta.
def remaining(
start: datetime,
ends_in: timedelta,
now: datetime | None = None,
relative: boolean = False
) - > timedelta
Calculate the real remaining time for a start date and a timedelta.
Parameters
| Name | Type | Description |
|---|---|---|
| start | datetime | The initial starting date and time from which the duration is measured. |
| ends_in | timedelta | The duration to add to the start date to determine the expiration point. |
| now | `datetime | None` = None |
| relative | boolean = False | If enabled, the end time will be calculated using delta_resolution and rounded to the resolution of ends_in. |
Returns
| Type | Description |
|---|---|
timedelta | The remaining time duration until the calculated end date is reached. |