/* * Copyright (C)2005-2021 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ package php; import haxe.extern.EitherType; /** @see https://www.php.net/manual/en/class.intldateformatter.php **/ @:native("IntlDateFormatter") extern class IntlDateFormatter { @:phpClassConst static final FULL: Int; @:phpClassConst static final GREGORIAN: Int; @:phpClassConst static final LONG: Int; @:phpClassConst static final MEDIUM: Int; @:phpClassConst static final NONE: Int; @:phpClassConst static final RELATIVE_FULL: Int; @:phpClassConst static final RELATIVE_LONG: Int; @:phpClassConst static final RELATIVE_MEDIUM: Int; @:phpClassConst static final RELATIVE_SHORT: Int; @:phpClassConst static final SHORT: Int; @:phpClassConst static final TRADITIONAL: Int; function new(locale: Null, dateType: Int, timeType: Int, timezone: EitherType> = null, calendar: EitherType = null, pattern: String = ""); static function create(locale: Null, dateType: Int, timeType: Int, timezone: EitherType> = null, calendar: EitherType = null, pattern: String = ""): Null; static function formatObject(datetime: EitherType, format: EitherType, String>> = null, locale: String = null): EitherType; function format(datetime: EitherType>>>>>): EitherType; function getCalendar(): EitherType; function getCalendarObject(): EitherType, Bool>; function getDateType(): EitherType; function getErrorCode(): Int; function getErrorMessage(): String; function getLocale(?type: Int): EitherType; function getPattern(): EitherType; function getTimeType(): EitherType; function getTimeZone(): EitherType; function getTimeZoneId(): EitherType; function isLenient(): Bool; function localtime(string: String, offset: Ref = null): EitherType, Bool>; function parse(string: String, offset: Ref = null): EitherType>; function setCalendar(calendar: EitherType, Int>): Bool; function setLenient(lenient: Bool): Bool; function setPattern(pattern: String): Bool; function setTimeZone(timezone: EitherType, EitherType>): Null; }