Nepali DateNepali DateBikram Sambat Date Engine
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 NepaliDate

Signature

def is_leap_year(self) -> bool:

Parameters

  • None.

Return Value

  • Type: bool
  • Description: Returns True if the year has 366 or more days.

Example

from nepali_date_library import NepaliDate

date = NepaliDate("2081-01-01")
print(date.is_leap_year())

Advertisement

On this page