Replace function next_day_instant with next_instant and previous_day_instant with previous_instant.