Methods
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.
The end_of_year method returns a new NepaliDate instance set to the closing day of the current Bikram Sambat calendar year. This corresponds to the final day of Chaitra, which is commonly needed for annual reconciliations and fiscal year preparations.
Import
from nepali_date_library import NepaliDateSignature
def end_of_year(self) -> NepaliDate:Parameters
- None.
Return Value
- Type:
NepaliDate - Description: New date instance on the final day of Chaitra.
Example
from nepali_date_library import NepaliDate
date = NepaliDate("2081-07-15")
year_end = date.end_of_year()
print(year_end.format("YYYY-MM-DD")) # "2081-12-30" or similarRelated
date.start_of_year(): First day of the year.date.is_leap_year(): Total year day check.
Advertisement
date.start_of_year()
Return a new NepaliDate instance set to the first day of the Bikram Sambat year on 1 Baisakh.
date.is_before()
Check whether the current date occurs chronologically before another specified date.