Joda-Time
The Joda-Time 2.3 library makes this work much easier. It includes an Interval class with an overlap
method.
See the answer by MadProgrammer for similar code and discussion.
Key Points
The Interval class is smart, considering the beginning of interval to be inclusive and the ending exclusive. You should make comparisons based on the logic of EQUAL TO OR GREATER THAN the start but LESS THAN the stop. Why? Because the moment before the new day is infinitely divisible. You may think, "Well java.util.Date & Joda-Time resolve to milliseconds so I'll use .999". But then you'll be surprised when you port code to Java 8's new java.time.* classes where time resolves to nanoseconds.

To support this comparison, notice that the target week is defined with a call to withTimeAtStartOfDay
. Use this method rather than trying to create a midnight by setting zero time elements. This method is smart and handles Daylight Saving Time and other anomalies where there may not be a 00:00:00 midnight time on certain days in certain time zones.
Specify a time zone rather than rely on defaults. All the code in other answers fail to address the time zone. That means they use the default time zone of the JVM. As a consequence, this app gets different results when deployed to other machines set to other time zones. Use proper time zone names, never 3-letter codes.
If your app applies to people and places across time zones, you should consider basing the target week on UTC/GMT (no time zone offset). Notice that is what StackOverflow does in tracking your activity day by day. A "day" is defined by UTC/GMT.
These points are evidence why you should not roll your own date-time logic. Use a competent library instead. In Java, that means either Joda-Time or the new java.time.* classes in Java 8 (inspired by Joda-Time).
ISO Week
By the way, the ISO 8601 standard defines a "week" precisely. More companies and industries in various countries are adopting this standard. Following that standard may prove useful. A Joda-Time DateTime instance knows its ISO week number. Call myDateTime.weekOfWeakYear().get()
.
Example Code
DateTimeZone timeZone = DateTimeZone.forID( "Europe/Berlin" );
Interval weekInQuestion = new Interval( new DateTime( 2014, 1, 20, 3, 4, 5, timeZone ).withTimeAtStartOfDay(), new DateTime( 2014, 1, 27, 3, 4, 5, timeZone ).withTimeAtStartOfDay() );
Interval i1 = new Interval( new DateTime( 2014, 1, 2, 3, 4, 5, timeZone ), new DateTime( 2014, 1, 3, 23, 4, 5, timeZone ) );
Interval i2 = new Interval( new DateTime( 2014, 1, 24, 3, 4, 5, timeZone ), new DateTime( 2014, 1, 26, 23, 59, 59, timeZone ) );
Interval i3 = new Interval( new DateTime( 2014, 1, 6, 3, 4, 5, timeZone ), new DateTime( 2014, 1, 30, 3, 4, 5, timeZone ) );
boolean i1HitsWeekInQuestion = i1.overlaps( weekInQuestion );
boolean i2HitsWeekInQuestion = i2.overlaps( weekInQuestion );
boolean i3HitsWeekInQuestion = i3.overlaps( weekInQuestion );
Dump to console…
System.out.println( "weekInQuestion: " + weekInQuestion );
System.out.println( "i1: " + i1 + " hits week: " + i1HitsWeekInQuestion );
System.out.println( "i2: " + i2 + " hits week: " + i2HitsWeekInQuestion );
System.out.println( "i3: " + i3 + " hits week: " + i3HitsWeekInQuestion );
When run…
weekInQuestion: 2014-01-20T00:00:00.000+01:00/2014-01-27T00:00:00.000+01:00
i1: 2014-01-02T03:04:05.000+01:00/2014-01-03T23:04:05.000+01:00 hits week: false
i2: 2014-01-24T03:04:05.000+01:00/2014-01-26T23:59:59.000+01:00 hits week: true
i3: 2014-01-06T03:04:05.000+01:00/2014-01-30T03:04:05.000+01:00 hits week: true