_pendulum.pyi 1010 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. from __future__ import annotations
  2. from datetime import date
  3. from datetime import datetime
  4. from datetime import time
  5. from typing import NamedTuple
  6. class Duration:
  7. years: int = 0
  8. months: int = 0
  9. weeks: int = 0
  10. days: int = 0
  11. remaining_days: int = 0
  12. hours: int = 0
  13. minutes: int = 0
  14. seconds: int = 0
  15. remaining_seconds: int = 0
  16. microseconds: int = 0
  17. class PreciseDiff(NamedTuple):
  18. years: int
  19. months: int
  20. days: int
  21. hours: int
  22. minutes: int
  23. seconds: int
  24. microseconds: int
  25. total_days: int
  26. def parse_iso8601(
  27. text: str,
  28. ) -> datetime | date | time | Duration: ...
  29. def days_in_year(year: int) -> int: ...
  30. def is_leap(year: int) -> bool: ...
  31. def is_long_year(year: int) -> bool: ...
  32. def local_time(
  33. unix_time: int, utc_offset: int, microseconds: int
  34. ) -> tuple[int, int, int, int, int, int, int]: ...
  35. def precise_diff(d1: datetime | date, d2: datetime | date) -> PreciseDiff: ...
  36. def week_day(year: int, month: int, day: int) -> int: ...