public static ChronoUnit toChronoUnit(final TimeUnit tu) {
        if (tu == null) {
            return null;
        }
        return switch (tu) {
            case DAYS -> ChronoUnit.DAYS;
            case HOURS -> ChronoUnit.HOURS;
            case MINUTES -> ChronoUnit.MINUTES;
            case MICROSECONDS -> ChronoUnit.MICROS;
            case MILLISECONDS -> ChronoUnit.MILLIS;
            case NANOSECONDS -> ChronoUnit.NANOS;
            case SECONDS -> ChronoUnit.SECONDS;
        };
    }
To chrono unit.

@param tu the tu
@return the chrono unit
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/DateTimeUtils.java