intldateformatter.getcalendar(3) php man page | unix.com

Man Page: intldateformatter.getcalendar

Operating Environment: php

Section: 3

INTLDATEFORMATTER.GETCALENDAR(3)					 1					  INTLDATEFORMATTER.GETCALENDAR(3)

IntlDateFormatter::getCalendar - Get the calendar type used for the IntlDateFormatter

	Object oriented style

SYNOPSIS
int IntlDateFormatter::getCalendar (void )
DESCRIPTION
Procedural style int datefmt_get_calendar (IntlDateFormatter $fmt)
PARAMETERS
o $fmt - The formatter resource
RETURN VALUES
The calendar type being used by the formatter. Either IntlDateFormatter::TRADITIONAL or IntlDateFormatter::GREGORIAN.
EXAMPLES
Example #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 : 0
SEE ALSO
datefmt_get_calendar_object(3), datefmt_set_calendar(3), datefmt_create(3). PHP Documentation Group INTLDATEFORMATTER.GETCALENDAR(3)
Related Man Pages
datefmt_get_datetype(3) - php
datefmt_get_error_message(3) - php
datefmt_get_timetype(3) - php
datefmt_set_timezone_id(3) - php
intldateformatter.gettimezoneid(3) - php
Similar Topics in the Unix Linux Community
iCalcreator 2.4.3 (Default branch)
Kronolith H3 (2.1.8) (Horde 3 branch)
Cosmo 0.14.2 (Development branch)
Cosmo 0.15.1 (Development branch)
Determine FULL name of current script