public static function createDateFromDateTime(DateTime $dateTime, DateTimeZone $dateTimeZone = NULL) {
    $openYLocaleDate = new OpenYLocaleDate();
    $openYLocaleDate->setDateFromDateTime($dateTime, $dateTimeZone);
    return $openYLocaleDate;
  }
public static function createDateFromDateTime(DateTime $dateTime, DateTimeZone $dateTimeZone = NULL) {
    $openYLocaleDate = new OpenYLocaleDate();
    $openYLocaleDate->setDateFromDateTime($dateTime, $dateTimeZone);
    return $openYLocaleDate;
  }
public static function createDateFromDateTime ( DateTime $ dateTime , DateTimeZone $ dateTimeZone = NULL ) { $ openYLocaleDate = new OpenYLocaleDate ( ) ; $ openYLocaleDate -> setDateFromDateTime ( $ dateTime , $ dateTimeZone ) ; return $ openYLocaleDate ; }
Creates a new OpenYLocaleDate from a DateTime object.

@param \DateTime $dateTime
@param \DateTimeZone|null $dateTimeZone

@return \Drupal\openy_campaign\OpenYLocaleDate
Creates a new OpenYLocaleDate from a DateTime object .