Find by recordDate on of before date.
@param recordDate record key to search for
@return trust records for given input
513283
@View(name = "by_recordDate", map = "function(doc) { if (doc.principal && doc.deviceFingerprint && doc.recordDate) { emit(doc.recordDate, doc) } }")
    public List<CouchDbMultifactorAuthenticationTrustRecord> findOnOrBeforeDate(final LocalDateTime recordDate) {
        return db.queryView(createQuery("by_recordDate").endKey(recordDate), CouchDbMultifactorAuthenticationTrustRecord.class);
    }
1055556
public static DateTime date(Date date) {
		if (date instanceof DateTime) {
			return (DateTime) date;
		}
		return dateNew(date);
	}
856667
public boolean checkDate(Date date) {
		Calendar calendar = Calendar.getInstance();
		calendar.setTime(date);
		calendar.set(Calendar.HOUR_OF_DAY, 0);
		calendar.set(Calendar.MINUTE, 0);
		calendar.set(Calendar.SECOND, 0);
		calendar.set(Calendar.MILLISECOND, 0);

		Calendar minCal = Calendar.getInstance();
		minCal.setTime(minSelectableDate);
		minCal.set(Calendar.HOUR_OF_DAY, 0);
		minCal.set(Calendar.MINUTE, 0);
		minCal.set(Calendar.SECOND, 0);
		minCal.set(Calendar.MILLISECOND, 0);

		Calendar maxCal = Calendar.getInstance();
		maxCal.setTime(maxSelectableDate);
		maxCal.set(Calendar.HOUR_OF_DAY, 0);
		maxCal.set(Calendar.MINUTE, 0);
		maxCal.set(Calendar.SECOND, 0);
		maxCal.set(Calendar.MILLISECOND, 0);

		return !(calendar.before(minCal) || calendar.after(maxCal));
	}
619441
def where_entry_date(query, datespec):
    
    date, interval, _ = utils.parse_date(datespec)
    start_date, end_date = date.span(interval)

    return orm.select(
        e for e in query if
        e.local_date >= start_date.naive and
        e.local_date <= end_date.naive
    )
733343
public Query addTimestampParameter(java.util.Date date) {
        return addParameter(new Timestamp(date.getTime()));
    }
972742
static JapaneseEra from(LocalDate date) {
        if (date.isBefore(MEIJI.since)) {
            throw new DateTimeException("Date too early: " + date);
        }
        JapaneseEra[] known = KNOWN_ERAS.get();
        for (int i = known.length - 1; i >= 0; i--) {
            JapaneseEra era = known[i];
            if (date.compareTo(era.since) >= 0) {
                return era;
            }
        }
        return null;
    }
859291
public Date add(Date date) {
		Calendar c = Calendar.getInstance();
		c.setTime(date);

		if (weeks != null) {
			int weeks = this.weeks * (prior ? -1 : 1);
			c.add(Calendar.DATE, weeks * 7);
		}
		if (days != null) {
			int days = this.days * (prior ? -1 : 1);
			c.add(Calendar.DATE, days);
		}
		if (hours != null) {
			int hours = this.hours * (prior ? -1 : 1);
			c.add(Calendar.HOUR_OF_DAY, hours);
		}
		if (minutes != null) {
			int minutes = this.minutes * (prior ? -1 : 1);
			c.add(Calendar.MINUTE, minutes);
		}
		if (seconds != null) {
			int seconds = this.seconds * (prior ? -1 : 1);
			c.add(Calendar.SECOND, seconds);
		}

		return c.getTime();
	}
728042
public int getIndexByDate(Date date)
   {
      int result = -1;
      int index = 0;

      for (CostRateTableEntry entry : this)
      {
         if (DateHelper.compare(date, entry.getEndDate()) < 0)
         {
            result = index;
            break;
         }
         ++index;
      }

      return result;
   }
823421
private SortedSet<Date> filterExceptions(SortedSet<Date> dates) {

        SortedSet<Date> result = new TreeSet<Date>();
        for (Date d : dates) {
            if (!m_exceptions.contains(d)) {
                result.add(d);
            }
        }
        return result;
    }
1138871
public static LocalDate minDate(final LocalDate date0,
            final LocalDate date1) {
        if (date1 == null) {
            return date0;
        }
        if (date0 == null) {
            return date1;
        }
        if (date1.isBefore(date0)) {
            return date1;
        } else {
            return date0;
        }
    }
750741
def _get_date_pagination(self, base, oldest_neighbor, newest_neighbor):
        
        _, span, date_format = utils.parse_date(self.spec['date'])

        if newest_neighbor:
            newer_date = newest_neighbor.date.span(span)[0]
            newer_view = View({**base,
                               'order': self._order_by,
                               'date': newer_date.format(date_format)})
        else:
            newer_view = None

        if oldest_neighbor:
            older_date = oldest_neighbor.date.span(span)[0]
            older_view = View({**base,
                               'order': self._order_by,
                               'date': older_date.format(date_format)})
        else:
            older_view = None

        return older_view, newer_view
1101728
public boolean isWithin(Date date) {
		if(first == null) {
			return false;
		} else if(date.equals(first)) {
			return true;
		} else if(date.equals(last)) {
			return true;
		} else if(date.after(first) && date.before(last)) {
			return true;
		} else {
			return false;
		}
	}
76297
private LocalDate ancestorAdjustment(final LocalDate date) {
        if (date == null) {
            return null;
        }
        return date.plusYears(typicals.ageAtMarriage()
                + typicals.gapBetweenChildren())
                .withMonthOfYear(1).withDayOfMonth(1);
    }
559960
public static Date parseDate(String date) {
        if (date == null) {
            return null;
        }
        try {
            return org.apache.commons.lang.time.DateUtils.parseDate(date, new String[] {DSP_DEFAULT_TIME_FORMAT});
        } catch (ParseException e) {
            return null;
        }
    }
511106
public static int getSecond(Date date) {
        Calendar c = Calendar.getInstance();
        c.setTime(date);
        return c.get(Calendar.SECOND);
    }
1217426
public Iterable<Di18n> queryByCreatedDate(java.util.Date createdDate) {
    return queryByField(null, Di18nMapper.Field.CREATEDDATE.getFieldName(), createdDate);
  }
1261249
public Iterable<DContact> queryByCreatedDate(Object parent, java.util.Date createdDate) {
    return queryByField(parent, DContactMapper.Field.CREATEDDATE.getFieldName(), createdDate);
  }