How do I compare dates in between in Java? (如何在Java之间比较日期?)
Example: (例:)
date1 is 22-02-2010
(date1是22-02-2010
)
date2 is 07-04-2010
today (date2是今天的07-04-2010
)
date3 is 25-12-2010
(date3是25-12-2010
)
date3
is always greater than date1
and date2
is always today. (date3
始终大于date1
, date2
始终是今天。) How do I verify if today's date is in between date1 and date 3? (如何验证今天的日期是否在date1和date 3之间?)