Package java.util

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


        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

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

            // -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

            // -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

            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

            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

    Boolean showResultsActive = (Boolean)modConfig.get(IQEditController.CONFIG_KEY_DATE_DEPENDENT_RESULTS);
    if(showResultsActive!=null && showResultsActive.booleanValue()) {
      Date startDate = (Date)modConfig.get(IQEditController.CONFIG_KEY_RESULTS_START_DATE);
      Date endDate = (Date)modConfig.get(IQEditController.CONFIG_KEY_RESULTS_END_DATE);
      Date currentDate = new Date();
      if(currentDate.after(startDate) && (endDate==null || currentDate.before(endDate))) {
        isVisible = true;
      }
    } else {
      isVisible = true;
    }
View Full Code Here

      } else {
        myBuildinfo.contextPut("existsPatchFile", true);
        Date patchesFileDate = new Date(patchesNewest.lastModified());
        myBuildinfo.contextPut("patchesFileDate", patchesFileDate);
       
        final boolean patchesActive = patchesFileDate.before(timeOfServerStartup);
        if (patchesActive) {
          myBuildinfo.contextPut("patchesActive", "yes, patch(es) active");
        } else {
          myBuildinfo.contextPut("patchesActive", "probably not: they are deployed but server hasn't been restarted since. Will be active after restart!");
        }
View Full Code Here

  /**
   * @return True if this is publication is scheduled
   */
  public boolean isScheduled() {
    Date now = new Date();
    return !draft && publishDate != null && now.before(publishDate);
  }

  /**
   * @return An extra CSS class for drafts and scheduled items
   */
 
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.