Checks whether the specified value is a date according to the old format of the {@link CoreProperties#SERVER_ID}.
972454
private static boolean isDate(String value) {
    try {
      new SimpleDateFormat("yyyyMMddHHmmss").parse(value);
      return true;
    } catch (ParseException e) {
      return false;
    }
  }
673583
public static Date getDate(
    Object   value)
  {
    if (value == null)
    {
        return null;
    }

    if (value instanceof Date)
    {
        return ((Date) value);
    }

    return parseISODate(value.toString());
  }
361774
protected void setDate(Date date, boolean firePropertyChange) {
		Date oldDate = this.date;
		this.date = date;

		if (date == null) {
			setText("");
		} else {
			String formattedDate = dateFormatter.format(date);
			try {
				setText(formattedDate);
			} catch (RuntimeException e) {
				e.printStackTrace();
			}
		}
		if (date != null && dateUtil.checkDate(date)) {
			setForeground(Color.BLACK);

		}

		if (firePropertyChange) {
			firePropertyChange("date", oldDate, date);
		}
	}
197079
def value_validate(self, value):
        
        if not isinstance(value, datetime.date):
            raise tldap.exceptions.ValidationError("is invalid date")
        # a datetime is also a date but they are not compatable
        if isinstance(value, datetime.datetime):
            raise tldap.exceptions.ValidationError("should be a date, not a datetime")
1018745
public static boolean isISODateTime(final String val) throws BadDateException {
    try {
      if (val.length() != 15) {
        return false;
      }
      fromISODateTime(val);
      return true;
    } catch (Throwable t) {
      return false;
    }
  }
339456
public static boolean isToday(String date, String format) {
        String now = getFormatDate(SHORT);
        String target = getFormatDate(SHORT, parse(date, format));
        return now.equals(target);
    }
932158
public static java.sql.Date toDate(Object value) throws ParseException {
        if (value == null) {
            return null;
        }
        if (value instanceof java.sql.Date) {
            return (java.sql.Date) value;
        }
        if (value instanceof String) {
            if ("".equals((String) value)) {
                return null;
            }
            return new java.sql.Date(IN_DATE_FORMAT.parse((String) value).getTime());
        }

        return new java.sql.Date(IN_DATE_FORMAT.parse(value.toString()).getTime());
    }
1311370
private <V> boolean isExpired(CacheValue<V> value) {
    long diff = ticker.read() - value.getCreationTime();
    return diff > maxEntryAgeNanos;
  }
282739
def transaction_date(self, value):
        
        if value:
            self._transaction_date = parse(value).date() if isinstance(value, type_check) else value
520931
public static boolean isValidDate(final String date, final String format, final boolean lenient)
	{
		boolean isValid = true;
		if (date == null || format == null || format.length() <= 0)
		{
			return false;
		}
		try
		{
			final DateFormat df = new SimpleDateFormat(format);
			df.setLenient(lenient);
			df.parse(date);
		}
		catch (final ParseException | IllegalArgumentException e)
		{
			isValid = false;
		}
		return isValid;
	}
384644
function(format, value) {
      var date = helpers.date.parse(value);

      if(date === false || date === undefined) return false;

      var day = date.getDate().toString().replace(/(?=(^\d{1}$))/g, "0");
      var month = (date.getMonth() + 1).toString().replace(/(?=(^\d{1}$))/g, "0");

      var formatDate = format
         .replace(/dd/gi, day)
         .replace(/mm/gi, month)
         .replace(/yyyy/gi, date.getFullYear());

      return formatDate;
   }
942218
public static boolean isISODate(final String val) throws BadDateException {
    try {
      if (val.length() != 8) {
        return false;
      }
      fromISODate(val);
      return true;
    } catch (Throwable t) {
      return false;
    }
  }
1000839
public static boolean isDate(String date) {
        if (isEmpty(date)) return defaultEmptyOK;
        String month;
        String day;
        String year;

        int dateSlash1 = date.indexOf("/");
        int dateSlash2 = date.lastIndexOf("/");

        if (dateSlash1 <= 0 || dateSlash1 == dateSlash2) return false;
        month = date.substring(0, dateSlash1);
        day = date.substring(dateSlash1 + 1, dateSlash2);
        year = date.substring(dateSlash2 + 1);

        return isDate(year, month, day);
    }
52545
public static LocalDateTime parseDate(String value) {
        if (StringUtils.isBlank(value)) {
            logger.info("[version-info] No date defined, using current date.");
            return Time.now();
        } else {
            try {
                return LocalDateTime.parse(value, DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss"));
            } catch (DateTimeParseException ex) {
                logger.warn("[version-info] Wrong date format, using current date: " + value);
                return Time.now();
            }
        }
    }
713980
public static Date toDate(Object value, Date defaultValue) {
		return convert(Date.class, value, defaultValue);
	}
146132
private boolean isValidPartialDateStringFormat(final String component, final char padding) {
		// Empty is not valid
		if (Util.empty(component)) {
			return false;
		}

		int length = component.length();

		// Check length YYYY, or YYYYMM, or YYYYMMDD
		if (length != YEAR_END && length != MONTH_END && length != DAY_END) {
			return false;
		}

		// Year - ???? or YYYY
		String year = component.substring(YEAR_START, YEAR_END);
		if (!isValidCharacters(year, padding) || !isValidYear(parseDateComponent(year, padding))) {
			return false;
		}

		// Month - ?? or MM
		if (component.length() >= MONTH_END) {
			String month = component.substring(MONTH_START, MONTH_END);
			if (!isValidCharacters(month, padding) || !isValidMonth(parseDateComponent(month,
					padding))) {
				return false;
			}
		}

		// Day - ?? or DD
		if (component.length() == DAY_END) {
			String day = component.substring(DAY_START, DAY_END);
			if (!isValidCharacters(day, padding) || !isValidDay(parseDateComponent(day, padding))) {
				return false;
			}
		}

		return true;
	}
1142995
function isValidDate(date) {
  if (moment.isMoment(date)) {
    return date.isValid();
  } else {
    return moment(date).isValid();
  }
}