Methods
date.start_of_month()
Return a new NepaliDate instance set to the first day of the current Bikram Sambat month.
The start_of_month method returns a new NepaliDate instance positioned on day 1 of the active Bikram Sambat month with time set to midnight. It is commonly used for monthly calendar views, statements, and aggregation buckets.
Import
from nepali_date_library import NepaliDateSignature
def start_of_month(self) -> NepaliDate:Parameters
- None.
Return Value
- Type:
NepaliDate - Description: New date instance on day 1 of the month.
Example
from nepali_date_library import NepaliDate
date = NepaliDate("2081-07-15")
first_day = date.start_of_month()
print(first_day.format("YYYY-MM-DD")) # "2081-07-01"Related
date.end_of_month(): Final day of the month.date.start_of_year(): First day of the year.
Advertisement
date.end_of_week()
Return a new NepaliDate instance set to the final day of the current week on Saturday.
date.end_of_month()
Return a new NepaliDate instance set to the final day of the current Bikram Sambat month.