import hirondelle.date4j.DateTime;
import hirondelle.date4j.DateTime.DayOverflow;
import hirondelle.date4j.DateTime.MonthOverflow;
DateTime dateTime = DateTime.now("YYYY-MM-DD hh:mm:ss");
DateTime nextDay = dateTime.plusDays(1);
DateTime previousDay = dateTime.minusDays(1);
DateTime nextHour = dateTime.plusHours(1);
DateTime previousHour = dateTime.minusHours(1);
boolean isEqual = dateTime.equals(anotherDateTime);
boolean isAfter = dateTime.gt(anotherDateTime);
boolean isBefore = dateTime.lt(anotherDateTime);
String formattedDateTime = dateTime.format("YYYY-MM-DD hh:mm:ss");
int year = dateTime.getYear();
int month = dateTime.getMonth();
int day = dateTime.getDay();
int hour = dateTime.getHour();
int minute = dateTime.getMinute();
int second = dateTime.getSecond();
DateTime parsedDateTime = DateTime.forInstant("YYYY-MM-DD hh:mm:ss", "2022-01-01 12:00:00");