Wednesday, February 8, 2012

Format Date Based On User Culture in Action in Symfony

$user_culture = $this->getUser()->getCulture();
$formatdate = new sfDateFormat($user_culture);
echo $formatdate->format(strtotime('2012-02-08'), 'd'); // 'd' is a pattern

No comments:

Post a Comment