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 NepaliDateSignature
def is_after(self, date: NepaliDate) -> bool:Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
date | NepaliDate | Yes | Target date to compare against. |
Return Value
- Type:
bool - Description: Returns
Trueifselfis chronologically later thandate.
Example
from nepali_date_library import NepaliDate
d1 = NepaliDate("2081-01-15")
d2 = NepaliDate("2081-01-01")
print(d1.is_after(d2)) # TrueRelated
date.is_before(): Check if earlier in time.date.is_equal(): Check calendar date equality.
Advertisement
date.is_before()
Check whether the current date occurs chronologically before another specified date.
date.is_equal()
Check whether two date instances share the exact same calendar date coordinates regardless of time.