long TIME = utcTimeInMillis("2009-02-03T01:01:01");
MutableDateTime time = new MutableDateTime(DateTimeZone.UTC);
time.setMillis(TIME);
assertThat(time.monthOfYear().roundFloor().toString(), equalTo("2009-02-01T00:00:00.000Z"));
time.setMillis(TIME);
assertThat(time.hourOfDay().roundFloor().toString(), equalTo("2009-02-03T01:00:00.000Z"));
time.setMillis(TIME);
assertThat(time.dayOfMonth().roundFloor().toString(), equalTo("2009-02-03T00:00:00.000Z"));
}
@Test public void testRoundingSetOnTime() {