mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-04 20:45:49 +08:00
[convertdate] Add stubs (#14646)
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
version = "2.4.*"
|
||||
upstream_repository = "https://github.com/fitnr/convertdate"
|
||||
@@ -0,0 +1,48 @@
|
||||
from typing import Final
|
||||
|
||||
from . import (
|
||||
armenian as armenian,
|
||||
bahai as bahai,
|
||||
coptic as coptic,
|
||||
daycount as daycount,
|
||||
dublin as dublin,
|
||||
french_republican as french_republican,
|
||||
gregorian as gregorian,
|
||||
hebrew as hebrew,
|
||||
holidays as holidays,
|
||||
indian_civil as indian_civil,
|
||||
islamic as islamic,
|
||||
iso as iso,
|
||||
julian as julian,
|
||||
julianday as julianday,
|
||||
mayan as mayan,
|
||||
ordinal as ordinal,
|
||||
persian as persian,
|
||||
positivist as positivist,
|
||||
utils as utils,
|
||||
)
|
||||
|
||||
__version__: Final[str]
|
||||
|
||||
__all__ = [
|
||||
"holidays",
|
||||
"armenian",
|
||||
"bahai",
|
||||
"coptic",
|
||||
"dublin",
|
||||
"daycount",
|
||||
"french_republican",
|
||||
"gregorian",
|
||||
"hebrew",
|
||||
"indian_civil",
|
||||
"islamic",
|
||||
"iso",
|
||||
"julian",
|
||||
"julianday",
|
||||
"mayan",
|
||||
"persian",
|
||||
"positivist",
|
||||
"mayan",
|
||||
"ordinal",
|
||||
"utils",
|
||||
]
|
||||
@@ -0,0 +1,24 @@
|
||||
from typing import Final, Literal
|
||||
|
||||
EPOCH: Final = 1922501.5
|
||||
EPOCH_SARKAWAG: Final = 2117210.5
|
||||
MONTHS: Final[list[str]]
|
||||
MONTHS_ARM: Final[list[str]]
|
||||
|
||||
def leap(year: int) -> bool: ...
|
||||
def to_jd(year: int, month: int, day: int, method: Literal["sarkawag", "moveable"] | None = None) -> float: ...
|
||||
def from_jd(jd: float, method: Literal["sarkawag", "moveable"] | None = None) -> tuple[int, int, int]: ...
|
||||
def to_julian(year: int, month: int, day: int, method: Literal["sarkawag", "moveable"] | None = None) -> tuple[int, int, int]: ...
|
||||
def from_julian(
|
||||
year: int, month: int, day: int, method: Literal["sarkawag", "moveable"] | None = None
|
||||
) -> tuple[int, int, int]: ...
|
||||
def to_gregorian(
|
||||
year: int, month: int, day: int, method: Literal["sarkawag", "moveable"] | None = None
|
||||
) -> tuple[int, int, int]: ...
|
||||
def from_gregorian(
|
||||
year: int, month: int, day: int, method: Literal["sarkawag", "moveable"] | None = None
|
||||
) -> tuple[int, int, int]: ...
|
||||
def month_length(year: int, month: int, method: Literal["sarkawag", "moveable"] | None = None) -> Literal[5, 6, 30]: ...
|
||||
def monthcalendar(year: int, month: int, method: Literal["sarkawag", "moveable"] | None = None) -> list[list[int | None]]: ...
|
||||
def format(year: int, month: int, day: int, lang: str | None = None) -> str: ...
|
||||
def tostring(year: int, month: int, day: int, lang: str | None = None) -> str: ...
|
||||
@@ -0,0 +1,37 @@
|
||||
from typing import Final
|
||||
|
||||
EPOCH: Final = 2394646.5
|
||||
EPOCH_GREGORIAN_YEAR: Final = 1844
|
||||
TEHRAN: Final = 51.4215, 35.6944
|
||||
WEEKDAYS: Final = ("Jamál", "Kamál", "Fidál", "Idál", "Istijlál", "Istiqlál", "Jalál")
|
||||
MONTHS: Final[tuple[str, ...]]
|
||||
ENGLISH_MONTHS: Final[tuple[str, ...]]
|
||||
BAHA: Final = 1
|
||||
JALAL: Final = 2
|
||||
JAMAL: Final = 3
|
||||
AZAMAT: Final = 4
|
||||
NUR: Final = 5
|
||||
RAHMAT: Final = 6
|
||||
KALIMAT: Final = 7
|
||||
KAMAL: Final = 8
|
||||
ASMA: Final = 9
|
||||
IZZAT: Final = 10
|
||||
MASHIYYAT: Final = 11
|
||||
ILM: Final = 12
|
||||
QUDRAT: Final = 13
|
||||
QAWL: Final = 14
|
||||
MASAIL: Final = 15
|
||||
SHARAF: Final = 16
|
||||
SULTAN: Final = 17
|
||||
MULK: Final = 18
|
||||
AYYAMIHA: Final = 19
|
||||
ALA: Final = 20
|
||||
|
||||
def gregorian_nawruz(year: int) -> tuple[int, int]: ...
|
||||
def to_jd(year: int, month: int, day: int) -> float: ...
|
||||
def from_jd(jd: float) -> tuple[int, int, int]: ...
|
||||
def from_gregorian(year: int, month: int, day: int) -> tuple[int, int, int]: ...
|
||||
def to_gregorian(year: int, month: int, day: int) -> tuple[int, int, int]: ...
|
||||
def month_length(year: int, month: int) -> int: ...
|
||||
def monthcalendar(year: int, month: int) -> list[list[int | None]]: ...
|
||||
def format(year: int, month: int, day: int, lang: str | None = None) -> str: ...
|
||||
@@ -0,0 +1,14 @@
|
||||
from typing import Final, Literal
|
||||
|
||||
EPOCH: Final = 1825029.5
|
||||
MONTHS: Final[list[str]]
|
||||
WEEKDAYS: Final = ["Tkyriaka", "Pesnau", "Pshoment", "Peftoou", "Ptiou", "Psoou", "Psabbaton"]
|
||||
|
||||
def is_leap(year: int) -> bool: ...
|
||||
def to_jd(year: int, month: int, day: int) -> float: ...
|
||||
def from_jd(jdc: float) -> tuple[int, int, int]: ...
|
||||
def to_gregorian(year: int, month: int, day: int) -> tuple[int, int, int]: ...
|
||||
def from_gregorian(year: int, month: int, day: int) -> tuple[int, int, int]: ...
|
||||
def month_length(year: int, month: int) -> Literal[5, 6, 30]: ...
|
||||
def monthcalendar(year: int, month: int) -> list[list[int | None]]: ...
|
||||
def format(year: int, month: int, day: int) -> str: ...
|
||||
@@ -0,0 +1,3 @@
|
||||
from typing import Final
|
||||
|
||||
french_republican_days: Final[dict[int, list[str]]]
|
||||
@@ -0,0 +1,6 @@
|
||||
from typing import Final
|
||||
|
||||
DAY_NAMES: Final[tuple[str, ...]]
|
||||
leap_day_replacements: Final[dict[int, str]]
|
||||
DAY_NAMES_LEAP: Final[list[str]]
|
||||
FESTIVALS: Final[dict[tuple[int, int], str]]
|
||||
@@ -0,0 +1,13 @@
|
||||
import datetime
|
||||
|
||||
class DayCount:
|
||||
epoch: float
|
||||
def __init__(self, epoch: float) -> None: ...
|
||||
def to_gregorian(self, dc: int) -> tuple[int, int, int]: ...
|
||||
def from_gregorian(self, year: int, month: int, day: int) -> float: ...
|
||||
def to_jd(self, dc: int) -> float: ...
|
||||
def from_jd(self, jdc: float) -> float: ...
|
||||
def from_julian(self, year: int, month: int, day: int) -> float: ...
|
||||
def to_julian(self, dc: int) -> tuple[int, int, int]: ...
|
||||
def to_datetime(self, dc: int) -> datetime.datetime: ...
|
||||
def from_datetime(self, date: datetime.datetime) -> float: ...
|
||||
@@ -0,0 +1,13 @@
|
||||
import datetime
|
||||
from typing import Final
|
||||
|
||||
EPOCH: Final = 2415020
|
||||
|
||||
def to_gregorian(dc: int) -> tuple[int, int, int]: ...
|
||||
def from_gregorian(year: int, month: int, day: int) -> float: ...
|
||||
def to_jd(dc: int) -> float: ...
|
||||
def from_jd(jdc: float) -> float: ...
|
||||
def from_julian(year: int, month: int, day: int) -> float: ...
|
||||
def to_julian(dc: int) -> tuple[int, int, int]: ...
|
||||
def to_datetime(dc: int) -> datetime.datetime: ...
|
||||
def from_datetime(date: datetime.datetime) -> float: ...
|
||||
@@ -0,0 +1,27 @@
|
||||
from typing import Final, Literal
|
||||
|
||||
EPOCH: Final = 2375839.5
|
||||
YEAR_EPOCH: Final = 1791.0
|
||||
DAYS_IN_YEAR: Final = 365.0
|
||||
MOIS: Final[list[str]]
|
||||
MONTHS: Final[list[str]]
|
||||
LEAP_CYCLE_DAYS: Final = 1461.0
|
||||
LEAP_CYCLE_YEARS: Final = 4.0
|
||||
|
||||
def leap(year: int, method: Literal[4, 100, 128, "continuous", "madler", "romme", "equinox"] | None = None) -> bool: ...
|
||||
def premier_da_la_annee(jd: float) -> float: ...
|
||||
def to_jd(
|
||||
year: int, month: int, day: int, method: Literal[4, 100, 128, "continuous", "madler", "romme", "equinox"] | None = None
|
||||
) -> float: ...
|
||||
def from_jd(
|
||||
jd: float, method: Literal[4, 100, 128, "continuous", "madler", "romme", "equinox"] | None = None
|
||||
) -> tuple[int, int, int]: ...
|
||||
def decade(jour: float) -> int: ...
|
||||
def day_name(month: int, day: int) -> str: ...
|
||||
def from_gregorian(
|
||||
year: int, month: int, day: int, method: Literal[4, 100, 128, "continuous", "madler", "romme", "equinox"] | None = None
|
||||
) -> tuple[int, int, int]: ...
|
||||
def to_gregorian(
|
||||
an: int, mois: int, jour: int, method: Literal[4, 100, 128, "continuous", "madler", "romme", "equinox"] | None = None
|
||||
) -> tuple[int, int, int]: ...
|
||||
def format(an: int, mois: int, jour: int) -> str: ...
|
||||
@@ -0,0 +1,20 @@
|
||||
from typing import Final, Literal
|
||||
|
||||
EPOCH: Final = 1721425.5
|
||||
INTERCALATION_CYCLE_YEARS: Final = 400
|
||||
INTERCALATION_CYCLE_DAYS: Final = 146097
|
||||
LEAP_SUPPRESSION_YEARS: Final = 100
|
||||
LEAP_SUPPRESSION_DAYS: Final = 36524
|
||||
LEAP_CYCLE_YEARS: Final = 4
|
||||
LEAP_CYCLE_DAYS: Final = 1461
|
||||
YEAR_DAYS: Final = 365
|
||||
HAVE_30_DAYS: Final = (4, 6, 9, 11)
|
||||
HAVE_31_DAYS: Final = (1, 3, 5, 7, 8, 10, 12)
|
||||
|
||||
def legal_date(year: int, month: int, day: int) -> Literal[True]: ...
|
||||
def to_jd2(year: int, month: int, day: int) -> float: ...
|
||||
def to_jd(year: int, month: int, day: int) -> float: ...
|
||||
def from_jd(jd: float) -> tuple[int, int, int]: ...
|
||||
def month_length(year: int, month: int) -> int: ...
|
||||
def monthcalendar(year: int, month: int) -> list[list[int | None]]: ...
|
||||
def format(year: int, month: int, day: int, format_string: str = "%-d %B %y") -> str: ...
|
||||
@@ -0,0 +1,34 @@
|
||||
from typing import Final, Literal
|
||||
|
||||
EPOCH: Final = 347995.5
|
||||
HEBREW_YEAR_OFFSET: Final = 3760
|
||||
NISAN: Final = 1
|
||||
IYYAR: Final = 2
|
||||
SIVAN: Final = 3
|
||||
TAMMUZ: Final = 4
|
||||
AV: Final = 5
|
||||
ELUL: Final = 6
|
||||
TISHRI: Final = 7
|
||||
HESHVAN: Final = 8
|
||||
KISLEV: Final = 9
|
||||
TEVETH: Final = 10
|
||||
SHEVAT: Final = 11
|
||||
ADAR: Final = 12
|
||||
VEADAR: Final = 13
|
||||
MONTHS: Final[list[str]]
|
||||
MONTHS_HEB: Final[list[str]]
|
||||
|
||||
def leap(year: int) -> bool: ...
|
||||
def year_months(year: int) -> Literal[12, 13]: ...
|
||||
def delay_1(year: int) -> int: ...
|
||||
def delay_2(year: int) -> Literal[0, 1, 2]: ...
|
||||
def year_days(year: int) -> float: ...
|
||||
def month_days(year: int, month: int) -> Literal[29, 30]: ...
|
||||
def to_jd(year: int, month: int, day: int) -> float: ...
|
||||
def from_jd(jd: float) -> tuple[int, int, int]: ...
|
||||
def to_civil(year: int, month: int, day: int) -> tuple[int, int, int]: ...
|
||||
def to_jd_gregorianyear(gregorianyear: int, hebrew_month: int, hebrew_day: int) -> float: ...
|
||||
def from_gregorian(year: int, month: int, day: int) -> tuple[int, int, int]: ...
|
||||
def to_gregorian(year: int, month: int, day: int) -> tuple[int, int, int]: ...
|
||||
def monthcalendar(year: int, month: int) -> list[list[int | None]]: ...
|
||||
def format(year: int, month: int, day: int, lang: str | None = None) -> str: ...
|
||||
@@ -0,0 +1,161 @@
|
||||
from typing import Final, Literal
|
||||
from typing_extensions import deprecated
|
||||
|
||||
MON: Final = 0
|
||||
TUE: Final = 1
|
||||
WED: Final = 2
|
||||
THU: Final = 3
|
||||
FRI: Final = 4
|
||||
SAT: Final = 5
|
||||
SUN: Final = 6
|
||||
JAN: Final = 1
|
||||
FEB: Final = 2
|
||||
MAR: Final = 3
|
||||
APR: Final = 4
|
||||
MAY: Final = 5
|
||||
JUN: Final = 6
|
||||
JUL: Final = 7
|
||||
AUG: Final = 8
|
||||
SEP: Final = 9
|
||||
OCT: Final = 10
|
||||
NOV: Final = 11
|
||||
DEC: Final = 12
|
||||
|
||||
def new_years(year: int, observed: bool | None = None) -> tuple[int, int, int]: ...
|
||||
def martin_luther_king_day(year: int) -> tuple[int, int, int]: ...
|
||||
def lincolns_birthday(year: int) -> tuple[int, int, int]: ...
|
||||
def valentines_day(year: int) -> tuple[int, int, int]: ...
|
||||
def washingtons_birthday(year: int, observed: bool | None = None) -> tuple[int, int, int]: ...
|
||||
def presidents_day(year: int) -> tuple[int, int, int]: ...
|
||||
def pulaski_day(year: int) -> tuple[int, int, int]: ...
|
||||
def easter(year: int, church: Literal["western", "orthodox", "eastern"] | None = None) -> tuple[int, int, int]: ...
|
||||
def may_day(year: int) -> tuple[int, int, int]: ...
|
||||
def mothers_day(year: int) -> tuple[int, int, int]: ...
|
||||
def memorial_day(year: int) -> tuple[int, int, int]: ...
|
||||
def fathers_day(year: int) -> tuple[int, int, int]: ...
|
||||
def juneteenth(year: int) -> tuple[int, int, int]: ...
|
||||
def flag_day(year: int) -> tuple[int, int, int]: ...
|
||||
def independence_day(year: int, observed: bool | None = None) -> tuple[int, int, int]: ...
|
||||
def labor_day(year: int) -> tuple[int, int, int]: ...
|
||||
def indigenous_peoples_day(year: int, country: str = "usa") -> tuple[int, int, int]: ...
|
||||
@deprecated("The `columbus_day` function will be removed in a future release. Use `indigenous_peoples_day` instead.")
|
||||
def columbus_day(year: int, country: str = "usa") -> tuple[int, int, int]: ...
|
||||
def halloween(year: int) -> tuple[int, int, int]: ...
|
||||
def election_day(year: int) -> tuple[int, int, int]: ...
|
||||
def veterans_day(year: int, observed: bool | None = None) -> tuple[int, int, int]: ...
|
||||
def rememberance_day(year: int) -> tuple[int, int, int]: ...
|
||||
def armistice_day(year: int) -> tuple[int, int, int]: ...
|
||||
def thanksgiving(year: int, country: Literal["usa", "canada"] = "usa") -> tuple[int, int, int]: ...
|
||||
def christmas_eve(year: int) -> tuple[int, int, int]: ...
|
||||
def christmas(year: int, observed: bool | None = None) -> tuple[int, int, int]: ...
|
||||
def new_years_eve(year: int) -> tuple[int, int, int]: ...
|
||||
def hanukkah(year: int, eve: bool | None = None) -> tuple[int, int, int]: ...
|
||||
def purim(year: int, eve: bool | None = None) -> tuple[int, int, int]: ...
|
||||
def rosh_hashanah(year: int, eve: bool | None = None) -> tuple[int, int, int]: ...
|
||||
def yom_kippur(year: int, eve: bool | None = None) -> tuple[int, int, int]: ...
|
||||
def passover(year: int, eve: bool | None = None) -> tuple[int, int, int]: ...
|
||||
def shavuot(year: int, eve: bool | None = None) -> tuple[int, int, int]: ...
|
||||
def sukkot(year: int, eve: bool | None = None) -> tuple[int, int, int]: ...
|
||||
def shemini_azeret(year: int, eve: bool | None = None) -> tuple[int, int, int]: ...
|
||||
def lag_baomer(year: int, eve: bool | None = None) -> tuple[int, int, int]: ...
|
||||
def tu_beshvat(year: int, eve: bool | None = None) -> tuple[int, int, int]: ...
|
||||
def tisha_bav(year: int, eve: bool | None = None) -> tuple[int, int, int]: ...
|
||||
def dia_constitucion(year: int, observed: bool | None = True) -> tuple[int, int, int]: ...
|
||||
def natalicio_benito_juarez(year: int, observed: bool | None = True) -> tuple[int, int, int]: ...
|
||||
def dia_independencia(year: int) -> tuple[int, int, int]: ...
|
||||
def dia_revolucion(year: int) -> tuple[int, int, int]: ...
|
||||
def ramadan(year: int, eve: bool | None = None) -> tuple[int, int, int]: ...
|
||||
def ashura(year: int, eve: bool | None = None) -> tuple[int, int, int]: ...
|
||||
def eid_alfitr(year: int, eve: bool | None = None) -> tuple[int, int, int]: ...
|
||||
def eid_aladha(year: int, eve: bool | None = None) -> tuple[int, int, int]: ...
|
||||
|
||||
class Holidays:
|
||||
year: int
|
||||
def __init__(self, year: int | None = None) -> None: ...
|
||||
def set_year(self, year: int) -> None: ...
|
||||
@property
|
||||
def christmas(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def christmas_eve(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def thanksgiving(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def new_years(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def new_years_eve(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def independence_day(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def flag_day(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def election_day(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def presidents_day(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def washingtons_birthday(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def lincolns_birthday(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def memorial_day(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def juneteenth(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def labor_day(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def indigenous_peoples_day(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def columbus_day(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def veterans_day(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def valentines_day(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def halloween(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def mothers_day(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def fathers_day(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def pulaski_day(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def easter(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def martin_luther_king_day(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def hanukkah(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def purim(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def rosh_hashanah(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def yom_kippur(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def passover(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def shavuot(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def sukkot(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def tu_beshvat(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def shemini_azeret(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def lag_baomer(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def tisha_bav(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def dia_constitucion(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def natalicio_benito_juarez(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def dia_independencia(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def dia_revolucion(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def ramadan(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def ashura(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def eid_alfitr(self) -> tuple[int, int, int]: ...
|
||||
@property
|
||||
def eid_aladha(self) -> tuple[int, int, int]: ...
|
||||
@@ -0,0 +1,15 @@
|
||||
from typing import Final, Literal
|
||||
|
||||
WEEKDAYS: Final = ("Ravivāra", "Somavāra", "Maṅgalavāra", "Budhavāra", "Guruvāra", "Śukravāra", "Śanivāra")
|
||||
MONTHS: Final[tuple[str, ...]]
|
||||
HAVE_31_DAYS: Final = (2, 3, 4, 5, 6)
|
||||
HAVE_30_DAYS: Final = (7, 8, 9, 10, 11, 12)
|
||||
SAKA_EPOCH: Final = 78
|
||||
|
||||
def to_jd(year: int, month: int, day: int) -> float: ...
|
||||
def from_jd(jd: float) -> tuple[int, int, int]: ...
|
||||
def from_gregorian(year: int, month: int, day: int) -> tuple[int, int, int]: ...
|
||||
def to_gregorian(year: int, month: int, day: int) -> tuple[int, int, int]: ...
|
||||
def month_length(year: int, month: int) -> Literal[30, 31]: ...
|
||||
def monthcalendar(year: int, month: int) -> list[list[int | None]]: ...
|
||||
def format(year: int, month: int, day: int) -> str: ...
|
||||
@@ -0,0 +1,17 @@
|
||||
from typing import Final, Literal
|
||||
|
||||
EPOCH: Final = 1948439.5
|
||||
WEEKDAYS: Final = ("al-'ahad", "al-'ithnayn", "ath-thalatha'", "al-'arb`a'", "al-khamis", "al-jum`a", "as-sabt")
|
||||
MONTHS: Final[list[str]]
|
||||
HAS_29_DAYS: Final = (2, 4, 6, 8, 10)
|
||||
HAS_30_DAYS: Final = (1, 3, 5, 7, 9, 11)
|
||||
|
||||
def leap(year: int) -> bool: ...
|
||||
def to_jd(year: int, month: int, day: int) -> float: ...
|
||||
def from_jd(jd: float) -> tuple[int, int, int]: ...
|
||||
def to_jd_gregorianyear(gregorianyear: int, islamic_month: int, islamic_day: int) -> float: ...
|
||||
def from_gregorian(year: int, month: int, day: int) -> tuple[int, int, int]: ...
|
||||
def to_gregorian(year: int, month: int, day: int) -> tuple[int, int, int]: ...
|
||||
def month_length(year: int, month: int) -> Literal[29, 30]: ...
|
||||
def monthcalendar(year: int, month: int) -> list[list[int | None]]: ...
|
||||
def format(year: int, month: int, day: int) -> str: ...
|
||||
@@ -0,0 +1,17 @@
|
||||
import datetime
|
||||
from typing import Final, Literal
|
||||
|
||||
MON: Final = 0
|
||||
TUE: Final = 1
|
||||
WED: Final = 2
|
||||
THU: Final = 3
|
||||
FRI: Final = 4
|
||||
SAT: Final = 5
|
||||
SUN: Final = 6
|
||||
|
||||
def to_jd(year: int, week: int, day: int) -> float: ...
|
||||
def from_jd(jd: float) -> datetime._IsoCalendarDate: ...
|
||||
def weeks_per_year(year: int) -> Literal[52, 53]: ...
|
||||
def from_gregorian(year: int, month: int, day: int) -> datetime._IsoCalendarDate: ...
|
||||
def to_gregorian(year: int, week: int, day: int) -> tuple[int, int, int]: ...
|
||||
def format(year: int, week: int, day: int) -> str: ...
|
||||
@@ -0,0 +1,20 @@
|
||||
from typing import Final, Literal
|
||||
|
||||
J0000: Final = 1721424.5
|
||||
J1970: Final = 2440587.5
|
||||
JMJD: Final = 2400000.5
|
||||
JULIAN_EPOCH: Final = 1721423.5
|
||||
J2000: Final = 2451545.0
|
||||
JULIANCENTURY: Final = 36525.0
|
||||
HAVE_30_DAYS: Final = (4, 6, 9, 11)
|
||||
HAVE_31_DAYS: Final = (1, 3, 5, 7, 8, 10, 12)
|
||||
|
||||
def leap(year: int) -> bool: ...
|
||||
def month_length(year: int, month: int) -> Literal[28, 29, 30, 31]: ...
|
||||
def legal_date(year: int, month: int, day: int) -> Literal[True]: ...
|
||||
def from_jd(jd: float) -> tuple[int, int, int]: ...
|
||||
def to_jd(year: int, month: int, day: int) -> float: ...
|
||||
def from_gregorian(year: int, month: int, day: int) -> tuple[int, int, int]: ...
|
||||
def to_gregorian(year: int, month: int, day: int) -> tuple[int, int, int]: ...
|
||||
def monthcalendar(year: int, month: int) -> list[list[int | None]]: ...
|
||||
def format(year: int, month: int, day: int, format_string: str = "%-d %B %y") -> str: ...
|
||||
@@ -0,0 +1,8 @@
|
||||
import datetime
|
||||
|
||||
def to_datetime(jdc: float) -> datetime.datetime: ...
|
||||
def from_datetime(dt: datetime.datetime) -> float: ...
|
||||
def to_gregorian(jdc: float) -> tuple[int, int, int]: ...
|
||||
def from_gregorian(year: int, month: int, day: int) -> float: ...
|
||||
def to_julian(jdc: float) -> tuple[int, int, int]: ...
|
||||
def from_julian(year: int, month: int, day: int) -> float: ...
|
||||
@@ -0,0 +1,40 @@
|
||||
from _typeshed import Unused
|
||||
from collections.abc import Generator
|
||||
from typing import Final, Literal, NoReturn, overload
|
||||
|
||||
EPOCH: Final = 584282.5
|
||||
HAAB: Final[list[str]]
|
||||
HAAB_TRANSLATIONS: Final[list[str]]
|
||||
TZOLKIN: Final[list[str]]
|
||||
TZOLKIN_TRANSLATIONS: Final[list[str]]
|
||||
|
||||
def to_jd(baktun: int, katun: int, tun: int, uinal: int, kin: int) -> float: ...
|
||||
def from_jd(jd: float) -> tuple[int, int, int, int, int]: ...
|
||||
def to_gregorian(baktun: int, katun: int, tun: int, uinal: int, kin: int) -> tuple[int, int, int]: ...
|
||||
def from_gregorian(year: int, month: int, day: int) -> tuple[int, int, int, int, int]: ...
|
||||
def to_haab(jd: float) -> tuple[int, str]: ...
|
||||
def to_tzolkin(jd: float) -> tuple[int, str]: ...
|
||||
def lc_to_haab(baktun: int, katun: int, tun: int, uinal: int, kin: int) -> tuple[int, str]: ...
|
||||
def lc_to_tzolkin(baktun: int, katun: int, tun: int, uinal: int, kin: int) -> tuple[int, str]: ...
|
||||
def lc_to_haab_tzolkin(baktun: int, katun: int, tun: int, uinal: int, kin: int) -> str: ...
|
||||
def translate_haab(h: str) -> str | None: ...
|
||||
def translate_tzolkin(tz: str) -> str | None: ...
|
||||
def tzolkin_generator(number: int | None = None, name: str | None = None) -> Generator[tuple[int, str]]: ...
|
||||
def longcount_generator(
|
||||
baktun: int, katun: int, tun: int, uinal: int, kin: int
|
||||
) -> Generator[tuple[int, int, int, int, int], None, NoReturn]: ...
|
||||
def next_haab(month: str, jd: float) -> float: ...
|
||||
def next_tzolkin(tzolkin: tuple[int, str], jd: float) -> float: ...
|
||||
def next_tzolkin_haab(tzolkin: tuple[int, str], haab: tuple[int, str], jd: float) -> float: ...
|
||||
def month_length(month: str) -> Literal[5, 20]: ...
|
||||
@overload
|
||||
def haab_monthcalendar(
|
||||
baktun: int, katun: int, tun: int, uinal: int, kin: int, jdc: None = None
|
||||
) -> list[list[tuple[int | None, tuple[int, str] | None, tuple[int, int, int, int, int] | None]]]: ...
|
||||
@overload
|
||||
def haab_monthcalendar(
|
||||
baktun: Unused = None, katun: Unused = None, tun: Unused = None, uinal: Unused = None, kin: Unused = None, jdc: float = ...
|
||||
) -> list[list[tuple[int | None, tuple[int, str] | None, tuple[int, int, int, int, int] | None]]]: ...
|
||||
def haab_monthcalendar_prospective(
|
||||
haabmonth: str, jdc: float
|
||||
) -> list[list[tuple[int | None, tuple[int, str] | None, tuple[int, int, int, int, int] | None]]]: ...
|
||||
@@ -0,0 +1,4 @@
|
||||
def to_jd(year: int, dayofyear: int) -> float: ...
|
||||
def from_jd(jd: float) -> tuple[int, int]: ...
|
||||
def from_gregorian(year: int, month: int, day: int) -> tuple[int, int]: ...
|
||||
def to_gregorian(year: int, dayofyear: int) -> tuple[int, int, int]: ...
|
||||
@@ -0,0 +1,19 @@
|
||||
from typing import Final, Literal
|
||||
|
||||
EPOCH: Final = 1948320.5
|
||||
WEEKDAYS: Final[tuple[str, ...]]
|
||||
MONTHS: Final[list[str]]
|
||||
HAS_31_DAYS: Final = (1, 2, 3, 4, 5, 6)
|
||||
HAS_30_DAYS: Final = (7, 8, 9, 10, 11)
|
||||
|
||||
def leap(year: int) -> bool: ...
|
||||
def equinox_jd(gyear: int) -> int: ...
|
||||
def last_equinox_jd(jd: float) -> int: ...
|
||||
def jd_to_pyear(jd: float) -> tuple[int, int]: ...
|
||||
def to_jd(year: int, month: int, day: int) -> float: ...
|
||||
def from_jd(jd: float) -> tuple[int, int, int]: ...
|
||||
def from_gregorian(year: int, month: int, day: int) -> tuple[int, int, int]: ...
|
||||
def to_gregorian(year: int, month: int, day: int) -> tuple[int, int, int]: ...
|
||||
def month_length(year: int, month: int) -> Literal[29, 30, 31]: ...
|
||||
def monthcalendar(year: int, month: int) -> list[list[int | None]]: ...
|
||||
def format(year: int, month: int, day: int) -> str: ...
|
||||
@@ -0,0 +1,15 @@
|
||||
from typing import Final, Literal
|
||||
|
||||
EPOCH: Final = 2374479.5
|
||||
YEAR_EPOCH: Final = 1789
|
||||
DAYS_IN_YEAR: Final = 365
|
||||
MONTHS: Final[tuple[str, ...]]
|
||||
|
||||
def legal_date(year: int, month: int, day: int) -> Literal[True]: ...
|
||||
def to_jd(year: int, month: int, day: int) -> float: ...
|
||||
def from_jd(jd: float) -> tuple[int, int, int]: ...
|
||||
def from_gregorian(year: int, month: int, day: int) -> tuple[int, int, int]: ...
|
||||
def to_gregorian(year: int, month: int, day: int) -> tuple[int, int, int]: ...
|
||||
def dayname(year: int, month: int, day: int) -> tuple[str, str]: ...
|
||||
def weekday(day: int) -> int: ...
|
||||
def festival(month: int, day: int) -> str | None: ...
|
||||
@@ -0,0 +1,43 @@
|
||||
from typing import Final, Literal, overload
|
||||
|
||||
TROPICALYEAR: Final[float]
|
||||
|
||||
@overload
|
||||
def amod(a: float, b: int) -> int: ...
|
||||
@overload
|
||||
def amod(a: float, b: float) -> float: ...
|
||||
def jwday(j: float) -> int: ...
|
||||
@overload
|
||||
def weekday_before(weekday: int, jd: int) -> int: ...
|
||||
@overload
|
||||
def weekday_before(weekday: int, jd: float) -> float: ...
|
||||
@overload
|
||||
def search_weekday(weekday: int, jd: int, direction: Literal[-1, 1], offset: int) -> int: ...
|
||||
@overload
|
||||
def search_weekday(weekday: int, jd: float, direction: Literal[-1, 1], offset: int) -> float: ...
|
||||
@overload
|
||||
def nearest_weekday(weekday: int, jd: int) -> int: ...
|
||||
@overload
|
||||
def nearest_weekday(weekday: int, jd: float) -> float: ...
|
||||
@overload
|
||||
def next_weekday(weekday: int, jd: int) -> int: ...
|
||||
@overload
|
||||
def next_weekday(weekday: int, jd: float) -> float: ...
|
||||
@overload
|
||||
def next_or_current_weekday(weekday: int, jd: int) -> int: ...
|
||||
@overload
|
||||
def next_or_current_weekday(weekday: int, jd: float) -> float: ...
|
||||
@overload
|
||||
def previous_weekday(weekday: int, jd: int) -> int: ...
|
||||
@overload
|
||||
def previous_weekday(weekday: int, jd: float) -> float: ...
|
||||
@overload
|
||||
def previous_or_current_weekday(weekday: int, jd: int) -> int: ...
|
||||
@overload
|
||||
def previous_or_current_weekday(weekday: int, jd: float) -> float: ...
|
||||
@overload
|
||||
def n_weeks(weekday: int, jd: int, nthweek: int) -> int: ...
|
||||
@overload
|
||||
def n_weeks(weekday: int, jd: float, nthweek: int) -> float: ...
|
||||
def monthcalendarhelper(start_weekday: int, month_length: int) -> list[list[int | None]]: ...
|
||||
def nth_day_of_month(n: int, weekday: int, month: int, year: int) -> tuple[int, int, int]: ...
|
||||
Reference in New Issue
Block a user