1 date.class.inc public BackdropDateTime::format($format, $force = FALSE)

File

core/includes/date.class.inc, line 233

Class

BackdropDateTime
Extends PHP DateTime class for use with Backdrop.

Code

public function format($format, $force = FALSE) {
  // If there are errors, formatting will likely not succeed. Return FALSE.
  if (!empty($this->errors)) {
    return FALSE;
  }
  return parent::format($force ? $format : date_limit_format($format, $this->granularity));
}