Details
-
Wish
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.6
-
None
-
Patch
Description
It'd be nice to have a convenience method that clears the time portion of a java.util.Date and/or java.util.Calendar. There are numerous use cases where it makes sense to compare month/day/year only portions of a calendar or date. Essentially, it would perform the following on Calendar:
void clearTime() { clear(Calendar.HOUR_OF_DAY) clear(Calendar.HOUR) clear(Calendar.MINUTE) clear(Calendar.SECOND) clear(Calendar.MILLISECOND) }
Similar functionality would be nice on Date.