Nepali DateNepali DateBikram Sambat Date Engine
Methods

date.is_after()

Check whether the current date occurs chronologically after another specified date.

The is_after method evaluates whether the current NepaliDate instance occurs chronologically later than another date or timestamp. It compares exact millisecond values to determine chronological order accurately.


Import

from nepali_date_library import NepaliDate

Signature

def is_after(self, date: NepaliDate) -> bool:

Parameters

ParameterTypeRequiredDescription
dateNepaliDateYesTarget date to compare against.

Return Value

  • Type: bool
  • Description: Returns True if self is chronologically later than date.

Example

from nepali_date_library import NepaliDate

d1 = NepaliDate("2081-01-15")
d2 = NepaliDate("2081-01-01")

print(d1.is_after(d2)) # True

Advertisement

On this page