Examples of plusMonths()


Examples of org.joda.time.Period.plusMonths()

  }

  private Object readSingleObject() {

      Period p = new Period();
      return p.plusMonths(holder.months).plusDays(holder.days).plusMillis(holder.milliSeconds);

  }

}
View Full Code Here

Examples of org.joda.time.Period.plusMonths()

  @Override
  public Period readPeriod(){

      Period p = new Period();
      return p.plusMonths(holder.months).plusDays(holder.days).plusMillis(holder.milliSeconds);


  }

  @Override
View Full Code Here

Examples of org.joda.time.Period.plusMonths()

  }

  private Object readSingleObject() {

      Period p = new Period();
      return p.plusMonths(holder.months).plusDays(holder.days).plusMillis(holder.milliSeconds);

  }

}
View Full Code Here

Examples of org.joda.time.YearMonthDay.plusMonths()

                        builder.append("<td style=\"width: ").append(convertToEm(numberOfUnits))
                                .append("em;\"><div style=\"position: relative;\">");
                    }

                    if (getViewTypeEnum() == ViewType.YEAR_DAILY) {
                        if (dayOfMonth > yearMonthDay.plusMonths(1).minusDays(1).getDayOfMonth()) {
                            addEmptyDiv(builder);
                            builder.append("</div></td>");
                            continue;
                        }
                    }
View Full Code Here

Examples of org.joda.time.YearMonthDay.plusMonths()

                    }
                    if (!isEventToMarkWeekendsAndHolidays) {
                        builder.append("</div></td>");
                    } else if (!specialDiv) {
                        builder.append("<td class=\"tdnomark\">");
                        if (dayOfMonth <= yearMonthDay.plusMonths(1).minusDays(1).getDayOfMonth()) {
                            LocalDate localDate = yearMonthDay.withDayOfMonth(dayOfMonth).toLocalDate();
                            if (Holiday.isHoliday(localDate)) {
                                builder.append(F);
                            } else if (localDate.getDayOfWeek() == SATURDAY_IN_JODA_TIME) {
                                builder.append("S");
View Full Code Here

Examples of org.joda.time.YearMonthDay.plusMonths()

                    DateTime firstDayOfMonth = (month.getDayOfMonth() != 1) ? month.withDayOfMonth(1) : month;
                    DateTime lastDayOfMonth = firstDayOfMonth.plusMonths(1).minusDays(1);
                    int monthNumberOfDays = Days.daysBetween(firstDayOfMonth, lastDayOfMonth).getDays() + 1;
                    nextUrl =
                            getRequest().getContextPath() + getMonthlyViewUrl() + "&amp;" + getFirstDayParameter() + "="
                                    + firstDay.plusMonths(1).toString("ddMMyyyy");
                    beforeUrl =
                            getRequest().getContextPath() + getMonthlyViewUrl() + "&amp;" + getFirstDayParameter() + "="
                                    + firstDay.minusMonths(1).toString("ddMMyyyy");
                    builder.append("<tr><td class=\"tcalendarlinks\"></td><td colspan=\"").append(monthNumberOfDays)
                            .append("\" class=\"acenter tcalendarlinks\"><span class=\"smalltxt\"><a href=\"").append(beforeUrl)
View Full Code Here

Examples of org.joda.time.YearMonthDay.plusMonths()

                    DateTime firstDayOfMonth = (month.getDayOfMonth() != 1) ? month.withDayOfMonth(1) : month;
                    DateTime lastDayOfMonth = firstDayOfMonth.plusMonths(1).minusDays(1);
                    int monthNumberOfDays = Days.daysBetween(firstDayOfMonth, lastDayOfMonth).getDays() + 1;
                    nextUrl =
                            getRequest().getContextPath() + getMonthlyViewUrl() + "&amp;" + getFirstDayParameter() + "="
                                    + firstDay.plusMonths(1).toString("ddMMyyyy");
                    beforeUrl =
                            getRequest().getContextPath() + getMonthlyViewUrl() + "&amp;" + getFirstDayParameter() + "="
                                    + firstDay.minusMonths(1).toString("ddMMyyyy");
                    builder.append("<tr><td class=\"tcalendarlinks\"></td><td colspan=\"").append(monthNumberOfDays)
                            .append("\" class=\"acenter tcalendarlinks\"><span class=\"smalltxt\"><a href=\"").append(beforeUrl)
View Full Code Here

Examples of org.joda.time.YearMonthDay.plusMonths()

    private ActionForward generateGanttDiagram(ActionMapping mapping, HttpServletRequest request, CalendarEntryBean bean) {

        YearMonthDay beginDate = bean.getBeginDateToDisplayInYearMonthDayFormat();
        YearMonthDay endDate = bean.getEndDateToDisplayInYearMonthDayFormat();

        endDate = endDate.plusMonths(1).withDayOfMonth(1).minusDays(1);

        List<GanttDiagramEvent> newEntries = generateEntriesTree(request, bean.getRootEntry(), beginDate, endDate);
        GanttDiagram diagram = GanttDiagram.getNewTotalGanttDiagram(newEntries, beginDate, endDate);

        request.setAttribute("entryBean", bean);
View Full Code Here

Examples of org.threeten.bp.LocalDate.plusMonths()

      throw new IllegalArgumentException("Start date and end date were the same but neither was the first day of the month");
    }
    final List<LocalDate> dates = new ArrayList<>();
    LocalDate date = startDate.with(TemporalAdjusters.firstDayOfMonth());
    if (date.isBefore(startDate)) {
      date = date.plusMonths(1);
    }
    while (!date.isAfter(endDate)) {
      dates.add(date);
      date = date.plusMonths(1);
    }
View Full Code Here

Examples of org.threeten.bp.YearMonth.plusMonths()

    // plusMonths()
    //-----------------------------------------------------------------------
    @Test
    public void test_plusMonths_long() {
        YearMonth test = YearMonth.of(2008, 6);
        assertEquals(test.plusMonths(1), YearMonth.of(2008, 7));
    }

    @Test
    public void test_plusMonths_long_noChange_equal() {
        YearMonth test = YearMonth.of(2008, 6);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.