public function DatexObject::format in Datex 7
Same name and namespace in other branches
- 7.2 datex_api/datex_api.class.inc \DatexObject::format()
Similar to DateTime::format().
Parameters
string $format: Format string.
bool $use_intl: Whether to use php-intl or not.
3 calls to DatexObject::format()
- DatexObject::setDate in datex_api/
datex_api_classes.inc - Sets date and time zone.
- DatexObject::toArray in datex_api/
datex_api_classes.inc - Returns date granularities put in an array.
- DatexObject::__toString in datex_api/
datex_api_classes.inc - Magic Function toString.
File
- datex_api/
datex_api_classes.inc, line 693 - API and helper functions used by other datex modules.
Class
- DatexObject
- This class is Jalali equivilant of php DateTime. It also has some functionallity from object defiend in Drupal's date module DateObject.
Code
public function format($format = NULL, $use_intl = DATEX_USE_INTL) {
$format = $format ? $format : $this->formatString;
$tz = $this->dateobj
->getTimezone();
return DatexFormatter::format($this->dateobj, $format, $tz, $use_intl);
}