mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
DateFormatter -> IntlDateFormatter
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@259135 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
0b530910e1
commit
e4d9a5e410
19 changed files with 183 additions and 183 deletions
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<section xml:id="intl.dateformatter-constants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<section xml:id="intl.intldateformatter-constants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.constants;
|
||||
|
||||
<para>
|
||||
|
@ -9,7 +9,7 @@
|
|||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>DateFormatter::NONE</constant>
|
||||
<constant>IntlDateFormatter::NONE</constant>
|
||||
(<type>string</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
|
@ -18,7 +18,7 @@
|
|||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>DateFormatter::FULL</constant>
|
||||
<constant>IntlDateFormatter::FULL</constant>
|
||||
(<type>string</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
|
@ -27,7 +27,7 @@
|
|||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>DateFormatter::LONG</constant>
|
||||
<constant>IntlDateFormatter::LONG</constant>
|
||||
(<type>string</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
|
@ -36,7 +36,7 @@
|
|||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>DateFormatter::MEDIUM</constant>
|
||||
<constant>IntlDateFormatter::MEDIUM</constant>
|
||||
(<type>string</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
|
@ -45,7 +45,7 @@
|
|||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>DateFormatter::SHORT</constant>
|
||||
<constant>IntlDateFormatter::SHORT</constant>
|
||||
(<type>string</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
|
@ -56,7 +56,7 @@
|
|||
</para>
|
||||
</section>
|
||||
|
||||
<section xml:id="intl.dateformatter-constants.calendartypes">
|
||||
<section xml:id="intl.intldateformatter-constants.calendartypes">
|
||||
<para>
|
||||
The following int constants are used to specify the calendar.
|
||||
These calendars are all based directly on the Gregorian calendar.
|
||||
|
@ -65,7 +65,7 @@
|
|||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>DateFormatter::TRADITIONAL</constant>
|
||||
<constant>IntlDateFormatter::TRADITIONAL</constant>
|
||||
(<type>string</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
|
@ -74,7 +74,7 @@
|
|||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>DateFormatter::GREGORIAN</constant>
|
||||
<constant>IntlDateFormatter::GREGORIAN</constant>
|
||||
(<type>string</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<reference xml:id="class.dateformatter" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<title>The DateFormatter class</title>
|
||||
<titleabbrev>DateFormatter</titleabbrev>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<reference xml:id="class.intldateformatter" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<title>The IntlDateFormatter class</title>
|
||||
<titleabbrev>IntlDateFormatter</titleabbrev>
|
||||
|
||||
<partintro>
|
||||
|
||||
<!-- {{{ DateFormatter intro -->
|
||||
<section xml:id="dateformatter.intro">
|
||||
<!-- {{{ IntlDateFormatter intro -->
|
||||
<section xml:id="intldateformatter.intro">
|
||||
&reftitle.intro;
|
||||
<simpara>
|
||||
Date Formatter is a concrete class that enables locale-dependent formatting/parsing
|
||||
|
@ -22,33 +22,33 @@
|
|||
</section>
|
||||
<!-- }}} -->
|
||||
|
||||
<section xml:id="dateformatter.synopsis">
|
||||
<section xml:id="intldateformatter.synopsis">
|
||||
<title>Class synopsis</title>
|
||||
|
||||
<!-- {{{ Synopsis -->
|
||||
<classsynopsis>
|
||||
<ooclass>
|
||||
<classname>DateFormatter</classname>
|
||||
<classname>IntlDateFormatter</classname>
|
||||
</ooclass>
|
||||
|
||||
<!-- {{{ Class synopsis -->
|
||||
<classsynopsisinfo>
|
||||
<ooclass>
|
||||
<classname>DateFormatter</classname>
|
||||
<classname>IntlDateFormatter</classname>
|
||||
</ooclass>
|
||||
</classsynopsisinfo>
|
||||
|
||||
<classsynopsisinfo role="comment">Methods</classsynopsisinfo>
|
||||
<xi:include
|
||||
xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.dateformatter')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[1])" />
|
||||
xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.intldateformatter')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[1])" />
|
||||
<xi:include
|
||||
xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.dateformatter')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
|
||||
xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.intldateformatter')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
|
||||
</classsynopsis>
|
||||
<!-- }}} -->
|
||||
|
||||
</section>
|
||||
|
||||
<section xml:id="dateformatter.seealso">
|
||||
<section xml:id="intldateformatter.seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<refentry xml:id="dateformatter.create" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<refentry xml:id="intldateformatter.create" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>DateFormatter::create</refname>
|
||||
<refname>IntlDateFormatter::create</refname>
|
||||
<refname>datefmt_create</refname>
|
||||
<refname>DateFormatter::__construct</refname>
|
||||
<refname>IntlDateFormatter::__construct</refname>
|
||||
<refpurpose>Create a date formatter</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
|
@ -14,7 +14,7 @@
|
|||
</para>
|
||||
<methodsynopsis>
|
||||
<modifier>static</modifier>
|
||||
<type>DateFormatter</type><methodname>DateFormatter::create</methodname>
|
||||
<type>IntlDateFormatter</type><methodname>IntlDateFormatter::create</methodname>
|
||||
<methodparam><type>string</type><parameter>locale</parameter></methodparam>
|
||||
<methodparam><type>integer</type><parameter>datetype</parameter></methodparam>
|
||||
<methodparam><type>integer</type><parameter>timetype</parameter></methodparam>
|
||||
|
@ -26,7 +26,7 @@
|
|||
Object oriented style (constructor)
|
||||
</para>
|
||||
<constructorsynopsis>
|
||||
<methodname>DateFormatter::__construct</methodname>
|
||||
<methodname>IntlDateFormatter::__construct</methodname>
|
||||
<methodparam><type>string</type><parameter>locale</parameter></methodparam>
|
||||
<methodparam><type>integer</type><parameter>datetype</parameter></methodparam>
|
||||
<methodparam><type>integer</type><parameter>timetype</parameter></methodparam>
|
||||
|
@ -38,7 +38,7 @@
|
|||
Procedural style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<type>DateFormatter</type><methodname>datefmt_create</methodname>
|
||||
<type>IntlDateFormatter</type><methodname>datefmt_create</methodname>
|
||||
<methodparam><type>string</type><parameter>locale</parameter></methodparam>
|
||||
<methodparam><type>integer</type><parameter>datetype</parameter></methodparam>
|
||||
<methodparam><type>integer</type><parameter>timetype</parameter></methodparam>
|
||||
|
@ -69,7 +69,7 @@
|
|||
<para>
|
||||
Date type to use (none, short, medium, long, full).
|
||||
This is one of the
|
||||
<link linkend="intl.dateformatter-constants">DateFormatter constants</link>.
|
||||
<link linkend="intl.intldateformatter-constants">IntlDateFormatter constants</link>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -79,7 +79,7 @@
|
|||
<para>
|
||||
Time type to use (none, short, medium, long, full).
|
||||
This is one of the
|
||||
<link linkend="intl.dateformatter-constants">DateFormatter constants</link>.
|
||||
<link linkend="intl.intldateformatter-constants">IntlDateFormatter constants</link>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -97,7 +97,7 @@
|
|||
<para>
|
||||
Calendar to use for formatting or parsing; default is Gregorian.
|
||||
This is one of the
|
||||
<link linkend="intl.dateformatter-constants.calendartypes">DateFormatter calendar constants</link>.
|
||||
<link linkend="intl.intldateformatter-constants.calendartypes">IntlDateFormatter calendar constants</link>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -127,14 +127,14 @@
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fmt = datefmt_create( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
$fmt = datefmt_create( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN );
|
||||
echo "First Formatted output is ".datefmt_format( $fmt , 0);
|
||||
$fmt = datefmt_create( "de-DE" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
$fmt = datefmt_create( "de-DE" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN );
|
||||
echo "Second Formatted output is ".datefmt_format( $fmt , 0);
|
||||
|
||||
$fmt = datefmt_create( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN ,"MM/dd/yyyy");
|
||||
$fmt = datefmt_create( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN ,"MM/dd/yyyy");
|
||||
echo "First Formatted output with pattern is ".datefmt_format( $fmt , 0);
|
||||
$fmt = datefmt_create( "de-DE" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN ,"MM/dd/yyyy");
|
||||
$fmt = datefmt_create( "de-DE" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN ,"MM/dd/yyyy");
|
||||
echo "Second Formatted output with pattern is ".datefmt_format( $fmt , 0);
|
||||
?>
|
||||
]]>
|
||||
|
@ -145,14 +145,14 @@ echo "Second Formatted output with pattern is ".datefmt_format( $fmt , 0);
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fmt = new DateFormatter( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
$fmt = new IntlDateFormatter( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN );
|
||||
echo "First Formatted output is ".$fmt->format(0);
|
||||
$fmt = new DateFormatter( "de-DE" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
$fmt = new IntlDateFormatter( "de-DE" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN );
|
||||
echo "Second Formatted output is ".$fmt->format(0);
|
||||
|
||||
$fmt = new DateFormatter( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN ,"MM/dd/yyyy");
|
||||
$fmt = new IntlDateFormatter( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN ,"MM/dd/yyyy");
|
||||
echo "First Formatted output with pattern is ".$fmt->format(0);
|
||||
$fmt = new DateFormatter( "de-DE" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN , "MM/dd/yyyy");
|
||||
$fmt = new IntlDateFormatter( "de-DE" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN , "MM/dd/yyyy");
|
||||
echo "Second Formatted output with pattern is ".$fmt->format(0);
|
||||
?>
|
||||
]]>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<refentry xml:id="dateformatter.format" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<refentry xml:id="intldateformatter.format" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>DateFormatter::format</refname>
|
||||
<refname>IntlDateFormatter::format</refname>
|
||||
<refname>datefmt_format</refname>
|
||||
<refpurpose>Format the date/time value as a string</refpurpose>
|
||||
</refnamediv>
|
||||
|
@ -12,7 +12,7 @@
|
|||
Object oriented style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>DateFormatter::format</methodname>
|
||||
<type>string</type><methodname>IntlDateFormatter::format</methodname>
|
||||
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -20,7 +20,7 @@
|
|||
</para>
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>datefmt_format</methodname>
|
||||
<methodparam><type>DateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
<methodparam><type>IntlDateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -68,14 +68,14 @@
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fmt = datefmt_create( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
$fmt = datefmt_create( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN );
|
||||
echo "First Formatted output is ".datefmt_format( $fmt , 0);
|
||||
$fmt = datefmt_create( "de-DE" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
$fmt = datefmt_create( "de-DE" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN );
|
||||
echo "Second Formatted output is ".datefmt_format( $fmt , 0);
|
||||
|
||||
$fmt = datefmt_create( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN ,"MM/dd/yyyy");
|
||||
$fmt = datefmt_create( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN ,"MM/dd/yyyy");
|
||||
echo "First Formatted output with pattern is ".datefmt_format( $fmt , 0);
|
||||
$fmt = datefmt_create( "de-DE" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN ,"MM/dd/yyyy");
|
||||
$fmt = datefmt_create( "de-DE" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN ,"MM/dd/yyyy");
|
||||
echo "Second Formatted output with pattern is ".datefmt_format( $fmt , 0);
|
||||
?>
|
||||
]]>
|
||||
|
@ -86,14 +86,14 @@ echo "Second Formatted output with pattern is ".datefmt_format( $fmt , 0);
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fmt = new DateFormatter( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
$fmt = new IntlDateFormatter( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN );
|
||||
echo "First Formatted output is ".$fmt->format(0);
|
||||
$fmt = new DateFormatter( "de-DE" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
$fmt = new IntlDateFormatter( "de-DE" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN );
|
||||
echo "Second Formatted output is ".$fmt->format(0);
|
||||
|
||||
$fmt = new DateFormatter( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN ,"MM/dd/yyyy");
|
||||
$fmt = new IntlDateFormatter( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN ,"MM/dd/yyyy");
|
||||
echo "First Formatted output with pattern is ".$fmt->format(0);
|
||||
$fmt = new DateFormatter( "de-DE" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN , "MM/dd/yyyy");
|
||||
$fmt = new IntlDateFormatter( "de-DE" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN , "MM/dd/yyyy");
|
||||
echo "Second Formatted output with pattern is ".$fmt->format(0);
|
||||
?>
|
||||
]]>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<refentry xml:id="dateformatter.getcalendar" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<refentry xml:id="intldateformatter.getcalendar" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>DateFormatter::getCalendar</refname>
|
||||
<refname>IntlDateFormatter::getCalendar</refname>
|
||||
<refname>datefmt_get_calendar</refname>
|
||||
<refpurpose>Get the calendar used for the DateFormatter</refpurpose>
|
||||
<refpurpose>Get the calendar used for the IntlDateFormatter</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
|
@ -12,7 +12,7 @@
|
|||
Object oriented style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<type>integer</type><methodname>DateFormatter::getCalendar</methodname>
|
||||
<type>integer</type><methodname>IntlDateFormatter::getCalendar</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -20,7 +20,7 @@
|
|||
</para>
|
||||
<methodsynopsis>
|
||||
<type>integer</type><methodname>datefmt_get_calendar</methodname>
|
||||
<methodparam><type>DateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
<methodparam><type>IntlDateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
</para>
|
||||
|
@ -57,9 +57,9 @@
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fmt = datefmt_create( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
$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,DateFormatter::TRADITIONAL);
|
||||
datefmt_set_calendar($fmt,IntlDateFormatter::TRADITIONAL);
|
||||
echo "Now calendar of the formatter is : ".datefmt_get_calendar($fmt);
|
||||
?>
|
||||
]]>
|
||||
|
@ -70,9 +70,9 @@ echo "Now calendar of the formatter is : ".datefmt_get_calendar($fmt);
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fmt = new DateFormatter( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
$fmt = new IntlDateFormatter( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN );
|
||||
echo "calendar of the formatter is : ".$fmt->getCalendar();
|
||||
$fmt->setCalendar(DateFormatter::TRADITIONAL);
|
||||
$fmt->setCalendar(IntlDateFormatter::TRADITIONAL);
|
||||
echo "Now calendar of the formatter is : ".$fmt->getCalendar();
|
||||
|
||||
?>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<refentry xml:id="dateformatter.getdatetype" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<refentry xml:id="intldateformatter.getdatetype" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>DateFormatter::getDateType</refname>
|
||||
<refname>IntlDateFormatter::getDateType</refname>
|
||||
<refname>datefmt_get_datetype</refname>
|
||||
<refpurpose>Get the datetype used for the DateFormatter</refpurpose>
|
||||
<refpurpose>Get the datetype used for the IntlDateFormatter</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
|
@ -12,7 +12,7 @@
|
|||
Object oriented style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<type>integer</type><methodname>DateFormatter::getDateType</methodname>
|
||||
<type>integer</type><methodname>IntlDateFormatter::getDateType</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -20,7 +20,7 @@
|
|||
</para>
|
||||
<methodsynopsis>
|
||||
<type>integer</type><methodname>datefmt_get_datetype</methodname>
|
||||
<methodparam><type>DateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
<methodparam><type>IntlDateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns date type used by the formatter.
|
||||
|
@ -47,7 +47,7 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
The current <link linkend="intl.dateformatter-constants">date type</link> value of the formatter.
|
||||
The current <link linkend="intl.intldateformatter-constants">date type</link> value of the formatter.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -58,10 +58,10 @@
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fmt = datefmt_create( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
$fmt = datefmt_create( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN );
|
||||
echo "datetype of the formatter is : ".datefmt_get_datetype($fmt);
|
||||
echo "First Formatted output with datetype is ".datefmt_format( $fmt , 0);
|
||||
$fmt = datefmt_create( "en_US" ,DateFormatter::SHORT,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
$fmt = datefmt_create( "en_US" ,IntlDateFormatter::SHORT,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN );
|
||||
echo "Now datetype of the formatter is : ".datefmt_get_datetype($fmt);
|
||||
echo "Second Formatted output with datetype is ".datefmt_format( $fmt , 0);
|
||||
|
||||
|
@ -74,10 +74,10 @@ echo "Second Formatted output with datetype is ".datefmt_format( $fmt , 0);
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fmt = new DateFormatter( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN);
|
||||
$fmt = new IntlDateFormatter( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN);
|
||||
echo "datetype of the formatter is : ".$fmt->getDateType();
|
||||
echo "First Formatted output is ".datefmt_format( $fmt , 0);
|
||||
$fmt = new DateFormatter( "en_US" ,DateFormatter::SHORT,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN);
|
||||
$fmt = new IntlDateFormatter( "en_US" ,IntlDateFormatter::SHORT,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN);
|
||||
echo "Now datetype of the formatter is : ".$fmt->getDateType();
|
||||
echo "Second Formatted output is ".datefmt_format( $fmt , 0);
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<refentry xml:id="dateformatter.geterrorcode" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<refentry xml:id="intldateformatter.geterrorcode" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>DateFormatter::getErrorCode</refname>
|
||||
<refname>IntlDateFormatter::getErrorCode</refname>
|
||||
<refname>datefmt_get_error_code</refname>
|
||||
<refpurpose>Get the error code from last operation</refpurpose>
|
||||
</refnamediv>
|
||||
|
@ -12,7 +12,7 @@
|
|||
Object oriented style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<type>integer</type><methodname>DateFormatter::getErrorCode</methodname>
|
||||
<type>integer</type><methodname>IntlDateFormatter::getErrorCode</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -20,7 +20,7 @@
|
|||
</para>
|
||||
<methodsynopsis>
|
||||
<type>integer</type><methodname>datefmt_get_error_code</methodname>
|
||||
<methodparam><type>DateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
<methodparam><type>IntlDateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Get the error code from last operation.
|
||||
|
@ -59,7 +59,7 @@
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fmt = datefmt_create( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
$fmt = datefmt_create( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN );
|
||||
$str = datefmt_format($fmt);
|
||||
if(!$str) {
|
||||
echo "ERROR: ".datefmt_get_error_message($fmt) . " (" . datefmt_get_error_code($fmt) . ")\n";
|
||||
|
@ -73,7 +73,7 @@ if(!$str) {
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fmt = new DateFormatter( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
$fmt = new IntlDateFormatter( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN );
|
||||
$str = $fmt->format();
|
||||
if(!$str) {
|
||||
echo "ERROR: ".$fmt->getErrorMessage() . " (" . $fmt->getErrorCode() . ")\n";
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<refentry xml:id="dateformatter.geterrormessage" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<refentry xml:id="intldateformatter.geterrormessage" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>DateFormatter::getErrorMessage</refname>
|
||||
<refname>IntlDateFormatter::getErrorMessage</refname>
|
||||
<refname>datefmt_get_error_message</refname>
|
||||
<refpurpose>Get the error text from the last operation.</refpurpose>
|
||||
</refnamediv>
|
||||
|
@ -12,7 +12,7 @@
|
|||
Object oriented style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>DateFormatter::getErrorMessage</methodname>
|
||||
<type>string</type><methodname>IntlDateFormatter::getErrorMessage</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -20,7 +20,7 @@
|
|||
</para>
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>datefmt_get_error_message</methodname>
|
||||
<methodparam><type>DateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
<methodparam><type>IntlDateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Get the error text from the last operation.
|
||||
|
@ -58,7 +58,7 @@
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fmt = datefmt_create( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
$fmt = datefmt_create( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN );
|
||||
$str = datefmt_format($fmt);
|
||||
if(!$str) {
|
||||
echo "ERROR: ".datefmt_get_error_message($fmt) . " (" . datefmt_get_error_code($fmt) . ")\n";
|
||||
|
@ -72,7 +72,7 @@ if(!$str) {
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fmt = new DateFormatter( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
$fmt = new IntlDateFormatter( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN );
|
||||
$str = $fmt->format();
|
||||
if(!$str) {
|
||||
echo "ERROR: ".$fmt->getErrorMessage() . " (" . $fmt->getErrorCode() . ")\n";
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<refentry xml:id="dateformatter.getlocale" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<refentry xml:id="intldateformatter.getlocale" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>DateFormatter::getLocale</refname>
|
||||
<refname>IntlDateFormatter::getLocale</refname>
|
||||
<refname>datefmt_get_locale</refname>
|
||||
<refpurpose>Get the locale used by formatter</refpurpose>
|
||||
</refnamediv>
|
||||
|
@ -12,7 +12,7 @@
|
|||
Object oriented style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>DateFormatter::getLocale</methodname>
|
||||
<type>string</type><methodname>IntlDateFormatter::getLocale</methodname>
|
||||
<methodparam choice='opt'><type>integer</type><parameter>which</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -20,7 +20,7 @@
|
|||
</para>
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>datefmt_get_locale</methodname>
|
||||
<methodparam><type>DateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
<methodparam><type>IntlDateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
<methodparam choice='opt'><type>integer</type><parameter>which</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -70,11 +70,11 @@
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fmt = datefmt_create( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
$fmt = datefmt_create( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN );
|
||||
echo "locale of the formatter is : ".datefmt_get_locale($fmt);
|
||||
echo "First Formatted output is ".datefmt_format( $fmt , 0);
|
||||
echo "locale of the formatter is : ".datefmt_get_locale($fmt);
|
||||
$fmt = datefmt_create( "de-DE" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
$fmt = datefmt_create( "de-DE" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN );
|
||||
echo "Second Formatted output is ".datefmt_format( $fmt , 0);
|
||||
|
||||
?>
|
||||
|
@ -86,10 +86,10 @@ echo "Second Formatted output is ".datefmt_format( $fmt , 0);
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fmt = new DateFormatter( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
$fmt = new IntlDateFormatter( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN );
|
||||
echo "locale of the formatter is : ".$fmt->getLocale();
|
||||
echo "First Formatted output is ".$fmt->format(0);
|
||||
$fmt = new DateFormatter( "de-DE" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
$fmt = new IntlDateFormatter( "de-DE" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN );
|
||||
echo "locale of the formatter is : ".$fmt->getLocale();
|
||||
echo "Second Formatted output is ".$fmt->format(0);
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<refentry xml:id="dateformatter.getpattern" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<refentry xml:id="intldateformatter.getpattern" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>DateFormatter::getPattern</refname>
|
||||
<refname>IntlDateFormatter::getPattern</refname>
|
||||
<refname>datefmt_get_pattern</refname>
|
||||
<refpurpose>Get the pattern used for the DateFormatter</refpurpose>
|
||||
<refpurpose>Get the pattern used for the IntlDateFormatter</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
|
@ -12,7 +12,7 @@
|
|||
Object oriented style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>DateFormatter::getPattern</methodname>
|
||||
<type>string</type><methodname>IntlDateFormatter::getPattern</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -20,7 +20,7 @@
|
|||
</para>
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>datefmt_get_pattern</methodname>
|
||||
<methodparam><type>DateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
<methodparam><type>IntlDateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Get pattern used by the formatter.
|
||||
|
@ -58,7 +58,7 @@
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fmt = datefmt_create( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN ,"MM/dd/yyyy");
|
||||
$fmt = datefmt_create( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN ,"MM/dd/yyyy");
|
||||
echo "pattern of the formatter is : ".datefmt_get_pattern($fmt);
|
||||
echo "First Formatted output with pattern is ".datefmt_format( $fmt , 0);
|
||||
datefmt_set_pattern($fmt,'yyyymmdd hh:mm:ss z');
|
||||
|
@ -74,7 +74,7 @@ echo "Second Formatted output with pattern is ".datefmt_format( $fmt , 0);
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fmt = new DateFormatter( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN,"MM/dd/yyyy" );
|
||||
$fmt = new IntlDateFormatter( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN,"MM/dd/yyyy" );
|
||||
echo "pattern of the formatter is : ".$fmt->getPattern();
|
||||
echo "First Formatted output is ".datefmt_format( $fmt , 0);
|
||||
$fmt->setPattern('yyyymmdd hh:mm:ss z');
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<refentry xml:id="dateformatter.gettimetype" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<refentry xml:id="intldateformatter.gettimetype" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>DateFormatter::getTimeType</refname>
|
||||
<refname>IntlDateFormatter::getTimeType</refname>
|
||||
<refname>datefmt_get_timetype</refname>
|
||||
<refpurpose>Get the timetype used for the DateFormatter</refpurpose>
|
||||
<refpurpose>Get the timetype used for the IntlDateFormatter</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
|
@ -12,7 +12,7 @@
|
|||
Object oriented style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<type>integer</type><methodname>DateFormatter::getTimeType</methodname>
|
||||
<type>integer</type><methodname>IntlDateFormatter::getTimeType</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -20,7 +20,7 @@
|
|||
</para>
|
||||
<methodsynopsis>
|
||||
<type>integer</type><methodname>datefmt_get_timetype</methodname>
|
||||
<methodparam><type>DateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
<methodparam><type>IntlDateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Return time type used by the formatter.
|
||||
|
@ -47,7 +47,7 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
The current <link linkend="intl.dateformatter-constants">date type</link> value of the formatter.
|
||||
The current <link linkend="intl.intldateformatter-constants">date type</link> value of the formatter.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -58,10 +58,10 @@
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fmt = datefmt_create( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
$fmt = datefmt_create( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN );
|
||||
echo "timetype of the formatter is : ".datefmt_get_timetype($fmt);
|
||||
echo "First Formatted output with timetype is ".datefmt_format( $fmt , 0);
|
||||
$fmt = datefmt_create( "en_US" ,DateFormatter::FULL,DateFormatter::SHORT,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
$fmt = datefmt_create( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::SHORT,'America/Los_Angeles',IntlDateFormatter::GREGORIAN );
|
||||
echo "Now timetype of the formatter is : ".datefmt_get_timetype($fmt);
|
||||
echo "Second Formatted output with timetype is ".datefmt_format( $fmt , 0);
|
||||
|
||||
|
@ -74,10 +74,10 @@ echo "Second Formatted output with timetype is ".datefmt_format( $fmt , 0);
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fmt = new DateFormatter( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN);
|
||||
$fmt = new IntlDateFormatter( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN);
|
||||
echo "timetype of the formatter is : ".$fmt->getTimeType();
|
||||
echo "First Formatted output is ".datefmt_format( $fmt , 0);
|
||||
$fmt = new DateFormatter( "en_US" ,DateFormatter::FULL,DateFormatter::SHORT,'America/Los_Angeles',DateFormatter::GREGORIAN);
|
||||
$fmt = new IntlDateFormatter( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::SHORT,'America/Los_Angeles',IntlDateFormatter::GREGORIAN);
|
||||
echo "Now timetype of the formatter is : ".$fmt->getTimeType();
|
||||
echo "Second Formatted output is ".datefmt_format( $fmt , 0);
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<refentry xml:id="dateformatter.gettimezoneid" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<refentry xml:id="intldateformatter.gettimezoneid" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>DateFormatter::getTimeZoneId</refname>
|
||||
<refname>IntlDateFormatter::getTimeZoneId</refname>
|
||||
<refname>datefmt_get_timezone_id</refname>
|
||||
<refpurpose>Get the timezone-id used for the DateFormatter</refpurpose>
|
||||
<refpurpose>Get the timezone-id used for the IntlDateFormatter</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
|
@ -12,7 +12,7 @@
|
|||
Object oriented style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>DateFormatter::getTimeZoneId</methodname>
|
||||
<type>string</type><methodname>IntlDateFormatter::getTimeZoneId</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -20,10 +20,10 @@
|
|||
</para>
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>datefmt_get_timezone_id</methodname>
|
||||
<methodparam><type>DateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
<methodparam><type>IntlDateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Get the timezone-id used for the DateFormatter.
|
||||
Get the timezone-id used for the IntlDateFormatter.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -58,7 +58,7 @@
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fmt = datefmt_create( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
$fmt = datefmt_create( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN );
|
||||
echo "timezone_id of the formatter is : ".datefmt_get_timezone_id($fmt);
|
||||
datefmt_set_timezone_id($fmt,'CN');
|
||||
echo "Now timezone_id of the formatter is : ".datefmt_get_timezone_id($fmt);
|
||||
|
@ -72,7 +72,7 @@ echo "Now timezone_id of the formatter is : ".datefmt_get_timezone_id($fmt);
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fmt = new DateFormatter( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
$fmt = new IntlDateFormatter( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN );
|
||||
echo "timezone_id of the formatter is : ".$fmt->getTimezoneId();
|
||||
$fmt->setTimezoneId('CN');
|
||||
echo "Now timezone_id of the formatter is : ".$fmt->getTimezoneId();
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<refentry xml:id="dateformatter.islenient" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<refentry xml:id="intldateformatter.islenient" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>DateFormatter::isLenient</refname>
|
||||
<refname>IntlDateFormatter::isLenient</refname>
|
||||
<refname>datefmt_is_lenient</refname>
|
||||
<refpurpose>Get the lenient used for the DateFormatter</refpurpose>
|
||||
<refpurpose>Get the lenient used for the IntlDateFormatter</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
|
@ -12,7 +12,7 @@
|
|||
Object oriented style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<type>boolean</type><methodname>DateFormatter::isLenient</methodname>
|
||||
<type>boolean</type><methodname>IntlDateFormatter::isLenient</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -20,7 +20,7 @@
|
|||
</para>
|
||||
<methodsynopsis>
|
||||
<type>boolean</type><methodname>datefmt_is_lenient</methodname>
|
||||
<methodparam><type>DateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
<methodparam><type>IntlDateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Check if the parser is strict or lenient in interpretting inputs that do not match the pattern exactly.
|
||||
|
@ -58,7 +58,7 @@
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fmt = datefmt_create( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGO
|
||||
$fmt = datefmt_create( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGO
|
||||
RIAN ,"dd/mm/yyyy");
|
||||
echo "lenient of the formatter is : ";
|
||||
if( $fmt->isLenient() ){
|
||||
|
@ -95,7 +95,7 @@ if( intl_get_error_code() !=0 ){
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fmt = new DateFormatter( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GRE
|
||||
$fmt = new IntlDateFormatter( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GRE
|
||||
GORIAN,"dd/mm/yyyy" );
|
||||
echo "lenient of the formatter is : ";
|
||||
if( $fmt->isLenient() ){
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<refentry xml:id="dateformatter.localtime" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<refentry xml:id="intldateformatter.localtime" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>DateFormatter::localtime</refname>
|
||||
<refname>IntlDateFormatter::localtime</refname>
|
||||
<refname>datefmt_localtime</refname>
|
||||
<refpurpose>Parse string to a field-based time value</refpurpose>
|
||||
</refnamediv>
|
||||
|
@ -12,7 +12,7 @@
|
|||
Object oriented style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>DateFormatter::localtime</methodname>
|
||||
<type>array</type><methodname>IntlDateFormatter::localtime</methodname>
|
||||
<methodparam><type>string</type><parameter>value</parameter></methodparam>
|
||||
<methodparam><type>integer</type><parameter>parse_pos</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
@ -21,7 +21,7 @@
|
|||
</para>
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>datefmt_localtime</methodname>
|
||||
<methodparam><type>DateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
<methodparam><type>IntlDateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>value</parameter></methodparam>
|
||||
<methodparam><type>integer</type><parameter>parse_pos</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
@ -82,7 +82,7 @@ $parse_pos and consuming as much of the input value as possible.
|
|||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$fmt = datefmt_create( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
$fmt = datefmt_create( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN );
|
||||
$arr = datefmt_localtime( $fmt, "Wednesday, December 31, 1969 4:00:00 PM PT",0);
|
||||
echo "First parsed output is ";
|
||||
if ($arr) {
|
||||
|
@ -100,7 +100,7 @@ if ($arr) {
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fmt = new DateFormatter( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
$fmt = new IntlDateFormatter( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN );
|
||||
$arr = $fmt->localtime( "Wednesday, December 31, 1969 4:00:00 PM PT",0);
|
||||
echo "First parsed output is ";
|
||||
if ($arr) {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<refentry xml:id="dateformatter.parse" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<refentry xml:id="intldateformatter.parse" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>DateFormatter::parse</refname>
|
||||
<refname>IntlDateFormatter::parse</refname>
|
||||
<refname>datefmt_parse</refname>
|
||||
<refpurpose>Parse string to a timestamp value</refpurpose>
|
||||
</refnamediv>
|
||||
|
@ -12,7 +12,7 @@
|
|||
Object oriented style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<type>integer</type><methodname>DateFormatter::parse</methodname>
|
||||
<type>integer</type><methodname>IntlDateFormatter::parse</methodname>
|
||||
<methodparam><type>string</type><parameter>value</parameter></methodparam>
|
||||
<methodparam><type>integer</type><parameter>parse_pos</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
@ -21,7 +21,7 @@
|
|||
</para>
|
||||
<methodsynopsis>
|
||||
<type>integer</type><methodname>datefmt_parse</methodname>
|
||||
<methodparam><type>DateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
<methodparam><type>IntlDateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>value</parameter></methodparam>
|
||||
<methodparam><type>integer</type><parameter>parse_pos</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
@ -82,9 +82,9 @@ otherwise it will contain the position at which parsing ended (and the error occ
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fmt = new DateFormatter( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
$fmt = new IntlDateFormatter( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN );
|
||||
echo "First parsed output is ".$fmt->parse("Wednesday, December 31, 1969 4:00:00 PM PT");
|
||||
$fmt = new DateFormatter( "de-DE" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
$fmt = new IntlDateFormatter( "de-DE" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN );
|
||||
echo "Second parsed output is ".$fmt->parse("Mittwoch, 31. Dezember 1969 16:00 Uhr GMT-08:00");
|
||||
?>
|
||||
]]>
|
||||
|
@ -95,9 +95,9 @@ echo "Second parsed output is ".$fmt->parse("Mittwoch, 31. Dezember 1969 16:00 U
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fmt = datefmt_create( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
$fmt = datefmt_create( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN );
|
||||
echo "First parsed output is ".datefmt_parse( $fmt , "Wednesday, December 20, 1989 4:00:00 PM PT");
|
||||
$fmt = datefmt_create( "de-DE" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
$fmt = datefmt_create( "de-DE" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN );
|
||||
echo "Second parsed output is ".datefmt_parse( $fmt , "Mittwoch, 20. Dezember 1989 16:00 Uhr GMT-08:00");
|
||||
?>
|
||||
]]>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<refentry xml:id="dateformatter.setcalendar" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<refentry xml:id="intldateformatter.setcalendar" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>DateFormatter::setCalendar</refname>
|
||||
<refname>IntlDateFormatter::setCalendar</refname>
|
||||
<refname>datefmt_set_calendar</refname>
|
||||
<refpurpose>sets the calendar used to the appropriate calendar, which must be</refpurpose>
|
||||
</refnamediv>
|
||||
|
@ -12,7 +12,7 @@
|
|||
Object oriented style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<type>boolean</type><methodname>DateFormatter::setCalendar</methodname>
|
||||
<type>boolean</type><methodname>IntlDateFormatter::setCalendar</methodname>
|
||||
<methodparam><type>integer</type><parameter>which</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -20,7 +20,7 @@
|
|||
</para>
|
||||
<methodsynopsis>
|
||||
<type>boolean</type><methodname>datefmt_set_calendar</methodname>
|
||||
<methodparam><type>DateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
<methodparam><type>IntlDateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
<methodparam><type>integer</type><parameter>which</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -44,8 +44,8 @@
|
|||
<term><parameter>which</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The <link linkend="intl.dateformatter-constants.calendartypes">calendar</link> to use.
|
||||
Default is <constant>DateFormatter::GREGORIAN</constant>.
|
||||
The <link linkend="intl.intldateformatter-constants.calendartypes">calendar</link> to use.
|
||||
Default is <constant>IntlDateFormatter::GREGORIAN</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -68,9 +68,9 @@
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fmt = datefmt_create( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
$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,DateFormatter::TRADITIONAL);
|
||||
datefmt_set_calendar($fmt,IntlDateFormatter::TRADITIONAL);
|
||||
echo "Now calendar of the formatter is : ".datefmt_get_calendar($fmt);
|
||||
?>
|
||||
]]>
|
||||
|
@ -81,9 +81,9 @@ echo "Now calendar of the formatter is : ".datefmt_get_calendar($fmt);
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fmt = new DateFormatter( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
$fmt = new IntlDateFormatter( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN );
|
||||
echo "calendar of the formatter is : ".$fmt->getCalendar();
|
||||
$fmt->setCalendar(DateFormatter::TRADITIONAL);
|
||||
$fmt->setCalendar(IntlDateFormatter::TRADITIONAL);
|
||||
echo "Now calendar of the formatter is : ".$fmt->getCalendar();
|
||||
?>
|
||||
]]>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<refentry xml:id="dateformatter.setlenient" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<refentry xml:id="intldateformatter.setlenient" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>DateFormatter::setLenient</refname>
|
||||
<refname>IntlDateFormatter::setLenient</refname>
|
||||
<refname>datefmt_set_lenient</refname>
|
||||
<refpurpose>Set the leniency of the parser</refpurpose>
|
||||
</refnamediv>
|
||||
|
@ -12,7 +12,7 @@
|
|||
Object oriented style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<type>boolean</type><methodname>DateFormatter::setLenient</methodname>
|
||||
<type>boolean</type><methodname>IntlDateFormatter::setLenient</methodname>
|
||||
<methodparam><type>boolean</type><parameter>lenient</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -20,7 +20,7 @@
|
|||
</para>
|
||||
<methodsynopsis>
|
||||
<type>boolean</type><methodname>datefmt_set_lenient</methodname>
|
||||
<methodparam><type>DateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
<methodparam><type>IntlDateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
<methodparam><type>boolean</type><parameter>lenient</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -70,7 +70,7 @@
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fmt = datefmt_create( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGO
|
||||
$fmt = datefmt_create( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGO
|
||||
RIAN ,"dd/mm/yyyy");
|
||||
echo "lenient of the formatter is : ";
|
||||
if( $fmt->isLenient() ){
|
||||
|
@ -107,7 +107,7 @@ if( intl_get_error_code() !=0 ){
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fmt = new DateFormatter( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GRE
|
||||
$fmt = new IntlDateFormatter( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GRE
|
||||
GORIAN,"dd/mm/yyyy" );
|
||||
echo "lenient of the formatter is : ";
|
||||
if( $fmt->isLenient() ){
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<refentry xml:id="dateformatter.setpattern" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<refentry xml:id="intldateformatter.setpattern" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>DateFormatter::setPattern</refname>
|
||||
<refname>IntlDateFormatter::setPattern</refname>
|
||||
<refname>datefmt_set_pattern</refname>
|
||||
<refpurpose>Set the pattern used for the DateFormatter</refpurpose>
|
||||
<refpurpose>Set the pattern used for the IntlDateFormatter</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
|
@ -12,7 +12,7 @@
|
|||
Object oriented style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<type>boolean</type><methodname>DateFormatter::setPattern</methodname>
|
||||
<type>boolean</type><methodname>IntlDateFormatter::setPattern</methodname>
|
||||
<methodparam><type>string</type><parameter>pattern</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -20,11 +20,11 @@
|
|||
</para>
|
||||
<methodsynopsis>
|
||||
<type>boolean</type><methodname>datefmt_set_pattern</methodname>
|
||||
<methodparam><type>DateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
<methodparam><type>IntlDateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>pattern</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Set the pattern used for the DateFormatter.
|
||||
Set the pattern used for the IntlDateFormatter.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -68,7 +68,7 @@
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fmt = datefmt_create( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN ,"MM/dd/yyyy");
|
||||
$fmt = datefmt_create( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN ,"MM/dd/yyyy");
|
||||
echo "pattern of the formatter is : ".datefmt_get_pattern($fmt);
|
||||
echo "First Formatted output with pattern is ".datefmt_format( $fmt , 0);
|
||||
datefmt_set_pattern($fmt,'yyyymmdd hh:mm:ss z');
|
||||
|
@ -84,7 +84,7 @@ echo "Second Formatted output with pattern is ".datefmt_format( $fmt , 0);
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fmt = new DateFormatter( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN,"MM/dd/yyyy" );
|
||||
$fmt = new IntlDateFormatter( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN,"MM/dd/yyyy" );
|
||||
echo "pattern of the formatter is : ".$fmt->getPattern();
|
||||
echo "First Formatted output is ".datefmt_format( $fmt , 0);
|
||||
$fmt->setPattern('yyyymmdd hh:mm:ss z');
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<refentry xml:id="dateformatter.settimezoneid" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<refentry xml:id="intldateformatter.settimezoneid" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>DateFormatter::setTimeZoneId</refname>
|
||||
<refname>IntlDateFormatter::setTimeZoneId</refname>
|
||||
<refname>datefmt_set_timezone_id</refname>
|
||||
<refpurpose>Sets the time zone to use</refpurpose>
|
||||
</refnamediv>
|
||||
|
@ -12,7 +12,7 @@
|
|||
Object oriented style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<type>boolean</type><methodname>DateFormatter::setTimeZoneId</methodname>
|
||||
<type>boolean</type><methodname>IntlDateFormatter::setTimeZoneId</methodname>
|
||||
<methodparam><type>string</type><parameter>zone</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -20,7 +20,7 @@
|
|||
</para>
|
||||
<methodsynopsis>
|
||||
<type>boolean</type><methodname>datefmt_set_timezone_id</methodname>
|
||||
<methodparam><type>DateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
<methodparam><type>IntlDateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>zone</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -68,7 +68,7 @@
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fmt = datefmt_create( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
$fmt = datefmt_create( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN );
|
||||
echo "timezone_id of the formatter is : ".datefmt_get_timezone_id($fmt);
|
||||
datefmt_set_timezone_id($fmt,'CN');
|
||||
echo "Now timezone_id of the formatter is : ".datefmt_get_timezone_id($fmt);
|
||||
|
@ -81,7 +81,7 @@ echo "Now timezone_id of the formatter is : ".datefmt_get_timezone_id($fmt);
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fmt = new DateFormatter( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
$fmt = new IntlDateFormatter( "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN );
|
||||
echo "timezone_id of the formatter is : ".$fmt->getTimezoneId();
|
||||
$fmt->setTimezoneId('CN');
|
||||
echo "Now timezone_id of the formatter is : ".$fmt->getTimezoneId();
|
||||
|
|
Loading…
Reference in a new issue