You are here

protected function DatexObject::formatINTL in Datex 7.2

Format datetime using PHP-Intl.

1 call to DatexObject::formatINTL()
DatexObject::format in datex_api/datex_api.class.inc
Similar to DateTime::format().

File

datex_api/datex_api.class.inc, line 553
Provides an API to work with dates.

Class

DatexObject
Base class for localized DateTime.

Code

protected function formatINTL($format) {
  $this->intlFormatter
    ->setPattern($this
    ->phpToIntl($format));
  $date = $this->intlFormatter
    ->format($this
    ->getTimestamp());

  // Replace localized number charachters with english equivalant.
  // @TODO check to see if Intl has support of this by itself?
  return self::decor($date, FALSE);
}