Methods
date.days_in_month()
Retrieve the total number of days in the current or specified Bikram Sambat month.
The days_in_month method returns the total number of days present in the active month of the current NepaliDate instance, or for an explicitly provided year and month combination. Because Bikram Sambat month durations vary from 29 to 32 days depending on astronomical solar calculations, this method provides accurate month lengths.
Import
from nepali_date_library import NepaliDateSignature
def days_in_month(self) -> int:Parameters
- None.
Return Value
- Type:
int - Range:
29to32 - Description: Total number of days in the active month.
Example
from nepali_date_library import NepaliDate
date = NepaliDate("2081-01-01") # Baisakh 2081
print(f"Days in Baisakh 2081: {date.days_in_month()}") # 31Related
date.get_weeks_in_month(): Calendar rows for month.NepaliDate.get_calendar_days(): Generate calendar matrix.
Advertisement
date.is_leap_year()
Determine whether the current Bikram Sambat calendar year has three hundred sixty six or more days.
date.get_weeks_in_month()
Calculate the number of calendar week rows required to render the current month in a grid.