This method is called to format a date.

@param value date value
@return formatted date value
427141
private String formatDateTime(Object value)
   {
      String result = null;
      if (value instanceof Date)
      {
         result = m_formats.getDateTimeFormat().format(value);
      }
      return result;
   }
889734
@Nonnull
    @SuppressFBWarnings("RV_RETURN_VALUE_IGNORED_BAD_PRACTICE")
    public String format(@Nonnull Date date) {
        SimpleDateFormat dateFormat = dateFormats.poll();
        if (dateFormat == null) {
            dateFormat = new SimpleDateFormat(pattern, locale);
            dateFormat.setTimeZone(timeZone);
        }
        try {
            return dateFormat.format(date);
        } finally {
            dateFormats.offer(dateFormat);
        }
    }
268326
@Override
    public void setValue(Object value) {
        if (value != null) {
            Calendar c = (Calendar) value;
            ((JTextField) editor).setText(DEFAULT_DATE_FORMAT.format(c.getTime()));
        }
    }
1339078
public final void setValue(Object value) {
        if (value instanceof Date) {
            content = formatDateTime((Date)value);
        } else
            if (value != null) {
                content = value.toString();
            } else {
                content = null;
            }
    }
907735
public static final Date parseDateTime(String value)
   {
      Date result = null;

      try
      {
         if (value != null && !value.isEmpty())
         {
            result = DATE_TIME_FORMAT.get().parse(value);
         }
      }
      catch (ParseException ex)
      {
         // Ignore
      }

      return result;
   }
989944
protected String formatToString(Object value) {
        if (value == null) return null;
        if (value instanceof CharSequence) {
            return new StringBuilder().append('\'').append(value.toString().replace("'", "\\'")).append('\'').toString();
        } else if (!(value instanceof Number) && !(value instanceof java.util.Date)
            && !value.getClass().getName().startsWith("java.sql.") && !value.getClass().getName().startsWith("java.time.")) {
            return new StringBuilder().append('\'').append(jsonConvert.convertTo(value).replace("'", "\\'")).append('\'').toString();
        }
        return String.valueOf(value);
    }
713980
public static Date toDate(Object value, Date defaultValue) {
		return convert(Date.class, value, defaultValue);
	}
783652
public static <T extends Comparable<?>> DateExpression<T> asDate(T value) {
        return asDate(constant(value));
    }
1239422
protected function formatValue($value)
    {
        // If the value is a date we'll format it according to the specified
        // date format.
        if ($value instanceof DateTime || $value instanceof Carbon)
        {
            $value = $value->format($this->grammar->getDateFormat());
        }

        return $value;
    }
1332762
protected static final String formatUsingFormat(Long value, DateTimeFormat fmt) {
        if (value == null) {
            return "";
        }
        else {
            // midnight GMT
            Date date = new Date(0);
            // offset by timezone and value
            date.setTime(UTCDateBox.timezoneOffsetMillis(date) + value.longValue());
            // format it
            return fmt.format(date);
        }
    }
194030
public static String formatDate(Date date) {
        return org.apache.http.client.utils.DateUtils.formatDate(date);
    }
531548
public String marshal( Date value )
    {
        Timestamp timeStampDate = new Timestamp( value.getTime() );
        return timeStampDate.toString();
    }
890844
public static final Date parseDate(String value)
   {
      Date result = null;

      try
      {
         if (value != null && !value.isEmpty())
         {
            result = DATE_FORMAT.get().parse(value);
         }
      }
      catch (ParseException ex)
      {
         // Ignore
      }

      return result;
   }
906481
public static java.util.Date toDateTime(Object value) throws ParseException {
        if (value == null) {
            return null;
        }
        if (value instanceof java.util.Date) {
            return (java.util.Date) value;
        }
        if (value instanceof String) {
            if ("".equals((String) value)) {
                return null;
            }
            return IN_DATETIME_FORMAT.parse((String) value);
        }

        return IN_DATETIME_FORMAT.parse(value.toString());
    }
63310
public static String formatDate(int style,Date date){
		if (date == null) {
			return "";
		}
		if (style < 0) {
			style = DateFormat.DEFAULT;
		}
		return DateFormat.getDateInstance(style).format(date);
	}
244398
public static String formatDate(final Date value, final String pattern)
    {
        return new SimpleDateFormat(pattern, context.get().getLocale()).format(value);
    }
583003
public static final String printDate(Date value)
   {
      return (value == null ? null : DATE_FORMAT.get().format(value));
   }