Methods
date.get_weeks_in_month()
Calculate the number of calendar week rows required to render the current month in a grid.
The get_weeks_in_month method computes the total number of seven day week rows required to display the entire month in a standard calendar grid. Depending on which weekday the month starts on and how many days it contains, the returned count is usually five or six rows.
Import
from nepali_date_library import NepaliDateSignature
def get_weeks_in_month(self) -> int:Parameters
- None.
Return Value
- Type:
int - Range:
4,5, or6 - Description: Number of week rows needed for a calendar view.
Example
from nepali_date_library import NepaliDate
date = NepaliDate("2081-01-01")
print(f"Weeks in month: {date.get_weeks_in_month()}")Related
NepaliDate.get_calendar_days(): Matrix grid builder.date.days_in_month(): Total days in month.
Advertisement
date.days_in_month()
Retrieve the total number of days in the current or specified Bikram Sambat month.
date.current_quarter()
Return the standard Bikram Sambat calendar quarter number from one to four for the current date.