[Solved] How can I compare two hours in java?


instead of

nowh.before(enh) && nowh.after(sth)

use

nowh.before(enh) && nowh.after(sth) && sth.before(enh)
|| enh.before(sth) && !(nowh.before(enh) && nowh.after(sth))

Apart from that I think Calendar class is supposed to be used differently I assume…

solved How can I compare two hours in java?