Query: datefmt_get_calendar
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
DATEFMT_GET_CALENDAR(3) 1 DATEFMT_GET_CALENDAR(3) IntlDateFormatter::getCalendar - Get the calendar type used for the IntlDateFormatter Object oriented styleSYNOPSISint IntlDateFormatter::getCalendar (void )DESCRIPTIONProcedural style int datefmt_get_calendar (IntlDateFormatter $fmt)PARAMETERSo $fmt - The formatter resourceRETURN VALUESThe calendar type being used by the formatter. Either IntlDateFormatter::TRADITIONAL or IntlDateFormatter::GREGORIAN.EXAMPLESExample #1 datefmt_get_calendar(3) example <?php $fmt = datefmt_create( 'en_US', IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'America/Los_Angeles', IntlDateFormatter::GREGORIAN ); echo 'calendar of the formatter is : ' . datefmt_get_calendar($fmt); datefmt_set_calendar($fmt, IntlDateFormatter::TRADITIONAL); echo 'Now calendar of the formatter is : ' . datefmt_get_calendar($fmt); ?> Example #2 OO example <?php $fmt = new IntlDateFormatter( 'en_US', IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'America/Los_Angeles', IntlDateFormatter::GREGORIAN ); echo 'calendar of the formatter is : ' . $fmt->getCalendar(); $fmt->setCalendar(IntlDateFormatter::TRADITIONAL); echo 'Now calendar of the formatter is : ' . $fmt->getCalendar(); ?> The above example will output: calendar of the formatter is : 1 Now calendar of the formatter is : 0SEE ALSOdatefmt_get_calendar_object(3), datefmt_set_calendar(3), datefmt_create(3). PHP Documentation Group DATEFMT_GET_CALENDAR(3)
Related Man Pages |
---|
intldateformatter.getcalendar(3) - php |
datefmt_get_error_message(3) - php |
datefmt_get_locale(3) - php |
datefmt_get_timetype(3) - php |
datefmt_set_calendar(3) - php |
Similar Topics in the Unix Linux Community |
---|
Cosmo 0.11 (Stable branch) |
Cosmo 0.12.0 (Stable branch) |
Cosmo 0.14.0 (Stable branch) |
Cosmo 0.14.1 (Stable branch) |
Determine FULL name of current script |