Nepali DateNepali DateBikram Sambat Date Engine
Methods

date.start_of_day()

Return a new NepaliDate instance set to the first moment of the current day at midnight.

The start_of_day method returns a new NepaliDate instance with time coordinates set to midnight at 00 hours, 00 minutes, 00 seconds, and 000 milliseconds. This is useful for date normalization and time neutral comparisons.


Import

from nepali_date_library import NepaliDate

Signature

def start_of_day(self) -> NepaliDate:

Parameters

  • None.

Return Value

  • Type: NepaliDate
  • Description: New date instance set to 00:00:00.000 UTC.

Example

from nepali_date_library import NepaliDate

date = NepaliDate()
midnight = date.start_of_day()
print(midnight.get_hours())   # 0
print(midnight.get_minutes()) # 0

Advertisement

On this page