Example usage for org.joda.time Interval containsNow

List of usage examples for org.joda.time Interval containsNow

Introduction

In this page you can find the example usage for org.joda.time Interval containsNow.

Prototype

public boolean containsNow() 

Source Link

Document

Does this time interval contain the current instant.

Usage

From source file:module.mobility.domain.JobOffer.java

License:Open Source License

public boolean isInCandidacyPeriod() {
    Interval candidacyPeriod = getCandidacyPeriod();
    return !getCanceled() && candidacyPeriod != null && candidacyPeriod.containsNow();
}

From source file:module.siadap.domain.wrappers.UnitSiadapWrapper.java

License:Open Source License

public static boolean isHarmonizationPeriodOpen(SiadapYearConfiguration configuration) {
    if (configuration == null || configuration.getFirstLevelHarmonizationBegin() == null) {
        return false;
    }/* w w  w  .j a  va2  s  .  co m*/

    Interval interval = new Interval(
            SiadapMiscUtilClass.convertDateToBeginOfDay(configuration.getFirstLevelHarmonizationBegin()),
            SiadapMiscUtilClass.convertDateToEndOfDay(configuration.getFirstLevelHarmonizationEnd()));
    return interval.containsNow();
}

From source file:net.sourceforge.fenixedu.domain.TutorshipSummaryPeriod.java

License:Open Source License

public boolean isOpenNow() {
    Interval interval = new Interval(getBeginDate().toDateTimeAtStartOfDay(),
            getEndDate().plusDays(1).toDateTimeAtStartOfDay());
    return interval.containsNow();
}

From source file:org.kuali.kpme.tklm.time.detail.web.TimeDetailActionForm.java

License:Educational Community License

public boolean isCurrentTimesheet() {
    boolean isCurrentTimesheet = false;

    if (getCalendarEntry() != null) {
        Interval interval = new Interval(getCalendarEntry().getBeginPeriodFullDateTime(),
                getCalendarEntry().getEndPeriodFullDateTime());
        isCurrentTimesheet = interval.containsNow();
    }/*from   ww w.  j a  v  a2 s. com*/

    return isCurrentTimesheet;
}