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: ...
