How to check a timeperiod is overlapping another time period in java

前端 未结 5 1389
温柔的废话
温柔的废话 2020-11-27 06:14

How to check a time period is overlapping another time period in the same day.

For example,

  1. 7:00AM to 10:30AM is overlapping 10:00AM to 11:30AM
5条回答
  •  感动是毒
    2020-11-27 06:47

    JOda Time has this functionality baked in. It's very well-built and on JSR route to replace the broken Java Calendar API. You should probably considering using it.

提交回复
热议问题