You are here

function _brightcove_format_date in Brightcove Video Connect 7.7

Same name and namespace in other branches
  1. 7.6 brightcove.video.inc \_brightcove_format_date()

Format a date.

1 call to _brightcove_format_date()
brightcove_video_form in ./brightcove.video.inc
Brightcove video entity form.

File

./brightcove.video.inc, line 667
Brightcove video related functions.

Code

function _brightcove_format_date($datestring, $expected_format = 'Y-m-d H:i') {
  if (!$datestring) {
    return NULL;
  }
  $datetime = new DateTime($datestring);
  return $datetime
    ->format($expected_format);
}