compareDateTimeToNow static method
Implementation
static int compareDateTimeToNow(DateTime dateTime) {
DateTime now = DateTime.now();
int result = dateTime.compareTo(DateTime.now());
if (result == -1) {
if (dateTime.year == now.year &&
dateTime.month == now.month &&
dateTime.day == now.day) {
return 0;
}
return -1;
}
return result;
}