Examples of before()


Examples of java.util.Date.before()

    private Date calculateEndDate() {
        // int countFrameable =
        // myTopUnit.getAtomCount((TimeUnit)myHighestFrameable);
        Date date = myTopUnit.adjustRight(myBaseDate);
        if (date.before(myStartDate)) {
            throw new IllegalStateException("End date="+date+" start="+myStartDate+" base="+myBaseDate);
        }
        // for (int i=0; i<countFrameable; i++) {
        // date = myHighestFrameable.adjustRight(date);
        // }
View Full Code Here

Examples of java.util.Date.before()

        List result = new ArrayList();
        Date curDayStart = myFramer.adjustLeft(startDate);
        boolean isWeekendState = isNonWorkingDay(curDayStart);
        // System.err.println("getActivities(): start="+startDate+"
        // end="+endDate);
        while (curDayStart.before(endDate)) {
            // System.err.println("curDayStart="+curDayStart);
            Date changeStateDayStart = getStateChangeDate(curDayStart,
                    !isWeekendState);
            // System.err.println("changeStateDayStart="+changeStateDayStart);
            if (changeStateDayStart.before(endDate)) {
View Full Code Here

Examples of java.util.Date.before()

        while (curDayStart.before(endDate)) {
            // System.err.println("curDayStart="+curDayStart);
            Date changeStateDayStart = getStateChangeDate(curDayStart,
                    !isWeekendState);
            // System.err.println("changeStateDayStart="+changeStateDayStart);
            if (changeStateDayStart.before(endDate)) {
                result.add(new CalendarActivityImpl(curDayStart,
                        changeStateDayStart, !isWeekendState));
                curDayStart = changeStateDayStart;
                isWeekendState = !isWeekendState;
                continue;
View Full Code Here

Examples of java.util.Date.before()

       
        // cached result set
        // can be detected with given expiration date
        Date expiration = getExpirationDate();
        if (expiration != null) {
            if (expiration.before(new Date())) throw new IOException("the resumption is expired at " + ISO8601Formatter.FORMATTER.format(expiration) + " (now: " + ISO8601Formatter.FORMATTER.format());
            // the resumption token is still fresh
        }
        String u = url + "verb=ListRecords&resumptionToken=" + escape(token);
        return new DigestURI(u);
    }
View Full Code Here

Examples of java.util.Date.before()

        Iterator<Row> iter = this.iterator(WorkTables.TABLE_SEARCH_FAILURE_NAME);
        while (iter.hasNext()) {
          Row row = iter.next();
          Date date = new Date();
          date = row.get(TABLE_SEARCH_FAILURE_COL_DATE, date);
          if(date.before(new Date(System.currentTimeMillis() - timeout))) {
            this.delete(TABLE_SEARCH_FAILURE_NAME, row.getPK());
          }
        }
      } catch (IOException e) {
              Log.logException(e);
View Full Code Here

Examples of java.util.Date.before()

            Date d = task.getStart().getTime();
            if (res == null) {
                res = d;
                continue;
            }
            if (d.before(res))
                res = d;
        }
        return res;
    }
View Full Code Here

Examples of java.util.Date.before()

            // -expires in cached response
            // the expires value gives us a very easy hint when the cache is stale
            final Date expires = responseHeader.expires();
            if (expires != null) {
    //          System.out.println("EXPIRES-TEST: expires=" + expires + ", NOW=" + serverDate.correctedGMTDate() + ", url=" + url);
                if (expires.before(new Date(GenericFormatter.correctedUTCTime()))) { return false; }
            }
            final Date lastModified = responseHeader.lastModified();
            cacheControl = responseHeader.get(HeaderFramework.CACHE_CONTROL);
            if (cacheControl == null && lastModified == null && expires == null) { return false; }
   
View Full Code Here

Examples of java.util.Date.before()

            // -expires in cached response
            // the expires value gives us a very easy hint when the cache is stale
            // sometimes, the expires date is set to the past to prevent that a page is cached
            // we use that information to see if we should index it
            final Date expires = responseHeader.expires();
            if (expires != null && expires.before(new Date(GenericFormatter.correctedUTCTime()))) {
                return "Stale_(Expired)";
            }

            // -lastModified in cached response
            // this information is too weak to use it to prevent indexing
View Full Code Here

Examples of java.util.Date.before()

            Date thisTimeTo   = dateTo;

            // Condition 1.
            if ((thisTimeFrom.after(icalDateStart)
            ||   thisTimeFrom.equals(icalDateStart))
            &&  (thisTimeTo.before(icalDateEnd)
            ||   thisTimeTo.equals(icalDateEnd)))
            {
                // Create an all day event as this event wraps this day and others.
                icalEvent.setDateStart(thisTimeFrom);
                icalEvent.setDateEnd(thisTimeTo);                   
View Full Code Here

Examples of java.util.Date.before()

            Date thisTimeTo   = dateTo;

            // Condition 1.
            if ((thisTimeFrom.after(icalDateStart)
            ||   thisTimeFrom.equals(icalDateStart))
            &&  (thisTimeTo.before(icalDateEnd)
            ||   thisTimeTo.equals(icalDateEnd)))
            {
                // Create an all day event as this event wraps this day and others.
                icalEvent.setDateStart(thisTimeFrom);
                icalEvent.setDateEnd(thisTimeTo);                   
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.