Package org.joda.time

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


        Thread.sleep(25);

        userService.updateLastLoginTime(user);

        DateTime dateTimeAfter = user.getLastLogin();
        assertEquals(dateTimeAfter.compareTo(dateTimeBefore), 1, "last login time lesser than before test");
        verify(userDao).saveOrUpdate(user);
    }

    @Test
    public void testRestorePassword() throws NotFoundException, MailingFailedException {
View Full Code Here


        Collection<Bitemporal> toEnd = getItemsThatNeedToBeEnded(newValue);

        Collection<Bitemporal> toAdd = new LinkedList<Bitemporal>();
        DateTime validityStartOfNewValue = newValue.getValidityInterval().getStart();
        for (Bitemporal validOnStartOfNewValue : get(validityStartOfNewValue, TimeUtils.now())) {
            if (validityStartOfNewValue.compareTo(validOnStartOfNewValue.getValidityInterval().getStart()) > 0) {
                Interval validityInterval = TimeUtils.interval(
                        validOnStartOfNewValue.getValidityInterval().getStart(),
                        validityStartOfNewValue);
                toAdd.add(validOnStartOfNewValue.copyWith(validityInterval));
            }
View Full Code Here

        }

        if (!(newValue.getValidityInterval().getEnd().getMillis() == TimeUtils.ACTUAL_END_OF_TIME)) {
            DateTime validityEndOfNewValue = newValue.getValidityInterval().getEnd();
            for (Bitemporal validOnEndOfNewValue : get(validityEndOfNewValue, TimeUtils.now())) {
                if (validityEndOfNewValue.compareTo(validOnEndOfNewValue.getValidityInterval().getStart()) > 0) {
                    Interval validityInterval = TimeUtils.interval(validityEndOfNewValue,
                            validOnEndOfNewValue.getValidityInterval().getEnd());
                    toAdd.add(validOnEndOfNewValue.copyWith(validityInterval));
                }
            }
View Full Code Here

    }

    public boolean isSubmissionPeriodOpen() {
        DateTime currentDateTime = new DateTime();

        if ((currentDateTime.compareTo(getProjectBeginDateTime()) < 0)
                || (currentDateTime.compareTo(getProjectEndDateTime()) > 0)) {
            return false;
        } else {
            return true;
        }
View Full Code Here

    public boolean isSubmissionPeriodOpen() {
        DateTime currentDateTime = new DateTime();

        if ((currentDateTime.compareTo(getProjectBeginDateTime()) < 0)
                || (currentDateTime.compareTo(getProjectEndDateTime()) > 0)) {
            return false;
        } else {
            return true;
        }
    }
View Full Code Here

        long valuation = totals[0] = snapshot.getAssets();

        // calculate series
        int index = 1;
        DateTime date = interval.getStart().plusDays(1);
        while (date.compareTo(interval.getEnd()) <= 0)
        {
            dates[index] = date.toDate();

            snapshot = ClientSnapshot.create(getClient(), dates[index]);
            long thisValuation = totals[index] = snapshot.getAssets();
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.