Package java.util

Examples of java.util.Calendar.before()


            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 ));
            }
        }
    }

    public void setNoLoop(final boolean noLoop) {
View Full Code Here


            return true;
        } else {
            final Calendar now = tm.getNow();

            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

            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

    static public long s_getRemainingDays(Calendar calStart, Calendar calEnd)
   {
      Calendar calStartCloned = (Calendar) calStart.clone();
      long lngDaysBetween = 0;
     
      while (calStartCloned.before(calEnd))
      {
         calStartCloned.add(Calendar.DAY_OF_MONTH, 1);
         lngDaysBetween++;
      }
     
View Full Code Here

        if ( this.dateEffective == null && this.dateExpires == null ) {
            return true;
        } else {
            final Calendar now = Calendar.getInstance();
            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

            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

        @Override
        public boolean includesDate(Calendar cal) {
            long millis = cal.getTimeInMillis();
            Calendar startCal = setStart(cal);
            Calendar endCal = setEnd(startCal);
            if (endCal.before(startCal)) {
                endCal.add(Calendar.DAY_OF_MONTH, 1);
            }
            long startMillis = startCal.getTimeInMillis();
            long endMillis = endCal.getTimeInMillis();
            return millis >= startMillis && millis <= endMillis;
View Full Code Here

        public Calendar next(Calendar cal, ExpressionContext context) {
            Calendar result = null;
            for (TemporalExpression expression : this.expressionSet) {
                Calendar next = expression.next(cal, context);
                if (next != null) {
                    if (result == null || next.before(result)) {
                        result = next;
                    }
                }
            }
            return result;
View Full Code Here

        @Override
        public Calendar first(Calendar cal) {
            int month = cal.get(Calendar.MONTH);
            Calendar first = alignDayOfWeek((Calendar) cal.clone());
            if (first.before(cal)) {
                first.set(Calendar.DAY_OF_MONTH, 1);
                if (first.get(Calendar.MONTH) == month) {
                    first.add(Calendar.MONTH, 1);
                }
                alignDayOfWeek(first);
View Full Code Here

        @Override
        public Calendar next(Calendar cal, ExpressionContext context) {
            int month = cal.get(Calendar.MONTH);
            Calendar next = alignDayOfWeek((Calendar) cal.clone());
            if (next.before(cal) || next.equals(cal)) {
                next.set(Calendar.DAY_OF_MONTH, 1);
                if (next.get(Calendar.MONTH) == month) {
                    next.add(Calendar.MONTH, 1);
                }
                alignDayOfWeek(next);
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.