public function DatexObject::setUseINTL in Datex 7.2
Set whether to use PHP-Intl or not.
Checks and makes sure PHP-Intl is available.
1 call to DatexObject::setUseINTL()
- DatexObject::__construct in datex_api/
datex_api.class.inc - Constructor for DatexObject.
File
- datex_api/
datex_api.class.inc, line 201 - Provides an API to work with dates.
Class
- DatexObject
- Base class for localized DateTime.
Code
public function setUseINTL($use = NULL) {
if (!$this
->hasINTL()) {
$this->useINTL = FALSE;
return;
}
if ($use || $use === NULL && DATEX_USE_INTL) {
$this
->setIntlArgs();
$this->useINTL = TRUE;
$this
->createINTLFormatter($this
->getTimezone());
}
else {
$this->useINTL = FALSE;
}
return $this->useINTL;
}