public static function ToString( $value, $provider = null )
	{
		if ( $value instanceof XPath2Item )
		{
			return $value->getValue();
		}

		if ( $value instanceof \DateTime )
		{
			// Use locale information to create a formatted string
			$collator = \Collator::create( null );
			$locale = $collator->getLocale( \Locale::VALID_LOCALE );

			$dateTime = \IntlDateFormatter::create( $locale, \IntlDateFormatter::SHORT, \IntlDateFormatter::NONE );
			return $dateTime->format( $value );
		}
		return $value . "";
	}
public static function ToString( $value, $provider = null )
	{
		if ( $value instanceof XPath2Item )
		{
			return $value->getValue();
		}

		if ( $value instanceof \DateTime )
		{
			// Use locale information to create a formatted string
			$collator = \Collator::create( null );
			$locale = $collator->getLocale( \Locale::VALID_LOCALE );

			$dateTime = \IntlDateFormatter::create( $locale, \IntlDateFormatter::SHORT, \IntlDateFormatter::NONE );
			return $dateTime->format( $value );
		}
		return $value . "";
	}
public static function ToString ( $ value , $ provider = null ) { if ( $ value instanceof XPath2Item ) { return $ value -> getValue ( ) ; } if ( $ value instanceof \ DateTime ) { // Use locale information to create a formatted string
 $ collator = \ Collator :: create ( null ) ; $ locale = $ collator -> getLocale ( \ Locale :: VALID_LOCALE ) ; $ dateTime = \ IntlDateFormatter :: create ( $ locale , \ IntlDateFormatter :: SHORT , \ IntlDateFormatter :: NONE ) ; return $ dateTime -> format ( $ value ) ; } return $ value . "" ; }
Converts the value of this instance to an equivalent System.String using the
specified culture-specific formatting information.

@param object $value The value to convert
@param IFormatProvider $provider An interface implementation that supplies culture-specific formatting information.
@return string A string instance equivalent to the value of this instance.
Converts the value of this instance to an equivalent System . String using the specified culture - specific formatting information .