Find record created on or after date.
@param onOrAfterDate cutoff date
@return records created on or after date
13374
public List<CouchDbMultifactorAuthenticationTrustRecord> findOnOrAfterDate(final LocalDateTime onOrAfterDate) {
        return db.queryView(createQuery("by_recordDate").startKey(onOrAfterDate), CouchDbMultifactorAuthenticationTrustRecord.class);
    }
568561
public boolean surveyDates(boolean bDisplayOption)
    {
        if (m_recDetail == null)
        {
            RecordOwner recordOwner = this.getRecordOwner();
            m_recDetail = new ProjectTask(recordOwner);
            if (recordOwner != null)
                recordOwner.removeRecord(m_recDetail);
            m_recDetail.addListener(new SubFileFilter(this, true));
        }
        Date startDate = null;
        Date endDate = null;
        try {
            m_recDetail.close();
            while (m_recDetail.hasNext())
            {
                m_recDetail.next();
                Date thisStartDate = null;
                if (!m_recDetail.getField(ProjectTask.START_DATE_TIME).isNull())
                    thisStartDate = ((DateTimeField)m_recDetail.getField(ProjectTask.START_DATE_TIME)).getDateTime();
                if (thisStartDate != null)
                    if ((startDate == null)
                        || (thisStartDate.before(startDate)))
                            startDate = thisStartDate;
                Date thisEndDate = null;
                if (!m_recDetail.getField(ProjectTask.END_DATE_TIME).isNull())
                    thisEndDate = ((DateTimeField)m_recDetail.getField(ProjectTask.END_DATE_TIME)).getDateTime();
                if (thisEndDate != null)
                    if ((endDate == null)
                        || (thisEndDate.after(endDate)))
                            endDate = thisEndDate;
            }
            this.getListener(UpdateChildrenHandler.class).setEnabledListener(false);
            this.edit();
            int iMoveMode = DBConstants.SCREEN_MOVE;
            if (startDate != null)
                ((DateTimeField)this.getField(ProjectTask.START_DATE_TIME)).setDateTime(startDate, bDisplayOption, iMoveMode);
            if (endDate != null)
                ((DateTimeField)this.getField(ProjectTask.END_DATE_TIME)).setDateTime(endDate, bDisplayOption, iMoveMode);
            boolean bHasChildren = true;
            if ((startDate == null) && (endDate == null))
                bHasChildren = false;
            this.getField(ProjectTask.HAS_CHILDREN).setState(bHasChildren);
            if (this.isModified())
            {
                Object bookmark = this.getHandle(DBConstants.BOOKMARK_HANDLE);
                this.set();
                this.setHandle(bookmark, DBConstants.BOOKMARK_HANDLE);
                return true;    // Record updated
            }
        } catch (DBException ex) {
            ex.printStackTrace();
        } finally {
            this.getListener(UpdateChildrenHandler.class).setEnabledListener(true);
        }
        return false;   // No update required
    }
799302
public List<UnscheduledEvent> getUnscheduledEventList(Date cutoffTime, int maxRows) throws SQLException {
        StringBuffer query = new StringBuffer();
        query.append("select EVENT_NAME,CREATE_DT,AUXDATA,REFERENCE,COMMENTS ");
        query.append("from EVENT_INSTANCE ");
        query.append("where STATUS_CD = " + EventInstance.STATUS_INTERNAL_EVENT + " ");
        query.append("and CREATE_DT < ? ");
        query.append("and CONSUME_DT is null ");
        if(!db.isMySQL())
            query.append("and ROWNUM <= " + maxRows + " ");
        query.append("order by CREATE_DT");
        if (db.isMySQL())
            query.append(" LIMIT " + maxRows + " ");
        List<UnscheduledEvent> ret = new ArrayList<UnscheduledEvent>();
        ResultSet rs = db.runSelect(query.toString(), cutoffTime);
        while (rs.next()) {
            UnscheduledEvent ue = new UnscheduledEvent();
            ue.setName(rs.getString("EVENT_NAME"));
            ue.setCreateTime(rs.getTimestamp("CREATE_DT"));
            ue.setMessage(rs.getString("AUXDATA"));
            ue.setReference(rs.getString("REFERENCE"));
            if (ue.getMessage() == null)
                ue.setMessage(rs.getString("COMMENTS"));
            ret.add(ue);
        }
        return ret;
    }
1304461
public static Dater of(Date date, DateStyle dateStyle) {
		return of(date).with(dateStyle);
	}
1114410
def resources_by_date(klass_name)
      klass       = klass_name.to_s.constantize
      created_ats = klass.order(:created_at).pluck(:created_at).compact
      steps       = date_range.step(date_steps).map(&:end_of_day)
      index       = 0
      counts      = created_ats.reduce(Hash.new(0)) do |counts, timestamp|
        cutoff = steps[index]

        # As long as timestamps have not exceeded the last date step
        if cutoff.present?
          if timestamp < cutoff
            counts[cutoff] += 1
          else
            index               += 1
            next_cutoff          = steps[index]
            counts[next_cutoff] += (counts[cutoff] + 1) if next_cutoff.present?
          end
        end

        counts
      end

      counts.values.to_s
    end
336065
public static PlainDate from(GregorianDate date) {

        if (date instanceof PlainDate) {
            return (PlainDate) date;
        } else {
            return PlainDate.of(date.getYear(), date.getMonth(), date.getDayOfMonth());
        }

    }
575395
def creation_dates(self, sort=True):
        
        if not sort:
            return pool_creation_date(self.filepaths)
        else:
            pcd = pool_creation_date(self.filepaths)
            pcd.sort(key=itemgetter(1), reverse=True)
            return pcd
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
236240
public static Date dateReservedYear000(Date date) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);

        return dateReservedYear000(calendar);
    }
511106
public static int getSecond(Date date) {
        Calendar c = Calendar.getInstance();
        c.setTime(date);
        return c.get(Calendar.SECOND);
    }
229330
public static <DR extends DateRange<DT>, DT> DR findDateRangeSorted(
            ReadableInstant instant, List<DR> dateRanges) {
        if (dateRanges.isEmpty()) {
            return null;
        }

        if (!(dateRanges instanceof RandomAccess)) {
            // Not random access not much use doing a binary search
            return findDateRange(instant, dateRanges);
        }

        int low = 0;
        int high = dateRanges.size() - 1;

        while (low <= high) {
            int mid = (low + high) >>> 1;
            final DR dateRange = dateRanges.get(mid);
            final int cmp = dateRange.compareTo(instant);

            if (cmp == -1) low = mid + 1;
            else if (cmp == 1) high = mid - 1;
            else return dateRange;
        }

        return null;
    }
234451
public List<ScheduledEvent> getScheduledEventList(Date cutofftime) throws SQLException {
        StringBuffer query = new StringBuffer();
        query.append("select EVENT_NAME,CREATE_DT,CONSUME_DT,AUXDATA,REFERENCE,COMMENTS ");
        query.append("from EVENT_INSTANCE ");
        query.append("where STATUS_CD in (");
        query.append(EventInstance.STATUS_SCHEDULED_JOB).append(",");
        query.append(EventInstance.STATUS_INTERNAL_EVENT).append(")");
        ResultSet rs;
        if (cutofftime==null) {
            query.append(" and CONSUME_DT is null");
            rs = db.runSelect(query.toString());
        } else {
            query.append(" and CONSUME_DT < ?");
            rs = db.runSelect(query.toString(), cutofftime);
        }
        List<ScheduledEvent> ret = new ArrayList<ScheduledEvent>();
        while (rs.next()) {
            ScheduledEvent de = new ScheduledEvent();
            de.setName(rs.getString(1));
            de.setCreateTime(rs.getTimestamp(2));
            de.setScheduledTime(rs.getTimestamp(3));
            de.setMessage(rs.getString(4));
            de.setReference(rs.getString(5));
            if (de.getMessage()==null) de.setMessage(rs.getString(6));
            ret.add(de);
        }
        return ret;
    }
445290
def with_timestamps(self, created_at=None, updated_at=None):
        
        if not created_at:
            created_at = self.created_at()

        if not updated_at:
            updated_at = self.updated_at()

        return self.with_pivot(created_at, updated_at)
882106
function (cb) {

            model.VersionedModel.find({ refId: record._id }, 'dateCreated modifiedBy', { lean: 1, sort: { dateCreated: -1 } }, function (err, result) {
                return cb(err, result);
            });

        }
112847
public boolean includes(Date date)
    {
        return (start == null || !start.after(date)) && 
               (end == null   || date.before(end));
    }
10748
public Date getCreationDateTime() {

		long time = 0;

		if (createtime != null) {
			time = createtime.longValue() * 1000;
		}

		if (createtime_nano != null) {
			time += (createtime_nano.longValue() / 1000000);
		}
		return new Date(time);
	}
1353453
private List<O> findByDate(String dateField, Date start, Date end, int numObjects, boolean asc) {
        if (start == null)
            start = new Date(0);
        if (end == null)
            end = new Date();
        return getDatastore().find(clazz).filter(dateField + " >", start).filter(dateField + " <", end).order(asc ? dateField : '-' + dateField).limit(numObjects).asList();
    }