Methods
date.start_of_year()
Return a new NepaliDate instance set to the first day of the Bikram Sambat year on 1 Baisakh.
The start_of_year method returns a new NepaliDate instance set to 1 Baisakh, the first day of the Bikram Sambat calendar year. This is useful for year to date financial tracking and annual summary reports.
Import
from nepali_date_library import NepaliDateSignature
def start_of_year(self) -> NepaliDate:Parameters
- None.
Return Value
- Type:
NepaliDate - Description: New date instance positioned on 1 Baisakh of the current year.
Example
from nepali_date_library import NepaliDate
date = NepaliDate("2081-07-15")
year_start = date.start_of_year()
print(year_start.format("YYYY-MM-DD")) # "2081-01-01"Related
date.end_of_year(): Final day of the year.date.start_of_month(): First day of the month.
Advertisement
date.end_of_month()
Return a new NepaliDate instance set to the final day of the current Bikram Sambat month.
date.end_of_year()
Return a new NepaliDate instance set to the final day of the Bikram Sambat year on the last day of Chaitra.