Nepali DateNepali DateBikram Sambat Date Engine
Methods

date.is_valid_instance()

Validate whether the current NepaliDate instance represents a legitimate calendar date within supported bounds.

The is_valid_instance method checks whether the current NepaliDate instance contains valid calendar values and falls within the supported range of 1976 through 2100 BS. It verifies that year, month, and day coordinates correspond to an authentic historical date.


Import

from nepali_date_library import NepaliDate

Signature

def is_valid_instance(self) -> bool:

Parameters

  • None.

Return Value

  • Type: bool
  • Description: Returns True if the date is valid.

Example

from nepali_date_library import NepaliDate

date = NepaliDate("2081-07-15")
print(date.is_valid_instance()) # True

Advertisement

On this page