@Test public void thisMonth() throws Exception { DateTimePeriod period = DateTimePeriodSelector.thisMonth(DateTimeZone.UTC); DateTime now = new DateTime(DateTimeZone.UTC); DateTimePeriod expectedPeriod = DateTimePeriod.createMonth(now.getYear(), now.getMonthOfYear(), DateTimeZone.UTC); Assert.assertEquals(expectedPeriod, period); }
static public DateTimePeriod thisMonth(DateTimeZone zone) { DateTime now = new DateTime(zone); return DateTimePeriod.createMonth(now.getYear(), now.getMonthOfYear(), zone); }
DateTimePeriodSelector { static public DateTimePeriod thisMonth(DateTimeZone zone) { DateTime now = new DateTime(zone); return DateTimePeriod.createMonth(now.getYear(), now.getMonthOfYear(), zone); } }
DateTimePeriodSelector { static public DateTimePeriod thisMonth(DateTimeZone zone) { DateTime now = new DateTime(zone); return DateTimePeriod.createMonth(now.getYear(), now.getMonthOfYear(), zone); } private  DateTimePeriodSelector(); }
DateTimePeriodSelector { static public DateTimePeriod thisMonth(DateTimeZone zone) { DateTime now = new DateTime(zone); return DateTimePeriod.createMonth(now.getYear(), now.getMonthOfYear(), zone); } private  DateTimePeriodSelector(); static DateTimePeriod thisMonth(DateTimeZone zone); static DateTimePeriod lastMonth(DateTimeZone zone); static List<DateTimePeriod> last12Months(DateTimeZone zone); }
DateTimePeriodSelector { static public DateTimePeriod thisMonth(DateTimeZone zone) { DateTime now = new DateTime(zone); return DateTimePeriod.createMonth(now.getYear(), now.getMonthOfYear(), zone); } private  DateTimePeriodSelector(); static DateTimePeriod thisMonth(DateTimeZone zone); static DateTimePeriod lastMonth(DateTimeZone zone); static List<DateTimePeriod> last12Months(DateTimeZone zone);  }