Nepali DateNepali DateBikram Sambat Date Engine
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 NepaliDate

Signature

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"

Advertisement

On this page