Package java.util

Examples of java.util.Date.before()


      return false;
    }
   
    date = new DateWrapper(date).resetTime().asDate();

    if (minValue != null && date.before(minValue)) {
      String error = null;
      if (getMessages().getMinText() != null) {
        error = Format.substitute(getMessages().getMinText(), format.format(minValue));
      } else {
        error = GXT.MESSAGES.dateField_minText(format.format(minValue));
View Full Code Here


  }

  private double priceForDuration(Booking booking, Event event)
  {
    Date firstPricableDate = booking.getArrivalDate();
    if(firstPricableDate.before(event.getPublicEventStart()))
      firstPricableDate = event.getPublicEventStart();
   
    Date lastPricableDate = booking.getDepartureDate();
    if(lastPricableDate.after(event.getPublicEventEnd()))
      lastPricableDate = event.getPublicEventEnd();
View Full Code Here

  }

  private double priceForDuration(Booking booking, Event event)
  {
    Date firstPricableDate = booking.getArrivalDate();
    if(firstPricableDate.before(event.getPublicEventStart()))
      firstPricableDate = event.getPublicEventStart();
   
    Date lastPricableDate = booking.getDepartureDate();
    if(lastPricableDate.after(event.getPublicEventEnd()))
      lastPricableDate = event.getPublicEventEnd();
View Full Code Here

    Date v = (Date) value;
    if (value == null) {
      return false;
    }
    if ("after".equals(comparison)) {
      return v.before(t);
    } else if ("before".equals(comparison)) {
      return v.after(t);
    } else if ("on".equals(comparison)) {
      t = new DateWrapper(t).resetTime().asDate();
      v = new DateWrapper(v).resetTime().asDate();
View Full Code Here

      do
      {
        dates.add(date);
        date = new Date(date.getTime() + (1000 * 60 * 60 * 24));
      }
      while(date.before(departureDate));
     
      dates.add(departureDate);
      return dates.toArray();
    }
   
View Full Code Here

                        tcal.set(Calendar.MINUTE, min);
                        tcal.set(Calendar.HOUR_OF_DAY, hr);
                        tcal.set(Calendar.DAY_OF_MONTH, day);
                        tcal.set(Calendar.MONTH, mon - 1);
                        Date nTime = tcal.getTime();
                        if (nTime.before(afterTime))
                        {
                            day = 1;
                            mon++;
                        }
                    }
View Full Code Here

                    tcal.set(Calendar.MINUTE, min);
                    tcal.set(Calendar.HOUR_OF_DAY, hr);
                    tcal.set(Calendar.DAY_OF_MONTH, day);
                    tcal.set(Calendar.MONTH, mon - 1);
                    Date nTime = tcal.getTime();
                    if (nTime.before(afterTime))
                    {
                        day = ((Integer) daysOfMonth.first()).intValue();
                        mon++;
                    }
                } else if (st != null && st.size() != 0)
View Full Code Here

                            reminderDateTime = eventDateTime;
                        }
                    } else {
                        reminderDateTime = new Date(reminderStamp.getTime());
                    }
                    if (reminderDateTime.before(now) && reminderStamp != null) {
                        try {
                            parameters.put("eventDateTime", new Timestamp(eventDateTime.getTime()));
                            processEventReminder(ctx, reminder, parameters);
                            if (repeatCount != 0 && currentCount + 1 >= repeatCount) {
                                reminder.remove();
View Full Code Here

                }
                continue;
            }
            if (reminderStamp != null) {
                Date reminderDateTime = new Date(reminderStamp.getTime());
                if (reminderDateTime.before(now)) {
                    try {
                        parameters.put("eventDateTime", eventDateTime);
                        processEventReminder(ctx, reminder, parameters);
                        TimeDuration duration = TimeDuration.fromNumber(reminder.getLong("repeatInterval"));
                        if ((repeatCount != 0 && currentCount + 1 >= repeatCount) || duration.isZero()) {
View Full Code Here

        Date d = null;
        for (Entry entry : feed.getEntries()) {
            Date updated = entry.getUpdated();
            if (d == null)
                d = updated;
            if (updated.before(d))
                d = updated;
        }
        return d;
    }
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.