downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

IntlDateFormatter::getDateType> <IntlDateFormatter::formatObject
[edit] Last updated: Fri, 24 May 2013

view this page in

IntlDateFormatter::getCalendar

datefmt_get_calendar

(PHP 5 >= 5.3.0, PECL intl >= 1.0.0)

IntlDateFormatter::getCalendar -- datefmt_get_calendarObtener el calendario usado por un formateador de IntlDateFormatter

Descripción

Estilo orientado a objetos

int IntlDateFormatter::getCalendar ( void )

Estilo por procedimientos

int datefmt_get_calendar ( IntlDateFormatter $fmt )

Parámetros

fmt

El recurso del formatedor

Valores devueltos

El calendario que está siendo usado por el formateador.

Ejemplos

Ejemplo #1 Ejemlo de datefmt_get_calendar()

<?php
$fmt 
datefmt_create(  "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN  );
echo 
"El calendario del formateador es : ".datefmt_get_calendar($fmt);
datefmt_set_calendar($fmt,IntlDateFormatter::TRADITIONAL);
echo 
"Ahora el calendario del formateador es : ".datefmt_get_calendar($fmt);
?>

Ejemplo #2 Ejemplo orientado a objetos

<?php
$fmt 
= new IntlDateFormatter"en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN  );
echo 
"El calendario del formateador es : ".$fmt->getCalendar();
$fmt->setCalendar(IntlDateFormatter::TRADITIONAL);
echo 
"Ahora el calendario del formateador es : ".$fmt->getCalendar();

?>

El resultado del ejemplo sería:

El calendario del formateador es : 1
Ahora el calendario del formateador es  : 0

Ver también



add a note add a note User Contributed Notes IntlDateFormatter::getCalendar - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites