diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-12-17 14:32:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-12-17 14:32:20 +0000 |
commit | db51f7f103bbbd6c91c8f47d75b3482ef8939691 (patch) | |
tree | ab59b1147bd0cd39f31a48073cff236ede4ec1df /src/pendulum/_pendulum.pyi | |
parent | Adding upstream version 3.0.0~a1. (diff) | |
download | pendulum-db51f7f103bbbd6c91c8f47d75b3482ef8939691.tar.xz pendulum-db51f7f103bbbd6c91c8f47d75b3482ef8939691.zip |
Adding upstream version 3.0.0.upstream/3.0.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/pendulum/_pendulum.pyi')
-rw-r--r-- | src/pendulum/_pendulum.pyi | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/pendulum/_pendulum.pyi b/src/pendulum/_pendulum.pyi new file mode 100644 index 0000000..74d7d83 --- /dev/null +++ b/src/pendulum/_pendulum.pyi @@ -0,0 +1,40 @@ +from __future__ import annotations + +from datetime import date +from datetime import datetime +from datetime import time +from typing import NamedTuple + +class Duration: + years: int = 0 + months: int = 0 + weeks: int = 0 + days: int = 0 + remaining_days: int = 0 + hours: int = 0 + minutes: int = 0 + seconds: int = 0 + remaining_seconds: int = 0 + microseconds: int = 0 + +class PreciseDiff(NamedTuple): + years: int + months: int + days: int + hours: int + minutes: int + seconds: int + microseconds: int + total_days: int + +def parse_iso8601( + text: str, +) -> datetime | date | time | Duration: ... +def days_in_year(year: int) -> int: ... +def is_leap(year: int) -> bool: ... +def is_long_year(year: int) -> bool: ... +def local_time( + unix_time: int, utc_offset: int, microseconds: int +) -> tuple[int, int, int, int, int, int, int]: ... +def precise_diff(d1: datetime | date, d2: datetime | date) -> PreciseDiff: ... +def week_day(year: int, month: int, day: int) -> int: ... |