如何在没有时间部分的情况下比较两个日期? - How to compare two Dates without the time portion?

问题:

I would like to have a compareTo method that ignores the time portion of a java.util.Date.我想要一个 compareTo 方法来忽略 java.util.Date 的时间部分。 I guess there are a number of ways to solve this.我想有很多方法可以解决这个问题。 What's the simplest way?最简单的方法是什么?


解决方案:

参考一: https://stackoom.com/question/62YF
参考二: How to compare two Dates without the time portion?
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章