if value is a date
436962
def match_date(self, value, strict=False):
        """"""
        value = stringify(value)
        try:
            parse(value)
        except Exception:
            self.shout('Value %r is not a valid date', strict, value)
1203032
def isdatetime(value):
    
    if isinstance(value, np.ndarray):
        return (value.dtype.kind == "M" or
                (value.dtype.kind == "O" and len(value) and
                 isinstance(value[0], datetime_types)))
    else:
        return isinstance(value, datetime_types)
893091
function(value, parameters) {
            if(!(value instanceof Date))
                value = new Date(value);

            if(value.date_only || parameters['VALUE'] === 'DATE')
                return format_value('DATE', value);

            return value.getUTCFullYear()
                    +pad(value.getUTCMonth()+1)
                    +pad(value.getUTCDate())
                    +'T'+format_value('TIME', value);
        }
1022199
def end_date(self, value):
        

        if not isinstance(value, datetime):
            raise TypeError(_pretty_message(
                '''
                end_date must be an instance of datetime.datetime, not %s
                ''',
                _type_name(value)
            ))

        self._end_date = value
1116731
private String getDateString(Date value)
   {
      Calendar cal = DateHelper.popCalendar(value);
      int year = cal.get(Calendar.YEAR);
      int month = cal.get(Calendar.MONTH) + 1;
      int day = cal.get(Calendar.DAY_OF_MONTH);
      DateHelper.pushCalendar(cal);
      
      StringBuilder sb = new StringBuilder(8);
      sb.append(m_fourDigitFormat.format(year));
      sb.append(m_twoDigitFormat.format(month));
      sb.append(m_twoDigitFormat.format(day));

      return (sb.toString());
   }
41250
public static function date(string $value): bool
    {
        $matches = preg_match('/^(\d{4})-(\d{2})-(\d{2})$/', $value);
        return is_int($matches) && $matches > 0;
    }
343442
function type(value) {
  let valueType = typeof value;
  if (Array.isArray(value)) {
    valueType = 'array';
  } else if (value instanceof Date) {
    valueType = 'date';
  } else if (value === null) {
    valueType = 'null';
  }

  return valueType;
}
569135
function(val, sendUpdatedEvt) {
	
	   // Don't try to parse a date if there is no date
	   if( val === '' ) {
	      inputEx.DateField.superclass.setValue.call(this, '', sendUpdatedEvt);
	      return;
	   }
	   var str = "";
	   if (val instanceof Date) {
			str = inputEx.DateField.formatDate(val, this.options.dateFormat);
	   } 
		else if(this.options.valueFormat){
			var dateVal = inputEx.DateField.parseWithFormat(val, this.options.valueFormat);
			str = inputEx.DateField.formatDate(dateVal, this.options.dateFormat);
		}
	   // else date must match this.options.dateFormat
	   else {
	     str = val;
	   }
	
	   inputEx.DateField.superclass.setValue.call(this, str, sendUpdatedEvt);
	}
1076667
function (event) {
      switch (attribute.type) {
        case 'Date':
          attribute.value = (input.value === '') ? null : attribute.coerce(input.value);
          if (attribute.value != null) {
            var mm = attribute.value.getMonth() + 1;
            var dd = attribute.value.getDate();
            var yyyy = attribute.value.getFullYear();
            if (mm < 10) mm = '0' + mm;
            if (dd < 10) dd = '0' + dd;
            input.value = mm + '/' + dd + '/' + yyyy;
          } else {
            input.value = '';
          }
          break;
        default:
          attribute.value = (input.value === '') ? null : attribute.coerce(input.value);
          if (attribute.value != null)
            input.value = attribute.value;
          break;
      }
      attribute.validate(function () {
      });
    }
756118
function(aDate, bDate, addSub) {
            if(typeof(addSub) == 'undefined') { addSub = true };
            if(! aDate) { return bDate; }
            if(! bDate) { return aDate; }
            var a = Number(aDate);
            var b = Number(bDate);
            var c = addSub ? a + b : a - b;
            return new Date(c);
        }
617696
public static Date checkNull(Date value, Date elseValue) {
        return isNull(value) ? elseValue : value;
    }
733929
def record_date(self, value):
        
        if value:
            self._record_date = parse(value).date() if isinstance(value, type_check) else value
650123
function (value) {
    value += '';

    if (value.search(/^\-?\d+$/) > -1) {
      return 'integer';
    }

    if (value.search(/^\-?\d+\.\d+[\d.]*$/) > -1) {
      return 'float';
    }

    if ('false' === value || 'true' === value) {
      return 'boolean';
    }

    if (value.search(/^\d{4}\-\d{2}\-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z?$/) > -1) {
      return 'datetime';
    }

    return 'string';
  }
828730
public void setDate(Date value) {
		this.checkNull(value);
		list.add(value);
		type.add(Date.class);
	}
972454
private static boolean isDate(String value) {
    try {
      new SimpleDateFormat("yyyyMMddHHmmss").parse(value);
      return true;
    } catch (ParseException e) {
      return false;
    }
  }
453640
def issue_date(self, value):
        
        self._issue_date = parse(value).date() if isinstance(value, type_check) else value
645678
def _is_date_data(self, data_type):
        """"""
        dt = DATA_TYPES[data_type]
        if isinstance(self.data, dt['type']):
            self.type = data_type.upper()
            self.len = None
            return True