Клас IntlTimeZone
(PHP 5 >= 5.5.0, PHP 7, PHP 8, PECL >= 3.0.0a1)
Вступ
Огляд класів
class IntlTimeZone
{
/* Константы */
public
const
int
DISPLAY_SHORT;
public
const
int
DISPLAY_LONG;
public
const
int
DISPLAY_SHORT_GENERIC;
public
const
int
DISPLAY_LONG_GENERIC;
public
const
int
DISPLAY_SHORT_GMT;
public
const
int
DISPLAY_LONG_GMT;
public
const
int
DISPLAY_SHORT_COMMONLY_USED;
public
const
int
DISPLAY_GENERIC_LOCATION;
public
const
int
TYPE_ANY;
public
const
int
TYPE_CANONICAL;
public
const
int
TYPE_CANONICAL_LOCATION;
/* Методы */
private __construct()
public static countEquivalentIDs(string $timezoneId): int|false
public static createDefault(): IntlTimeZone
public static createEnumeration(IntlTimeZone|string|int|float|null $countryOrRawOffset = null): IntlIterator|false
public static createTimeZone(string $timezoneId): ?IntlTimeZone
public static createTimeZoneIDEnumeration(int $type, ?string $region = null, ?int $rawOffset = null): IntlIterator|false
public static fromDateTimeZone(DateTimeZone $timezone): ?IntlTimeZone
public static getCanonicalID(string $timezoneId, bool &$isSystemId = null): string|false
public getDisplayName(bool $dst = false, int $style = IntlTimeZone::DISPLAY_LONG, ?string $locale = null): string|false
public getDSTSavings(): int
public static getEquivalentID(string $timezoneId, int $offset): string|false
public getErrorCode(): int|false
public getErrorMessage(): string|false
public static getGMT(): IntlTimeZone
public getID(): string|false
public static getIDForWindowsID(string $timezoneId, ?string $region = null): string|false
public getOffset( float $timestamp, bool $local, int &$rawOffset, int &$dstOffset): bool
public getRawOffset(): int
public static getRegion(string $timezoneId): string|false
public static getTZDataVersion(): string|false
public static getUnknown(): IntlTimeZone
public static getWindowsID(string $timezoneId): string|false
public hasSameRules(IntlTimeZone $other): bool
public toDateTimeZone(): DateTimeZone|false
public useDaylightTime(): bool
}
Обумовлені константи
IntlTimeZone::DISPLAY_SHORT
IntlTimeZone::DISPLAY_LONG
IntlTimeZone::DISPLAY_SHORT_GENERIC
IntlTimeZone::DISPLAY_LONG_GENERIC
IntlTimeZone::DISPLAY_SHORT_GMT
IntlTimeZone::DISPLAY_LONG_GMT
IntlTimeZone::DISPLAY_SHORT_COMMONLY_USED
IntlTimeZone::DISPLAY_GENERIC_LOCATION
IntlTimeZone::TYPE_ANY
IntlTimeZone::TYPE_CANONICAL
IntlTimeZone::TYPE_CANONICAL_LOCATION
Зміст
- IntlTimeZone::__construct - Конструктор класу, який забороняє пряме створення екземпляра
- IntlTimeZone::countEquivalentIDs— Отримати кількість ідентифікаторів у групі схожих часових поясів, включаючи цей ідентифікатор
- IntlTimeZone::createDefault— Створити нову копію часового поясу за промовчанням для поточного хоста
- IntlTimeZone::createEnumeration— Отримати перерахування з ідентифікаторів часових поясів за вказаною країною або усунення
- IntlTimeZone::createTimeZone— Створити об'єкт часового поясу по заданому ідентифікатору
- IntlTimeZone::createTimeZoneIDEnumeration— Отримати перерахування з ідентифікаторів системних часових поясів за умовами фільтрації
- IntlTimeZone::fromDateTimeZone— Створити об'єкт часового поясу з DateTimeZone
- IntlTimeZone::getCanonicalID— Отримати канонічний системний ідентифікатор часового поясу або нормалізований ідентифікатор часового поясу по заданому ідентифікатору часового поясу
- IntlTimeZone::getDisplayName— Отримати ім'я часового поясу для відображення користувача
- IntlTimeZone::getDSTSavings— Отримати кількість мілісекунд, яку потрібно додати до місцевого поясного часу, щоб отримати літній час
- IntlTimeZone::getEquivalentID— Отримати ідентифікатор у групі схожих часових поясів, включаючи заданий ідентифікатор
- IntlTimeZone::getErrorCode— Отримати останній код про помилку в об'єкті
- IntlTimeZone::getErrorMessage— Отримати останнє повідомлення про помилку в об'єкті
- IntlTimeZone::getGMT— Створити часовий пояс GMT (UTC)
- IntlTimeZone::getID— Отримати ідентифікатор часового поясу
- IntlTimeZone::getIDForWindowsID— Перетворити часовий пояс для Windows на системний часовий пояс
- IntlTimeZone::getOffset— Отримати необроблене значення часового поясу та усунення за Грінвічем (GMT) за заданим моментом часу
- IntlTimeZone::getRawOffset— Отримати необроблене значення зсуву за Грінвічем (GMT) без урахування літнього часу
- IntlTimeZone::getRegion— Отримати код регіону, який відповідає заданому ідентифікатору системного часового поясу
- IntlTimeZone::getTZDataVersion— Отримати версію даних про часовий пояс, який зараз використовується в ICU
- IntlTimeZone::getUnknown— Отримати невідомий часовий пояс (unknown)
- IntlTimeZone::getWindowsID— Перетворити часовий пояс на часовий пояс для Windows
- IntlTimeZone::hasSameRules— Перевірити, що в іншому часовому поясі використовуються ті самі правила та усунення, що й у першому заданому
- IntlTimeZone::toDateTimeZone— Перетворити на об'єкт DateTimeZone
- IntlTimeZone::useDaylightTime— Перевірити, що в даному часовому поясі використовується літній час