Nepali DateNepali DateBikram Sambat Date Engine
Class

Instance Properties

Reference for public instance properties available on every NepaliDate object including year, month, day, and underlying timestamp.

Every NepaliDate instance provides direct read access to its core calendar coordinates through public properties. These include the four digit Bikram Sambat year, the month number indexed from 0 to 11, the day of the month from 1 to 32, and the underlying UTC timestamp stored as a native Python datetime object. These properties reflect the current state of the date instance after any modifications or arithmetic operations.


Property Reference

PropertyTypeDescriptionValue Range
yearintThe four digit Bikram Sambat year.1976 to 2100
monthintThe zero based Bikram Sambat month index.0 (Baisakh) to 11 (Chaitra)
dayintThe day of the month.1 to 32
timestampdatetimeThe equivalent native Python datetime object in UTC.Gregorian timestamp

Examples

Reading Properties

from nepali_date_library import NepaliDate

date = NepaliDate("2081-07-15")

print(date.year)      # 2081
print(date.month)     # 6 (Kartik is index 6)
print(date.day)       # 15
print(date.timestamp) # 2024-10-31 00:00:00+00:00

Working with Month Indices

Because month is indexed starting from 0, add 1 when displaying human readable month numbers, or use helper methods:

print(date.month + 1) # 7 (Human readable month)
print(date.get_month_name(date.month)) # "Kartik"

Advertisement

On this page