Examples of plusYears()


Examples of org.joda.time.DateMidnight.plusYears()

            int days = Days.daysBetween(start, current).getDays();
            int y = xAxis.getPixelCoordinate((double) days * range.upper / (double) totalDays);
            e.gc.drawLine(y, 0, y, e.height);
            e.gc.drawText(String.valueOf(current.getYear()), y + 5, 5);

            current = current.plusYears(1);
        }
    }
}
View Full Code Here

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

            fail();
        } catch (IllegalFieldValueException e) {
        }

        try {
            end.plusYears(1);
            fail();
        } catch (IllegalFieldValueException e) {
        }

        assertEquals(maxYear + 1, chrono.year().get(Long.MAX_VALUE));
View Full Code Here

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

            fail();
        } catch (IllegalFieldValueException e) {
        }

        try {
            end.plusYears(1);
            fail();
        } catch (IllegalFieldValueException e) {
        }

        assertEquals(maxYear + 1, chrono.year().get(Long.MAX_VALUE));
View Full Code Here

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

          DateTime delivery = new DateTime(expire);

          if (delMonth < expire.getMonthOfYear()) {
            // Year rollover, advance a year before setting month
            delivery = delivery.plusYears(1);
          }

          delivery = delivery.withMonthOfYear(delMonth);
          cal.add(new DefaultEvent(Event.Type.LAST_DELIVERY_DATE, delivery));
View Full Code Here

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

     */
    protected List<String> populateExpirationYears() {
        List<String> expirationYears = new ArrayList<String>();
        DateTime dateTime = new DateTime();
        for (int i=0; i<10; i++){
            expirationYears.add(dateTime.plusYears(i).getYear()+"");
        }
        return expirationYears;
    }

}
View Full Code Here

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

                    assertEquals(sessionId, eventSession.getEventSessionId());
                    final Set<AggregatedGroupMapping> groupMappings = eventSession.getGroupMappings();
                    assertEquals(2, groupMappings.size());
                    timeStamp = loginEvent.getTimestampAsDate();
                }
                eventSessionDao.purgeEventSessionsBefore(timeStamp.plusYears(1));
            }
        });

    }
}
View Full Code Here

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

        assertFunction("date_add('hour', 3, " + seconds + ")", getSeconds(dateTime.plusHours(3)));
        assertFunction("date_add('day', 3, " + seconds + ")", getSeconds(dateTime.plusDays(3)));
        assertFunction("date_add('week', 3, " + seconds + ")", getSeconds(dateTime.plusWeeks(3)));
        assertFunction("date_add('month', 3, " + seconds + ")", getSeconds(dateTime.plusMonths(3)));
        assertFunction("date_add('quarter', 3, " + seconds + ")", getSeconds(dateTime.plusMonths(3 * 3)));
        assertFunction("date_add('year', 3, " + seconds + ")", getSeconds(dateTime.plusYears(3)));
        assertFunction("date_add('century', 3, " + seconds + ")", fromMillis(CENTURY_FIELD.add(dateTime.getMillis(), 3)));
    }

    @Test
    public void testDateDiff()
View Full Code Here

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

        assertFunction("date_add('hour', 3, " + seconds + ")", getSeconds(dateTime.plusHours(3)));
        assertFunction("date_add('day', 3, " + seconds + ")", getSeconds(dateTime.plusDays(3)));
        assertFunction("date_add('week', 3, " + seconds + ")", getSeconds(dateTime.plusWeeks(3)));
        assertFunction("date_add('month', 3, " + seconds + ")", getSeconds(dateTime.plusMonths(3)));
        assertFunction("date_add('quarter', 3, " + seconds + ")", getSeconds(dateTime.plusMonths(3 * 3)));
        assertFunction("date_add('year', 3, " + seconds + ")", getSeconds(dateTime.plusYears(3)));
        assertFunction("date_add('century', 3, " + seconds + ")", fromMillis(CENTURY_FIELD.add(dateTime.getMillis(), 3)));
    }

    @Test
    public void testDateDiff()
View Full Code Here

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

          DateTime delivery = new DateTime(expire);

          if (delMonth < expire.getMonthOfYear()) {
            // Year rollover, advance a year before setting month
            delivery = delivery.plusYears(1);
          }

          delivery = delivery.withMonthOfYear(delMonth);
          cal.add(new DefaultEvent(Event.Type.LAST_DELIVERY_DATE, delivery));
View Full Code Here

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

        }
        else if (consolidateType == ConsolidateType.daily) {
            DateTime start = interval.getStart().withDayOfYear(1).withMillisOfDay(0);
            do {
                dataManager.getDataLength(start);
                start = start.plusYears(1);
            }
            while (start.isBefore(interval.getEnd()));
        }
        else {
            dataManager.getData(interval, new TagLists(), TagType.Account, AggregateType.both, false);
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.