Comparing Day part of a Date in Java

I never knew this existed, but I’m glad it does-

If you want to compare the date part of a Date (disregarding the time) use Apache commons DateUtil.  It’s got a lot of other great utilities like adding parts to days and getting an iterator that will cycle through days, months, hours etc, returning a Calendar object corresponding to each segment.

http://commons.apache.org/lang/api-2.5/org/apache/commons/lang/time/DateUtils.html

Special thanks to the blog below for pointing this out-

http://msanjay.weblogs.us/software-designer/?p=975

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s