|
IntlDateFormatter::createdatefmt_createIntlDateFormatter::__constructCreate a date formatter DescriptionObject-oriented style
public static IntlDateFormatternull IntlDateFormatter::create(
stringnull $locale ,int $dateType = IntlDateFormatter::FULL,int $timeType = IntlDateFormatter::FULL,IntlTimeZoneDateTimeZonestringnull $timezone = null ,IntlCalendarintnull $calendar = null ,stringnull $pattern = null ) Object-oriented style (constructor) public IntlDateFormatter::__construct(
stringnull $locale ,int $dateType = IntlDateFormatter::FULL,int $timeType = IntlDateFormatter::FULL,IntlTimeZoneDateTimeZonestringnull $timezone = null ,IntlCalendarintnull $calendar = null ,stringnull $pattern = null ) Procedural style IntlDateFormatternull datefmt_create(
stringnull $locale ,int $dateType = IntlDateFormatter::FULL,int $timeType = IntlDateFormatter::FULL,IntlTimeZoneDateTimeZonestringnull $timezone = null ,IntlCalendarintnull $calendar = null ,stringnull $pattern = null ) Create a date formatter. Parameters
Return Values
The created IntlDateFormatter or Changelog
ExamplesExample #1 datefmt_create example
Example #2 OO example
Example #3 Example of invalid locale handling
The above example will output: First Formatted output is Wednesday, December 31, 1969 4:00:00 PM PT Second Formatted output is Mittwoch, 31. Dezember 1969 16:00 Uhr GMT-08:00 First Formatted output with pattern is 12/31/1969 Second Formatted output with pattern is 12/31/1969 See Also
|