Check if current time is within the timeframe using Joda-Time
to me it looks like a simple check of number between range of numbers.
do I would do like this


turn hour and minute into one number that is hhmm to simplify the comparison
now its a simple check between range of numbers, taking into account the case of cross-date boundary


complete code:

private static void checkTimeframe(int startHour, int startMinute, int endHour, int endMinute) {
    // "concatanate" hour and minute into one number
    int startHourMinute = startHour * 100 + startMinute;
    int endHourMinute = endHour * 100 + endMinute;
    LocalDateTime now = LocalDateTime.now();
    int nowHourMinute = now.getHour() * 100 + now.getMinute();

    // if range within date - simple between boundaries check
    if (startHourMinute &lt;= endHourMinute) {
        if (nowHourMinute &gt;= startHourMinute &amp;&amp; nowHourMinute &lt;= endHourMinute) {
            System.out.println("Ok, we're within start/end");
        } else {
            System.out.println("Outside start/end");
        }
    // else (cross date boundary range) - check if now date is either within range of yesterday or within range tomorrow  
    } else {
        if (nowHourMinute &gt;= startHourMinute || nowHourMinute &lt;= endHourMinute) {
            System.out.println("Ok, we're within start/end");
        } else {
            System.out.println("Outside start/end");
        }
    }
}