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 NepaliDateSignature
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()) # 0Related
date.end_of_day(): Set time to final millisecond of the day.date.start_of_month(): Boundary for month start.
Advertisement
date.diff()
Calculate the chronological difference between two NepaliDate instances in specific time units.
date.end_of_day()
Return a new NepaliDate instance set to the final millisecond of the current day.