public static function createDateFromFormat($date = 'now', DateTimeZone $dateTimeZone = NULL) {
    $openYLocaleDate = new OpenYLocaleDate();
    $openYLocaleDate->setDateFromFormat($date, $dateTimeZone);
    return $openYLocaleDate;
  }
public static function createDateFromFormat($date = 'now', DateTimeZone $dateTimeZone = NULL) {
    $openYLocaleDate = new OpenYLocaleDate();
    $openYLocaleDate->setDateFromFormat($date, $dateTimeZone);
    return $openYLocaleDate;
  }
public static function createDateFromFormat ( $ date = 'now' , DateTimeZone $ dateTimeZone = NULL ) { $ openYLocaleDate = new OpenYLocaleDate ( ) ; $ openYLocaleDate -> setDateFromFormat ( $ date , $ dateTimeZone ) ; return $ openYLocaleDate ; }
Creates a new OpenYLocaleDate from a formatted date string.

@param string $date
@param \DateTimeZone|null $dateTimeZone

@return \Drupal\openy_campaign\OpenYLocaleDate
Creates a new OpenYLocaleDate from a formatted date string .