Methods
date.end_of_day()
Return a new NepaliDate instance set to the final millisecond of the current day.
The end_of_day method returns a new NepaliDate instance with time coordinates set to the final moment of the day at 23 hours, 59 minutes, 59 seconds, and 999 milliseconds. This is commonly used when setting upper boundaries for database queries, event schedules, and daily audit filters.
Import
from nepali_date_library import NepaliDateSignature
def end_of_day(self) -> NepaliDate:Parameters
- None.
Return Value
- Type:
NepaliDate - Description: New date instance set to 23:59:59.999 UTC.
Example
from nepali_date_library import NepaliDate
date = NepaliDate("2081-07-15")
day_end = date.end_of_day()
print(day_end.get_hours()) # 23
print(day_end.get_minutes()) # 59Related
date.start_of_day(): Set time to midnight.date.end_of_month(): Final day of the month.
Advertisement
date.start_of_day()
Return a new NepaliDate instance set to the first moment of the current day at midnight.
date.start_of_week()
Return a new NepaliDate instance set to the first day of the week on Sunday.