Код: Выделить всё
if (localTimeNow.isAfter(startShift.minus(1, ChronoUnit.HOURS)) &&
localTimeNow.isBefore(endShift)) {
Toast.makeText(this, "In shift", Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(this, "Not in shift", Toast.LENGTH_SHORT).show();
}
Любое предложение о логике здесь?
Подробнее здесь: https://stackoverflow.com/questions/690 ... uding-past