Package org.joda.time

Examples of org.joda.time.DateTime.plusDays()


                for (int x = 0; x < visibleDays; x++) {
                    g.setClip(new Rectangle2D.Double(x * dayWidth, 0,
                            dayWidth, columnHeaderHeight));
                    g.drawString(fmt.print(tempDateTime),
                            xTextOffset + x * dayWidth, yHeaderTextOffset);
                    tempDateTime = tempDateTime.plusDays(1);
                }
                g.setClip(oldClip);
            }
        };

View Full Code Here


          - start.getMillis());

      for (int j = 0; j < 1; j++) {
        for (int i = 0; i < duration.days() + 1; i++) {
          DateTime calendar = start;
          calendar = calendar.plusDays(i).withHourOfDay(
              6 + random.nextInt(10));

          Event event = new Event();
          int id = (int) (j * duration.days() + i);
          event.setId("" + id);
View Full Code Here

    }

    private void setOffsetDays(int startOffset, int endOffset) {
        setCaption(DEFAULT_CAPTION);
        DateTime today = getValue() != null ? new DateTime(getValue().getTime())  : new DateTime();
        Date end = today.plusDays(startOffset).toDate();
        Date start = today.minusDays(endOffset).toDate();
        setValue(today.toDate());
        setDateFormat("yyyy-MM-dd");
        setRangeStart(start);
        setRangeEnd(end);
View Full Code Here

                    timeZoneOffset = STANDARD_OFFSET;
                }
            }
            if (hour == "24") {
                adjustedHour = "00";
                dateTime = dateTime.plusDays(1);
            }

            dateTime = dateTime.withHourOfDay(Integer.valueOf(adjustedHour)).withZoneRetainFields(
                    DateTimeZone.forID(timeZoneOffset));
            result = isoFormat.print(dateTime);
View Full Code Here

        final DateTime today = clockService.now().toDateTimeAtStartOfDay();
       
        if(dueBy.isBefore(today)) {
            return DateRange.OverDue;
        }
        if(dueBy.isBefore(today.plusDays(1))) {
            return DateRange.Today;
        }
        if(dueBy.isBefore(today.plusDays(2))) {
            return DateRange.Tomorrow;
        }
View Full Code Here

            return DateRange.OverDue;
        }
        if(dueBy.isBefore(today.plusDays(1))) {
            return DateRange.Today;
        }
        if(dueBy.isBefore(today.plusDays(2))) {
            return DateRange.Tomorrow;
        }
        if(dueBy.isBefore(today.plusDays(7))) {
            return DateRange.ThisWeek;
        }
View Full Code Here

            return DateRange.Today;
        }
        if(dueBy.isBefore(today.plusDays(2))) {
            return DateRange.Tomorrow;
        }
        if(dueBy.isBefore(today.plusDays(7))) {
            return DateRange.ThisWeek;
        }
        return DateRange.Later;
    }
    //endregion
View Full Code Here

        final DateTime today = clockService.now().toDateTimeAtStartOfDay();
       
        if(dueBy.isBefore(today)) {
            return DateRange.OverDue;
        }
        if(dueBy.isBefore(today.plusDays(1))) {
            return DateRange.Today;
        }
        if(dueBy.isBefore(today.plusDays(2))) {
            return DateRange.Tomorrow;
        }
View Full Code Here

            return DateRange.OverDue;
        }
        if(dueBy.isBefore(today.plusDays(1))) {
            return DateRange.Today;
        }
        if(dueBy.isBefore(today.plusDays(2))) {
            return DateRange.Tomorrow;
        }
        if(dueBy.isBefore(today.plusDays(7))) {
            return DateRange.ThisWeek;
        }
View Full Code Here

            return DateRange.Today;
        }
        if(dueBy.isBefore(today.plusDays(2))) {
            return DateRange.Tomorrow;
        }
        if(dueBy.isBefore(today.plusDays(7))) {
            return DateRange.ThisWeek;
        }
        return DateRange.Later;
    }
    //endregion
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.