Methods
date.is_leap_year()
Determine whether the current Bikram Sambat calendar year has three hundred sixty six or more days.
The is_leap_year method checks whether the active Bikram Sambat year contains 366 or more days based on official solar calendar tables. Because Bikram Sambat year lengths depend on astronomical calculations rather than fixed leap year cycles, this method checks the actual cumulative day count for the year.
Import
from nepali_date_library import NepaliDateSignature
def is_leap_year(self) -> bool:Parameters
- None.
Return Value
- Type:
bool - Description: Returns
Trueif the year has 366 or more days.
Example
from nepali_date_library import NepaliDate
date = NepaliDate("2081-01-01")
print(date.is_leap_year())Related
date.days_in_month(): Total days in a month.nepali_date_map: Calendar mapping table.
Advertisement
date.is_valid_instance()
Validate whether the current NepaliDate instance represents a legitimate calendar date within supported bounds.
date.days_in_month()
Retrieve the total number of days in the current or specified Bikram Sambat month.