/** * Converts this object to an Interval representing the whole month. * <p> * The interval will use the chronology of the year-month in the specified zone. * <p> * This instance is immutable and unaffected by this method call. * * @param zone the zone to get the Interval in, null means default * @return an interval over the month, never null */ public Interval toInterval(DateTimeZone zone) { zone = DateTimeUtils.getZone(zone); DateTime start = toLocalDate(1).toDateTimeAtStartOfDay(zone); DateTime end = plusMonths(1).toLocalDate(1).toDateTimeAtStartOfDay(zone); return new Interval(start, end); }
/** * Converts this object to an Interval representing the whole month. * <p> * The interval will use the chronology of the year-month in the specified zone. * <p> * This instance is immutable and unaffected by this method call. * * @param zone the zone to get the Interval in, null means default * @return an interval over the month, never null */ public Interval toInterval(DateTimeZone zone) { zone = DateTimeUtils.getZone(zone); DateTime start = toLocalDate(1).toDateTimeAtStartOfDay(zone); DateTime end = plusMonths(1).toLocalDate(1).toDateTimeAtStartOfDay(zone); return new Interval(start, end); }
/** * Converts this object to an Interval representing the whole month. * <p> * The interval will use the chronology of the year-month in the specified zone. * <p> * This instance is immutable and unaffected by this method call. * * @param zone the zone to get the Interval in, null means default * @return an interval over the month, never null */ public Interval toInterval(DateTimeZone zone) { zone = DateTimeUtils.getZone(zone); DateTime start = toLocalDate(1).toDateTimeAtStartOfDay(zone); DateTime end = plusMonths(1).toLocalDate(1).toDateTimeAtStartOfDay(zone); return new Interval(start, end); }
private List<YearMonth> getMonths(Date intervalFrom, Date intervalTo) { int intervalColumnsCount = getIntervalColumnsCount(intervalFrom, intervalTo); List<YearMonth> months = new ArrayList<>(); YearMonth yearMonth = new YearMonth(intervalFrom); for (int i = 0; i < intervalColumnsCount; i++) { months.add(yearMonth); yearMonth = yearMonth.plusMonths(1); } return months; }
/** * Converts this object to an Interval representing the whole month. * <p> * The interval will use the chronology of the year-month in the specified zone. * <p> * This instance is immutable and unaffected by this method call. * * @param zone the zone to get the Interval in, null means default * @return an interval over the month, never null */ public Interval toInterval(DateTimeZone zone) { zone = DateTimeUtils.getZone(zone); DateTime start = toLocalDate(1).toDateTimeAtStartOfDay(zone); DateTime end = plusMonths(1).toLocalDate(1).toDateTimeAtStartOfDay(zone); return new Interval(start, end); }
/** * Converts this object to an Interval representing the whole month. * <p> * The interval will use the chronology of the year-month in the specified zone. * <p> * This instance is immutable and unaffected by this method call. * * @param zone the zone to get the Interval in, null means default * @return an interval over the month, never null */ public Interval toInterval(DateTimeZone zone) { zone = DateTimeUtils.getZone(zone); DateTime start = toLocalDate(1).toDateTimeAtStartOfDay(zone); DateTime end = plusMonths(1).toLocalDate(1).toDateTimeAtStartOfDay(zone); return new Interval(start, end); }
/** * Converts this object to an Interval representing the whole month. * <p> * The interval will use the chronology of the year-month in the specified zone. * <p> * This instance is immutable and unaffected by this method call. * * @param zone the zone to get the Interval in, null means default * @return an interval over the month, never null */ public Interval toInterval(DateTimeZone zone) { zone = DateTimeUtils.getZone(zone); DateTime start = toLocalDate(1).toDateTimeAtStartOfDay(zone); DateTime end = plusMonths(1).toLocalDate(1).toDateTimeAtStartOfDay(zone); return new Interval(start, end); }
/** * Converts this object to an Interval representing the whole month. * <p> * The interval will use the chronology of the year-month in the specified zone. * <p> * This instance is immutable and unaffected by this method call. * * @param zone the zone to get the Interval in, null means default * @return an interval over the month, never null */ public Interval toInterval(DateTimeZone zone) { zone = DateTimeUtils.getZone(zone); DateTime start = toLocalDate(1).toDateTimeAtStartOfDay(zone); DateTime end = plusMonths(1).toLocalDate(1).toDateTimeAtStartOfDay(zone); return new Interval(start, end); }
/** * Converts this object to an Interval representing the whole month. * <p> * The interval will use the chronology of the year-month in the specified zone. * <p> * This instance is immutable and unaffected by this method call. * * @param zone the zone to get the Interval in, null means default * @return an interval over the month, never null */ public Interval toInterval(DateTimeZone zone) { zone = DateTimeUtils.getZone(zone); DateTime start = toLocalDate(1).toDateTimeAtStartOfDay(zone); DateTime end = plusMonths(1).toLocalDate(1).toDateTimeAtStartOfDay(zone); return new Interval(start, end); }
/** * Converts this object to an Interval representing the whole month. * <p> * The interval will use the chronology of the year-month in the specified zone. * <p> * This instance is immutable and unaffected by this method call. * * @param zone the zone to get the Interval in, null means default * @return an interval over the month, never null */ public Interval toInterval(DateTimeZone zone) { zone = DateTimeUtils.getZone(zone); DateTime start = toLocalDate(1).toDateTimeAtStartOfDay(zone); DateTime end = plusMonths(1).toLocalDate(1).toDateTimeAtStartOfDay(zone); return new Interval(start, end); }
/** * Converts this object to an Interval representing the whole month. * <p> * The interval will use the chronology of the year-month in the specified zone. * <p> * This instance is immutable and unaffected by this method call. * * @param zone the zone to get the Interval in, null means default * @return an interval over the month, never null */ public Interval toInterval(DateTimeZone zone) { zone = DateTimeUtils.getZone(zone); DateTime start = toLocalDate(1).toDateTimeAtStartOfDay(zone); DateTime end = plusMonths(1).toLocalDate(1).toDateTimeAtStartOfDay(zone); return new Interval(start, end); }