Package java.util

Examples of java.util.Calendar.after()


    // Update the layout locations to the external nodes
    Calendar now = Calendar.getInstance();
    now.add(Calendar.MILLISECOND, -MIN_TIME_DELAY_BETWEEN_PROGRESS_EVENTS);

    if (now.after(lastProgressEventFired) || currentStep == totalNumberOfSteps) {
      ProgressEvent event = new ProgressEvent(currentStep, totalNumberOfSteps);

      for (int i = 0; i < progressListeners.size(); i++) {

        ProgressListener listener = (ProgressListener) progressListeners.get(i);
View Full Code Here


        } else {
            Calendar now = Calendar.getInstance();
            now.setTimeInMillis( workingMemory.getSessionClock().getCurrentTime() );

            if ( this.dateEffective != null && this.dateExpires != null ) {
                return (now.after( this.dateEffective ) && now.before( this.dateExpires ));
            } else if ( this.dateEffective != null ) {
                return (now.after( this.dateEffective ));
            } else {
                return (now.before( this.dateExpires ));
            }
View Full Code Here

            now.setTimeInMillis( workingMemory.getSessionClock().getCurrentTime() );

            if ( this.dateEffective != null && this.dateExpires != null ) {
                return (now.after( this.dateEffective ) && now.before( this.dateExpires ));
            } else if ( this.dateEffective != null ) {
                return (now.after( this.dateEffective ));
            } else {
                return (now.before( this.dateExpires ));
            }
        }
    }
View Full Code Here

        } else {           
            Calendar now = Calendar.getInstance();
            now.setTimeInMillis( workingMemory.getSessionClock().getCurrentTime() );

            if ( this.dateEffective != null && this.dateExpires != null ) {
                return (now.after( this.dateEffective ) && now.before( this.dateExpires ));
            } else if ( this.dateEffective != null ) {
                return (now.after( this.dateEffective ));
            } else {
                return (now.before( this.dateExpires ));
            }
View Full Code Here

            now.setTimeInMillis( workingMemory.getSessionClock().getCurrentTime() );

            if ( this.dateEffective != null && this.dateExpires != null ) {
                return (now.after( this.dateEffective ) && now.before( this.dateExpires ));
            } else if ( this.dateEffective != null ) {
                return (now.after( this.dateEffective ));
            } else {
                return (now.before( this.dateExpires ));
            }

        }
View Full Code Here

      ResultsPartition partition = new ResultsPartition(startDateStr,
          endDateStr, title);
      partition.filter(results);
      partitions.add(partition);

      if (endCal.after(lastCal)) {
        break;
      }
      startCal = endCal;
      endCal = partitioner.incrementPartition(startCal,1);
    }
View Full Code Here

        assertTrue( rule.isEffective(null, new RuleTerminalNode(), wm ) );

        final Calendar later = Calendar.getInstance();
        later.setTimeInMillis( later.getTimeInMillis() + 100000000 );

        assertTrue( later.after( Calendar.getInstance() ) );

        rule.setDateEffective( later );
        assertFalse( rule.isEffective(null, new RuleTerminalNode(), wm ) );

    }
View Full Code Here

         catch (IOException e)
         {
            throw new RepositoryException(e);
         }

         if (lastVersionData == null || created.after(lastCreated))
         {
            lastCreated = created;
            lastVersionData = vd;
         }
      }
View Full Code Here

                            String maxStr = getConstraintMax(constraints[i]);
                            if (maxStr == null) {
                                maxBoundless = true;
                            } else {
                                Calendar max = ISO8601.parse(maxStr);
                                if (absMax == null || max.after(absMax)) {
                                    absMax = max;
                                }
                            }
                        }
                    }
View Full Code Here

        if (parsed != null && pp.getIndex() == timestampStr.length())
        {
            working.setTime(parsed);
            working.set(Calendar.YEAR, now.get(Calendar.YEAR));

            if (working.after(now)) {
                working.add(Calendar.YEAR, -1);
            }
        } else {
            // Temporarily add the current year to the short date time
            // to cope with short-date leap year strings.
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.