I get time from server in format { "from" : "12-00", "to" : "01-00" } Then, I parse it like this
DateTimeFormat.forPattern("HH:mm").parseDateTime(dateString)
Then, I need to check if current time is in this hour range:
Interval(from, to).containsNow()
Interval constructor throws error because second date more than first DateTime object time is 1970-01-01T12:00:00.000Z and 1970-01-01T01:00:00.000Z
How can I check if current hour is in hour range? Is there any hour range in Joda?