/**
* Returns the DateTimeFormatInfo associated with the specified culture.
* @param CultureInfo the culture that gets the DateTimeFormat property.
* @return DateTimeFormatInfo DateTimeFormatInfo for the specified
* culture.
*/
static function getInstance($culture = null)
{
if ($culture instanceof CultureInfo) {
return $culture->getDateTimeFormat();
} else {
if (is_string($culture)) {
$cultureInfo = CultureInfo::getInstance($culture);
return $cultureInfo->getDateTimeFormat();
} else {
$cultureInfo = CultureInfo::getInvariantCulture();
return $cultureInfo->getDateTimeFormat();
}
}
}