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 . "";
	}