/**
  * Parses a date value into a UNIX-Timestamp
  * 
  * @param string $value string representing date
  * @param string $format the expected date format
  * @param string $locale string the locale ID that is used to localize the date parsing.
  * This is only effective when the [PHP intl extension](http://php.net/manual/en/book.intl.php) is installed.
  * If not set, the locale of the [[\yii\base\Application::formatter|formatter]] will be used.
  * See also [[\yii\i18n\Formatter::locale]].
  * @param string $timeZone the timezone to use for parsing date and time values.
  * This can be any value that may be passed to [date_default_timezone_set()](http://www.php.net/manual/en/function.date-default-timezone-set.php)
  * e.g. `UTC`, `Europe/Berlin` or `America/Chicago`.
  * Refer to the [php manual](http://www.php.net/manual/en/timezones.php) for available timezones.
  * If this property is not set, [[\yii\base\Application::timeZone]] will be used.
  * @return integer|boolean a UNIX timestamp or `false` on failure.
  */
 public static function parseFromDate($value, $format, $locale = null, $timeZone = 'UTC')
 {
     //default values
     $locale = $locale === null ? Yii::$app->language : $locale;
     //decide which parser to use
     if (strncmp($format, 'php:', 4) === 0) {
         $format = substr($format, 4);
     } else {
         if (ServerConfig::extIntlLoaded()) {
             return static::parseDateValueIntl($value, $format, $locale, $timeZone);
         } else {
             $format = FormatConverter::convertDateIcuToPhp($format, 'date');
         }
     }
     return static::parseDateValuePHP($value, $format, $timeZone);
 }