Nepali DateNepali DateBikram Sambat Date Engine
Methods

date.get_month()

Retrieve the zero based Bikram Sambat month index from zero for Baisakh to eleven for Chaitra.

The get_month method returns the month of the year as an integer between 0 and 11 for the current NepaliDate instance. The library adheres to the zero based indexing standard where 0 represents Baisakh, 1 represents Jestha, and 11 represents Chaitra.


Import

from nepali_date_library import NepaliDate

Signature

def get_month(self) -> int:

Parameters

  • None.

Return Value

  • Type: int
  • Range: 0 to 11
  • Description: Zero based month index from Baisakh (0) to Chaitra (11).

Example

from nepali_date_library import NepaliDate

date = NepaliDate("2081-07-15") # Kartik
print(date.get_month()) # 6 (Kartik is index 6)

Advertisement

On this page