Difference in Days between two Java dates?

前端 未结 5 1526
南方客
南方客 2021-01-06 06:21

I want to get the difference between two Java Date objects. I\'ve used Joda-Time library. But the problem is that I\'m getting the Days greater difference than that of actua

5条回答
  •  独厮守ぢ
    2021-01-06 07:18

    Your pattern is slightly defective. mm is parsed as minutes in hour, you're looking for MM which is month of year.

提交回复
热议问题