Determine if a data record is of type DATE.
436774
def is_date(self):
        """"""
        dt = DATA_TYPES['date']
        if type(self.data) is dt['type'] and '-' in str(self.data) and str(self.data).count('-') == 2:
            # Separate year, month and day
            date_split = str(self.data).split('-')
            y, m, d = date_split[0], date_split[1], date_split[2]

            # Validate values
            valid_year, valid_months, valid_days = int(y) in YEARS, int(m) in MONTHS, int(d) in DAYS

            # Check that all validations are True
            if all(i is True for i in (valid_year, valid_months, valid_days)):
                self.type = 'date'.upper()
                self.len = None
                return True
82146
function isDateArray( value ) {
	var len;
	if ( !isArray( value ) ) {
		return false;
	}
	len = value.length;
	if ( !len ) {
		return false;
	}
	for ( var i = 0; i < len; i++ ) {
		if ( !isDate( value[i] ) ) {
			return false;
		}
	}
	return true;
}
1148258
private static boolean isPropertyType(Class<?> type) {
        return type.isPrimitive() ||
                type == String.class ||
                type == Date.class ||
                type == Calendar.class ||
                ClassUtils.wrapperToPrimitive(type) != null;
    }
725728
function isDate(thing) {
  return Object.prototype.toString.call(thing) === '[object Date]'
          && !isNaN(thing.getTime());
}
306245
def detect_old(data):
    ""
    if not data:
        return False
    ok, errors, warnings = _schema.validate(_OLD_SCHEMA, data)
    return ok and not (errors or warnings)
772196
def settlement_date(self, value):
        
        if value:
            self._settlement_date = parse(value).date() if isinstance(value, type_check) else value
1134289
def event_date(self, event_date):
        """"""
        self._group_data['eventDate'] = self._utils.format_datetime(
            event_date, date_format='%Y-%m-%dT%H:%M:%SZ'
        )
978984
function inferDtype(value) {
  return (
    (value === null || isUndefined(value)) ? null :
    isNumber(value) ? 'number' :
    isBoolean(value) ? 'boolean' :
    isString(value) ? 'string' :
    isDate(value) ? 'date' :
    'object'
  );
}
188356
def check_in_bounds(self, date):
        '''
        '''
        dt = Timestamp(date)
        return ((self._lbound is None or dt >= self._lbound) and
                (self._rbound is None or dt <= self._rbound))
1156427
def has_data_for_dates(series_or_df, first_date, last_date):
    
    dts = series_or_df.index
    if not isinstance(dts, pd.DatetimeIndex):
        raise TypeError("Expected a DatetimeIndex, but got %s." % type(dts))
    first, last = dts[[0, -1]]
    return (first <= first_date) and (last >= last_date)
128255
public static boolean isDateInThePast(final Date date)
	{
		boolean inPast = false;
		final Calendar compare = Calendar.getInstance();
		compare.setTime(date);
		final Calendar now = Calendar.getInstance();
		now.setTime(new Date(System.currentTimeMillis()));
		inPast = now.after(compare);
		return inPast;
	}
766829
def is_year(self):
        """"""
        dt = DATA_TYPES['year']
        if dt['min'] and dt['max']:
            if type(self.data) is dt['type'] and dt['min'] < self.data < dt['max']:
                self.type = 'year'.upper()
                self.len = None
                return True
982007
def record_type(self, column=None, value=None, **kwargs):
        
        return self._resolve_call('GIC_RECORD_TYPE', column, value, **kwargs)
1271106
public boolean recordDefineType(JSTypeExpression type) {
    if (type != null &&
        !currentInfo.isConstant() &&
        !currentInfo.isDefine() &&
        recordType(type)) {
      currentInfo.setDefine(true);
      populated = true;
      return true;
    } else {
      return false;
    }
  }
1142995
function isValidDate(date) {
  if (moment.isMoment(date)) {
    return date.isValid();
  } else {
    return moment(date).isValid();
  }
}
1177361
def IsPrimitiveType(obj):
   """"""
   return (isinstance(obj, types.bool) or isinstance(obj, types.byte) or
      isinstance(obj, types.short) or isinstance(obj, six.integer_types) or
      isinstance(obj, types.double) or isinstance(obj, types.float) or
      isinstance(obj, six.string_types) or
      isinstance(obj, types.PropertyPath) or
      isinstance(obj, types.ManagedMethod) or
      isinstance(obj, types.datetime) or
      isinstance(obj, types.URI) or isinstance(obj, type))
39330
private boolean isThisDateValid(String dateToValidate, String dateFromat) {
        if (dateToValidate == null) {
            return false;
        }
        SimpleDateFormat sdf = new SimpleDateFormat(dateFromat);
        sdf.setLenient(false);
        try {
            //if not valid, it will throw ParseException
            Date date = sdf.parse(dateToValidate);
        } catch (ParseException e) {
            e.printStackTrace();
            return false;
        }
        return true;
    }