- if (isset($GLOBALS['i18n'])) {
- // replace locale-dependent strings
- $format = str_replace('%a', mb_substr($i18n->getWeekDayName($this->mDay), 0, 3, 'utf-8'), $format);
- $format = str_replace('%A', $i18n->getWeekDayName($this->mDay), $format);
- $abbrev_month = mb_substr($i18n->monthNames[$this->mMonth], 0, 3, 'utf-8');
- $format = str_replace('%b', $abbrev_month, $format);
- $format = str_replace('%h', $abbrev_month, $format);
- $format = str_replace('%z', date('O'), $format);
- $format = str_replace('%Z', date('O'), $format); // format as 'O' for consistency with JS strftime
- if (strpos($format, '%c') !== false) {
- $format = str_replace('%c', $this->preprocessFormatString('%a %d %b %Y %T %Z'), $format);
- }
+
+ // replace locale-dependent strings
+ $format = str_replace('%a', mb_substr($i18n->getWeekDayName($this->mDay), 0, 3, 'utf-8'), $format);
+ $format = str_replace('%A', $i18n->getWeekDayName($this->mDay), $format);
+ $abbrev_month = mb_substr($i18n->monthNames[$this->mMonth], 0, 3, 'utf-8');
+ $format = str_replace('%b', $abbrev_month, $format);
+ $format = str_replace('%h', $abbrev_month, $format);
+ $format = str_replace('%z', date('O'), $format);
+ $format = str_replace('%Z', date('O'), $format); // format as 'O' for consistency with JS strftime
+ if (strpos($format, '%c') !== false) {
+ $format = str_replace('%c', $this->preprocessFormatString('%a %d %b %Y %T %Z'), $format);