decidePastPresentFuture static method
Implementation
static TimePoint decidePastPresentFuture(int year, int month, int day) {
if (thisYear() < year) {
return TimePoint.future;
} else if (thisYear() > year) {
return TimePoint.past;
} else {
if (thisMonth() < month) {
return TimePoint.future;
} else if (thisMonth() > month) {
return TimePoint.past;
} else {
if (thisDay() < day) {
if (thisDay() + 1 == day) {
return TimePoint.tomorrow;
} else {
return TimePoint.future;
}
} else if (thisDay() > day) {
return TimePoint.past;
} else {
return TimePoint.present;
}
}
}
}