Number of days between two dates in Joda-Time

后端 未结 8 1309
北恋
北恋 2020-11-22 09:07

How do I find the difference in Days between two Joda-Time DateTime instances? With ‘difference in days’ I mean if start is on Monday and end is on Tuesday I expect a return

8条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-22 09:49

    you can use LocalDate:

    Days.daysBetween(new LocalDate(start), new LocalDate(end)).getDays() 
    

提交回复
热议问题