code: public static function format($datetime, $format = DateFormat::FORMAT_SHORT)
      {
          $datetime = strtotime($datetime);
          if (!$datetime) {
              return '';
          }
          return date($format, $datetime);
      }
docs: Format date
  @author Olawale Lawal <wale@cottacush.com>
  @param $format
  @param $datetime
  @return bool|string