-
-
Notifications
You must be signed in to change notification settings - Fork 2
incendium.date.compare
César Román edited this page Apr 30, 2024
·
8 revisions
Compare two dates.
Args:
Returns:
- int:
0
ifdate_1
anddate_2
are equal,-1
Ifdate_2
is greater thandate_1
,1
Ifdate_1
is greater thandate_2
.
None.
from __future__ import print_function
import incendium.date
import system.date
date_1 = system.date.now()
date_2 = system.date.addDays(date_1, 7)
print(incendium.date.compare(date_1, date_2)) # Output: -1