如何在沒有時間部分的情況下比較兩個日期? - 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?
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章