Nepali DateNepali DateBikram Sambat Date Engine
Methods

date.end_of_month()

Return a new NepaliDate instance set to the final day of the current Bikram Sambat month.

The end_of_month method returns a new NepaliDate instance positioned on the last valid calendar day of the active month. It automatically checks the calendar map to determine whether the month ends on day 29, 30, 31, or 32, which is useful for monthly reporting and billing cycles.


Import

from nepali_date_library import NepaliDate

Signature

def end_of_month(self) -> NepaliDate:

Parameters

  • None.

Return Value

  • Type: NepaliDate
  • Description: New date instance on the final day of the current month.

Example

from nepali_date_library import NepaliDate

date = NepaliDate("2081-01-10")
last_day = date.end_of_month()
print(last_day.format("YYYY-MM-DD")) # Day 31 for Baisakh 2081

Advertisement

On this page