title: Java Date comparison: Dates in different formats
body: <p>I have two dates in String format as: say <code>String date1 = 2018-08-29</code> and in <code>ISO-OFFSET_DATE_TIME</code> format as <code>String date2 = 2018-08-30T00:00:00+10:00</code>. What is the best way to compare date1 and date2 for equality? I am not concerned about time, only day, year and month matters. Should I be converting them to instant and compare? </p>