問題:
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?