public static function standardizeDate($string)
    {
        // Only standardize dates in localized environments
        if (self::isLocalized()) {

            // Translate names to English
            foreach (self::$_datetime_dictionary as $values) {
                $string = preg_replace('/\b' . self::translate($values) . '\b/i' . (self::isUnicodeCompiled() === true ? 'u' : null), $values, $string);
            }

            // Replace custom date and time separator with space:
            // This is important, otherwise the `DateTime` constructor may break
            // @todo Test if this separator is still required. It's a hidden setting
            // and users are only aware of it if they go digging/pointed in the right direction
            $separator = Symphony::Configuration()->get('datetime_separator', 'region');
            if ($separator !== ' ') {
                $string = str_replace($separator, ' ', $string);
            }
        }

        return $string;
    }
public static function standardizeDate($string)
    {
        // Only standardize dates in localized environments
        if (self::isLocalized()) {

            // Translate names to English
            foreach (self::$_datetime_dictionary as $values) {
                $string = preg_replace('/\b' . self::translate($values) . '\b/i' . (self::isUnicodeCompiled() === true ? 'u' : null), $values, $string);
            }

            // Replace custom date and time separator with space:
            // This is important, otherwise the `DateTime` constructor may break
            // @todo Test if this separator is still required. It's a hidden setting
            // and users are only aware of it if they go digging/pointed in the right direction
            $separator = Symphony::Configuration()->get('datetime_separator', 'region');
            if ($separator !== ' ') {
                $string = str_replace($separator, ' ', $string);
            }
        }

        return $string;
    }
public static function standardizeDate ( $ string ) { // Only standardize dates in localized environments if ( self :: isLocalized ( ) ) { // Translate names to English foreach ( self :: $ _datetime_dictionary as $ values ) { $ string = preg_replace ( '/\b' . self :: translate ( $ values ) . '\b/i' . ( self :: isUnicodeCompiled ( ) === true ? 'u' : null ) , $ values , $ string ) ; } // Replace custom date and time separator with space: // This is important, otherwise the `DateTime` constructor may break // @todo Test if this separator is still required. It's a hidden setting // and users are only aware of it if they go digging/pointed in the right direction $ separator = Symphony :: Configuration ( ) -> get ( 'datetime_separator' , 'region' ) ; if ( $ separator !== ' ' ) { $ string = str_replace ( $ separator , ' ' , $ string ) ; } } return $ string ; }
Standardize dates.

@param string $string
Localized date that should be standardized
@return string
Returns the given date with English month and day names
Standardize dates .