Skip to content

Commit d25eda2

Browse files
eviltestereviltester
authored andcommitted
amended week of year
1 parent 4bfc15f commit d25eda2

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

source/src/test/java/com/javafortesters/chap017_datestimes/exercises/DateTimeExercisesTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ public void experimentWithCalendarConstants(){
8080

8181
assertThat(cal.get(Calendar.DAY_OF_WEEK), is(1));
8282
assertThat(cal.get(Calendar.DAY_OF_WEEK), is(Calendar.SUNDAY));
83-
assertThat(cal.get(Calendar.WEEK_OF_YEAR), is(50));
8483
assertThat(cal.get(Calendar.DAY_OF_YEAR), is(349));
8584

8685
// week of month depends on first day of week
@@ -90,6 +89,10 @@ public void experimentWithCalendarConstants(){
9089
cal.setFirstDayOfWeek(Calendar.MONDAY);
9190
cal.setMinimalDaysInFirstWeek(6);
9291
assertThat(cal.get(Calendar.WEEK_OF_MONTH), is(2));
92+
93+
// Week of the year, similarly requires the
94+
// config to control first day
95+
assertThat(cal.get(Calendar.WEEK_OF_YEAR), is(50));
9396
}
9497

9598
@Test

0 commit comments

Comments
 (0)