Nepali DateNepali DateBikram Sambat Date Engine
Methods

date.get_year()

Retrieve the four digit Bikram Sambat year number from a NepaliDate instance.

The get_year method returns the full four digit Bikram Sambat year as an integer for the current NepaliDate instance. It returns the complete calendar year such as 2081 within the supported range of 1976 through 2100 BS.


Import

from nepali_date_library import NepaliDate

Signature

def get_year(self) -> int:

Parameters

  • None.

Return Value

  • Type: int
  • Range: 1976 to 2100
  • Description: Four digit Bikram Sambat year integer.

Example

from nepali_date_library import NepaliDate

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

Advertisement

On this page