mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
final part of DateFormatter docs
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@255017 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
64fddb0359
commit
d9eae938e7
18 changed files with 295 additions and 148 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
|
||||
<book xml:id="book.intl" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Internationalization Functions</title>
|
||||
|
@ -229,7 +229,7 @@ echo $formatter->format(1234567);
|
|||
&reference.intl.locale;
|
||||
&reference.intl.normalizer;
|
||||
&reference.intl.messageformatter;
|
||||
<!-- &reference.intl.dateformatter; -->
|
||||
&reference.intl.dateformatter;
|
||||
|
||||
</book>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<refentry xml:id="dateformatter.create" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>DateFormatter::create</refname>
|
||||
|
@ -8,7 +8,9 @@
|
|||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>Object oriented style</para>
|
||||
<para>
|
||||
Object oriented style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<modifier>static</modifier>
|
||||
<type>DateFormatter</type><methodname>DateFormatter::create</methodname>
|
||||
|
@ -19,7 +21,9 @@
|
|||
<methodparam choice='opt'><type>integer</type><parameter>calendar</parameter></methodparam>
|
||||
<methodparam choice='opt'><type>string</type><parameter>pattern</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>Object oriented style (constructor)</para>
|
||||
<para>
|
||||
Object oriented style (constructor)
|
||||
</para>
|
||||
<classsynopsis>
|
||||
<ooclass><classname>DateFormatter::__construct</classname></ooclass>
|
||||
<constructorsynopsis>
|
||||
|
@ -32,7 +36,9 @@
|
|||
<methodparam choice='opt'><type>string</type><parameter>pattern</parameter></methodparam>
|
||||
</constructorsynopsis>
|
||||
</classsynopsis>
|
||||
<para>Procedural style</para>
|
||||
<para>
|
||||
Procedural style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<type>DateFormatter</type><methodname>datefmt_create</methodname>
|
||||
<methodparam><type>string</type><parameter>locale</parameter></methodparam>
|
||||
|
@ -55,7 +61,7 @@
|
|||
<term><parameter>locale</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Locale to use when formatting or parsing
|
||||
Locale to use when formatting or parsing.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -83,7 +89,8 @@
|
|||
<term><parameter>timezone</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Time zone ID, default is system default. </para>
|
||||
Time zone ID, default is system default.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
|
@ -100,7 +107,8 @@
|
|||
<term><parameter>pattern</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Optional pattern to use when formatting or parsing </para>
|
||||
Optional pattern to use when formatting or parsing
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<refentry xml:id="dateformatter.format" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>DateFormatter::format</refname>
|
||||
|
@ -8,7 +8,9 @@
|
|||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>Object oriented style</para>
|
||||
<para>
|
||||
Object oriented style
|
||||
</para>
|
||||
<classsynopsis>
|
||||
<ooclass><classname>DateFormatter</classname></ooclass>
|
||||
<methodsynopsis>
|
||||
|
@ -16,7 +18,9 @@
|
|||
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
</classsynopsis>
|
||||
<para>Procedural style</para>
|
||||
<para>
|
||||
Procedural style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>datefmt_format</methodname>
|
||||
<methodparam><type>DateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
|
@ -35,7 +39,8 @@
|
|||
<term><parameter>fmt</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The date formatter resource </para>
|
||||
The date formatter resource.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
|
@ -55,7 +60,8 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
The formatted string or, if an error occurred, &false;. </para>
|
||||
The formatted string or, if an error occurred, &false;.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
|
@ -65,7 +71,6 @@
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
<?php
|
||||
$fmt = datefmt_create( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
echo "First Formatted output is ".datefmt_format( $fmt , 0);
|
||||
$fmt = datefmt_create( "de-DE" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<refentry xml:id="dateformatter.getcalendar" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>DateFormatter::getCalendar</refname>
|
||||
<refname>datefmt_get_calendar</refname>
|
||||
<refpurpose></refpurpose>
|
||||
<refpurpose>Get the calendar used for the DateFormatter</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>Object oriented style</para>
|
||||
<para>
|
||||
Object oriented style
|
||||
</para>
|
||||
<classsynopsis>
|
||||
<ooclass><classname>DateFormatter</classname></ooclass>
|
||||
<methodsynopsis>
|
||||
|
@ -16,13 +18,15 @@
|
|||
<void />
|
||||
</methodsynopsis>
|
||||
</classsynopsis>
|
||||
<para>Procedural style</para>
|
||||
<para>
|
||||
Procedural style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<type>integer</type><methodname>datefmt_get_calendar</methodname>
|
||||
<methodparam><type>DateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
</para>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
|
@ -33,7 +37,8 @@
|
|||
<term><parameter>fmt</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The formatter resource </para>
|
||||
The formatter resource
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
@ -44,7 +49,8 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
The calendar being used by the formatter. </para>
|
||||
The calendar being used by the formatter.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<refentry xml:id="dateformatter.getdatetype" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>DateFormatter::getDateType</refname>
|
||||
<refname>datefmt_get_datetype</refname>
|
||||
<refpurpose></refpurpose>
|
||||
<refpurpose>Get the datetype used for the DateFormatter</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>Object oriented style</para>
|
||||
<para>
|
||||
Object oriented style
|
||||
</para>
|
||||
<classsynopsis>
|
||||
<ooclass><classname>DateFormatter</classname></ooclass>
|
||||
<methodsynopsis>
|
||||
|
@ -16,14 +18,16 @@
|
|||
<void />
|
||||
</methodsynopsis>
|
||||
</classsynopsis>
|
||||
<para>Procedural style</para>
|
||||
<para>
|
||||
Procedural style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<type>integer</type><methodname>datefmt_get_datetype</methodname>
|
||||
<methodparam><type>DateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns date type used by the formatter.
|
||||
</para>
|
||||
Returns date type used by the formatter.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
|
@ -34,7 +38,8 @@
|
|||
<term><parameter>fmt</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The formatter resource.</para>
|
||||
The formatter resource.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<refentry xml:id="dateformatter.geterrorcode" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>DateFormatter::getErrorCode</refname>
|
||||
|
@ -8,7 +8,9 @@
|
|||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>Object oriented style</para>
|
||||
<para>
|
||||
Object oriented style
|
||||
</para>
|
||||
<classsynopsis>
|
||||
<ooclass><classname>DateFormatter</classname></ooclass>
|
||||
<methodsynopsis>
|
||||
|
@ -16,14 +18,17 @@
|
|||
<void />
|
||||
</methodsynopsis>
|
||||
</classsynopsis>
|
||||
<para>Procedural style</para>
|
||||
<para>
|
||||
Procedural style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<type>integer</type><methodname>datefmt_get_error_code</methodname>
|
||||
<methodparam><type>DateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Get the error code from last operation
|
||||
Returns error code from the last number formatting operation. </para>
|
||||
Get the error code from last operation.
|
||||
Returns error code from the last number formatting operation.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
|
@ -34,7 +39,8 @@ Returns error code from the last number formatting operation. </para>
|
|||
<term><parameter>fmt</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The formatter resource. </para>
|
||||
The formatter resource.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
@ -45,7 +51,8 @@ Returns error code from the last number formatting operation. </para>
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
the error code, one of UErrorCode values. Initial value is U_ZERO_ERROR. </para>
|
||||
The error code, one of UErrorCode values. Initial value is U_ZERO_ERROR.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<refentry xml:id="dateformatter.geterrormessage" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>DateFormatter::getErrorMessage</refname>
|
||||
|
@ -8,7 +8,9 @@
|
|||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>Object oriented style</para>
|
||||
<para>
|
||||
Object oriented style
|
||||
</para>
|
||||
<classsynopsis>
|
||||
<ooclass><classname>DateFormatter</classname></ooclass>
|
||||
<methodsynopsis>
|
||||
|
@ -16,13 +18,16 @@
|
|||
<void />
|
||||
</methodsynopsis>
|
||||
</classsynopsis>
|
||||
<para>Procedural style</para>
|
||||
<para>
|
||||
Procedural style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>datefmt_get_error_message</methodname>
|
||||
<methodparam><type>DateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Get the error text from the last operation. </para>
|
||||
Get the error text from the last operation.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
|
@ -33,7 +38,8 @@
|
|||
<term><parameter>fmt</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The formatter resource. </para>
|
||||
The formatter resource.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
@ -44,7 +50,8 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Description of the last error. </para>
|
||||
Description of the last error.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<refentry xml:id="dateformatter.getlocale" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>DateFormatter::getLocale</refname>
|
||||
|
@ -8,7 +8,9 @@
|
|||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>Object oriented style</para>
|
||||
<para>
|
||||
Object oriented style
|
||||
</para>
|
||||
<classsynopsis>
|
||||
<ooclass><classname>DateFormatter</classname></ooclass>
|
||||
<methodsynopsis>
|
||||
|
@ -16,14 +18,16 @@
|
|||
<methodparam choice='opt'><type>integer</type><parameter>which</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
</classsynopsis>
|
||||
<para>Procedural style</para>
|
||||
<para>
|
||||
Procedural style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>datefmt_get_locale</methodname>
|
||||
<methodparam><type>DateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
<methodparam choice='opt'><type>integer</type><parameter>which</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Get locale used by the formatter.
|
||||
Get locale used by the formatter.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -35,7 +39,8 @@
|
|||
<term><parameter>fmt</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The formatter resource </para>
|
||||
The formatter resource
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
|
@ -57,7 +62,8 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
the locale of this formatter or 'false' if error </para>
|
||||
the locale of this formatter or 'false' if error
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<refentry xml:id="dateformatter.getpattern" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>DateFormatter::getPattern</refname>
|
||||
<refname>datefmt_get_pattern</refname>
|
||||
<refpurpose></refpurpose>
|
||||
<refpurpose>Get the pattern used for the DateFormatter</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>Object oriented style</para>
|
||||
<para>
|
||||
Object oriented style
|
||||
</para>
|
||||
<classsynopsis>
|
||||
<ooclass><classname>DateFormatter</classname></ooclass>
|
||||
<methodsynopsis>
|
||||
|
@ -16,13 +18,15 @@
|
|||
<void />
|
||||
</methodsynopsis>
|
||||
</classsynopsis>
|
||||
<para>Procedural style</para>
|
||||
<para>
|
||||
Procedural style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>datefmt_get_pattern</methodname>
|
||||
<methodparam><type>DateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Get pattern used by the formatter.
|
||||
Get pattern used by the formatter.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -34,7 +38,8 @@
|
|||
<term><parameter>fmt</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The formatter resource. </para>
|
||||
The formatter resource.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
@ -45,7 +50,8 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
the pattern string being used to format/parse. </para>
|
||||
The pattern string being used to format/parse.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<refentry xml:id="dateformatter.gettimetype" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>DateFormatter::getTimeType</refname>
|
||||
<refname>datefmt_get_timetype</refname>
|
||||
<refpurpose></refpurpose>
|
||||
<refpurpose>Get the timetype used for the DateFormatter</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>Object oriented style</para>
|
||||
<para>
|
||||
Object oriented style
|
||||
</para>
|
||||
<classsynopsis>
|
||||
<ooclass><classname>DateFormatter</classname></ooclass>
|
||||
<methodsynopsis>
|
||||
|
@ -16,14 +18,16 @@
|
|||
<void />
|
||||
</methodsynopsis>
|
||||
</classsynopsis>
|
||||
<para>Procedural style</para>
|
||||
<para>
|
||||
Procedural style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<type>integer</type><methodname>datefmt_get_timetype</methodname>
|
||||
<methodparam><type>DateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Return time type used by the formatter.
|
||||
</para>
|
||||
Return time type used by the formatter.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
|
@ -34,7 +38,8 @@
|
|||
<term><parameter>fmt</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The formatter resource. </para>
|
||||
The formatter resource.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<refentry xml:id="dateformatter.gettimezoneid" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>DateFormatter::getTimeZoneId</refname>
|
||||
<refname>datefmt_get_timezone_id</refname>
|
||||
<refpurpose></refpurpose>
|
||||
<refpurpose>Get the timezone-id used for the DateFormatter</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>Object oriented style</para>
|
||||
<para>
|
||||
Object oriented style
|
||||
</para>
|
||||
<classsynopsis>
|
||||
<ooclass><classname>DateFormatter</classname></ooclass>
|
||||
<methodsynopsis>
|
||||
|
@ -16,13 +18,16 @@
|
|||
<void />
|
||||
</methodsynopsis>
|
||||
</classsynopsis>
|
||||
<para>Procedural style</para>
|
||||
<para>
|
||||
Procedural style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>datefmt_get_timezone_id</methodname>
|
||||
<methodparam><type>DateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
</para>
|
||||
Get the timezone-id used for the DateFormatter.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
|
@ -33,7 +38,8 @@
|
|||
<term><parameter>fmt</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The formatter resource. </para>
|
||||
The formatter resource.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
@ -44,7 +50,8 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
ID string for the time zone used by this formatter. </para>
|
||||
ID string for the time zone used by this formatter.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<refentry xml:id="dateformatter.islenient" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>DateFormatter::isLenient</refname>
|
||||
<refname>datefmt_is_lenient</refname>
|
||||
<refpurpose></refpurpose>
|
||||
<refpurpose>Get the lenient used for the DateFormatter</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>Object oriented style</para>
|
||||
<para>
|
||||
Object oriented style
|
||||
</para>
|
||||
<classsynopsis>
|
||||
<ooclass><classname>DateFormatter</classname></ooclass>
|
||||
<methodsynopsis>
|
||||
|
@ -16,7 +18,9 @@
|
|||
<void />
|
||||
</methodsynopsis>
|
||||
</classsynopsis>
|
||||
<para>Procedural style</para>
|
||||
<para>
|
||||
Procedural style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<type>boolean</type><methodname>datefmt_is_lenient</methodname>
|
||||
<methodparam><type>DateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
|
@ -34,7 +38,8 @@
|
|||
<term><parameter>fmt</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The formatter resource </para>
|
||||
The formatter resource.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
@ -56,13 +61,20 @@
|
|||
<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" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGO
|
||||
RIAN ,"dd/mm/yyyy");
|
||||
echo "lenient of the formatter is : ";
|
||||
if( $fmt->isLenient() ){
|
||||
echo('TRUE');
|
||||
}else{
|
||||
echo('FALSE');
|
||||
}
|
||||
datefmt_parse($fmt,"35/13/1971");
|
||||
echo "\n Trying to do parse('35/13/1971').Result is : " .datefmt_parse($fmt,"35/13/1971");
|
||||
if( intl_get_error_code() !=0 ){
|
||||
echo "Error_msg is : ".intl_get_error_message();
|
||||
echo "Error_code is : ".intl_get_error_code();
|
||||
}
|
||||
datefmt_set_lenient($fmt,false);
|
||||
echo "Now lenient of the formatter is : ";
|
||||
if( $fmt->isLenient() ){
|
||||
|
@ -70,6 +82,12 @@ if( $fmt->isLenient() ){
|
|||
}else{
|
||||
echo('FALSE');
|
||||
}
|
||||
datefmt_parse($fmt,"35/13/1971");
|
||||
echo "\n Trying to do parse('35/13/1971').Result is : " .datefmt_parse($fmt,"35/13/1971");
|
||||
if( intl_get_error_code() !=0 ){
|
||||
echo "Error_msg is : ".intl_get_error_message();
|
||||
echo "Error_code is : ".intl_get_error_code();
|
||||
}
|
||||
|
||||
?>
|
||||
]]>
|
||||
|
@ -80,13 +98,21 @@ if( $fmt->isLenient() ){
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fmt = new DateFormatter( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN,"MM/dd/yyyy" );
|
||||
$fmt = new DateFormatter( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GRE
|
||||
GORIAN,"dd/mm/yyyy" );
|
||||
echo "lenient of the formatter is : ";
|
||||
if( $fmt->isLenient() ){
|
||||
echo('TRUE');
|
||||
}else{
|
||||
echo('FALSE');
|
||||
}
|
||||
$fmt->parse("35/13/1971");
|
||||
echo "\n Trying to do parse('35/13/1971').Result is : " .$fmt->parse("35/13/1971");
|
||||
if( intl_get_error_code() !=0 ){
|
||||
echo "Error_msg is : ".intl_get_error_message();
|
||||
echo "Error_code is : ".intl_get_error_code();
|
||||
}
|
||||
|
||||
$fmt->setLenient(FALSE);
|
||||
echo "Now lenient of the formatter is : ";
|
||||
if( $fmt->isLenient() ){
|
||||
|
@ -94,6 +120,12 @@ if( $fmt->isLenient() ){
|
|||
}else{
|
||||
echo('FALSE');
|
||||
}
|
||||
$fmt->parse("35/13/1971");
|
||||
echo "\n Trying to do parse('35/13/1971').Result is : " .$fmt->parse("35/13/1971");
|
||||
if( intl_get_error_code() !=0 ){
|
||||
echo "Error_msg is : ".intl_get_error_message();
|
||||
echo "Error_code is : ".intl_get_error_code();
|
||||
}
|
||||
|
||||
?>
|
||||
]]>
|
||||
|
@ -103,7 +135,11 @@ if( $fmt->isLenient() ){
|
|||
<screen>
|
||||
<![CDATA[
|
||||
lenient of the formatter is : TRUE
|
||||
Trying to do parse('35/13/1971').
|
||||
Result is : -2147483
|
||||
Now lenient of the formatter is : FALSE
|
||||
Trying to do parse('35/13/1971').
|
||||
Result is : Error_msg is : Date parsing failed: U_PARSE_ERROR Error_code is : 9
|
||||
]]>
|
||||
</screen>
|
||||
</refsect1>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<refentry xml:id="dateformatter.localtime" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>DateFormatter::localtime</refname>
|
||||
|
@ -8,7 +8,9 @@
|
|||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>Object oriented style</para>
|
||||
<para>
|
||||
Object oriented style
|
||||
</para>
|
||||
<classsynopsis>
|
||||
<ooclass><classname>DateFormatter</classname></ooclass>
|
||||
<methodsynopsis>
|
||||
|
@ -16,28 +18,22 @@
|
|||
<methodparam><type>string</type><parameter>value</parameter></methodparam>
|
||||
<methodparam><type>array</type><parameter>localtime</parameter></methodparam>
|
||||
<methodparam><type>integer</type><parameter>parse_pos</parameter></methodparam>
|
||||
<methodparam><type>integer</type><parameter>error</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
</classsynopsis>
|
||||
<para>Procedural style</para>
|
||||
<para>
|
||||
Procedural style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>datefmt_localtime</methodname>
|
||||
<methodparam><type>DateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>value</parameter></methodparam>
|
||||
<methodparam><type>array</type><parameter>localtime</parameter></methodparam>
|
||||
<methodparam><type>integer</type><parameter>parse_pos</parameter></methodparam>
|
||||
<methodparam><type>integer</type><parameter>error</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
converts string $value to a field-based time value, starting at
|
||||
$parse_pos and consuming as much of the input value as possible
|
||||
If no error occurs before $value is consumed, $parse_pos will contain -1
|
||||
otherwise it will contain the position at which parsing ended (and the error
|
||||
occurred). $error will contain the error code. Note that this function
|
||||
does not change the value in get_error().
|
||||
be overwritten!
|
||||
This variable will contain the end position if the parse fails
|
||||
If $parse_pos > strlen($value), the parse fails immediately. </para>
|
||||
Converts string $value to a field-based time value ( an array of various fields), starting at
|
||||
$parse_pos and consuming as much of the input value as possible.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
|
@ -48,35 +44,35 @@ If $parse_pos > strlen($value), the parse fails immediately. </para>
|
|||
<term><parameter>fmt</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The formatter resource </para>
|
||||
The formatter resource
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>value</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
string to convert to a time </para>
|
||||
string to convert to a time
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>localtime</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
the array to store the parsed value; values in this array will </para>
|
||||
The array to store the parsed value; values in this array will.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>parse_pos</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
position at which to start the parsing in $value (zero-based) </para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>error</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
error value of any error that occurs during parsing </para>
|
||||
Position at which to start the parsing in $value (zero-based).
|
||||
If no error occurs before $value is consumed, $parse_pos will contain -1
|
||||
otherwise it will contain the position at which parsing ended .
|
||||
If $parse_pos > strlen($value), the parse fails immediately.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
@ -87,7 +83,8 @@ If $parse_pos > strlen($value), the parse fails immediately. </para>
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
localtime compatible array of integers </para>
|
||||
Localtime compatible array of integers
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
|
@ -99,7 +96,7 @@ If $parse_pos > strlen($value), the parse fails immediately. </para>
|
|||
<?php
|
||||
|
||||
$fmt = datefmt_create( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
$arr = datefmt_localtime( $fmt, "Wednesday, December 31, 1969 4:00:00 PM PT",0,0);
|
||||
$arr = datefmt_localtime( $fmt, "Wednesday, December 31, 1969 4:00:00 PM PT",0);
|
||||
echo "First parsed output is ";
|
||||
if ($arr) {
|
||||
foreach ($arr as $key => $value) {
|
||||
|
@ -117,7 +114,7 @@ if ($arr) {
|
|||
<![CDATA[
|
||||
<?php
|
||||
$fmt = new DateFormatter( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN );
|
||||
$arr = $fmt->localtime( "Wednesday, December 31, 1969 4:00:00 PM PT",0,0);
|
||||
$arr = $fmt->localtime( "Wednesday, December 31, 1969 4:00:00 PM PT",0);
|
||||
echo "First parsed output is ";
|
||||
if ($arr) {
|
||||
foreach ($arr as $key => $value) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<refentry xml:id="dateformatter.parse" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>DateFormatter::parse</refname>
|
||||
|
@ -8,33 +8,30 @@
|
|||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>Object oriented style</para>
|
||||
<para>
|
||||
Object oriented style
|
||||
</para>
|
||||
<classsynopsis>
|
||||
<ooclass><classname>DateFormatter</classname></ooclass>
|
||||
<methodsynopsis>
|
||||
<type>integer</type><methodname>parse</methodname>
|
||||
<methodparam><type>string</type><parameter>value</parameter></methodparam>
|
||||
<methodparam><type>integer</type><parameter>parse_pos</parameter></methodparam>
|
||||
<methodparam><type>integer</type><parameter>error</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
</classsynopsis>
|
||||
<para>Procedural style</para>
|
||||
<para>
|
||||
Procedural style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<type>integer</type><methodname>datefmt_parse</methodname>
|
||||
<methodparam><type>DateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>value</parameter></methodparam>
|
||||
<methodparam><type>integer</type><parameter>parse_pos</parameter></methodparam>
|
||||
<methodparam><type>integer</type><parameter>error</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
converts string $value to an incremental time value, starting at
|
||||
$parse_pos and consuming as much of the input value as possible
|
||||
If no error occurs before $value is consumed, $parse_pos will contain -1
|
||||
otherwise it will contain the position at which parsing ended (and the error
|
||||
occurred). $error will contain the error code. Note that this function
|
||||
does not change the value in get_error().
|
||||
This variable will contain the end position if the parse fails
|
||||
If $parse_pos > strlen($value), the parse fails immediately. </para>
|
||||
Converts string $value to an incremental time value, starting at
|
||||
$parse_pos and consuming as much of the input value as possible.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
|
@ -45,28 +42,28 @@ If $parse_pos > strlen($value), the parse fails immediately. </para>
|
|||
<term><parameter>fmt</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The formatter resource </para>
|
||||
The formatter resource
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>value</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
string to convert to a time </para>
|
||||
string to convert to a time
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>parse_pos</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
position at which to start the parsing in $value (zero-based) </para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>error</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
error value of any error that occurs during parsing </para>
|
||||
Position at which to start the parsing in $value (zero-based).
|
||||
If no error occurs before $value is consumed, $parse_pos will contain -1
|
||||
otherwise it will contain the position at which parsing ended (and the error occurred).
|
||||
This variable will contain the end position if the parse fails.
|
||||
If $parse_pos > strlen($value), the parse fails immediately.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
@ -77,7 +74,8 @@ If $parse_pos > strlen($value), the parse fails immediately. </para>
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
timestamp parsed value </para>
|
||||
timestamp parsed value
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<refentry xml:id="dateformatter.setcalendar" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>DateFormatter::setCalendar</refname>
|
||||
|
@ -8,7 +8,9 @@
|
|||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>Object oriented style</para>
|
||||
<para>
|
||||
Object oriented style
|
||||
</para>
|
||||
<classsynopsis>
|
||||
<ooclass><classname>DateFormatter</classname></ooclass>
|
||||
<methodsynopsis>
|
||||
|
@ -16,7 +18,9 @@
|
|||
<methodparam><type>integer</type><parameter>which</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
</classsynopsis>
|
||||
<para>Procedural style</para>
|
||||
<para>
|
||||
Procedural style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<type>boolean</type><methodname>datefmt_set_calendar</methodname>
|
||||
<methodparam><type>DateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<refentry xml:id="dateformatter.setlenient" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>DateFormatter::setLenient</refname>
|
||||
|
@ -8,7 +8,9 @@
|
|||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>Object oriented style</para>
|
||||
<para>
|
||||
Object oriented style
|
||||
</para>
|
||||
<classsynopsis>
|
||||
<ooclass><classname>DateFormatter</classname></ooclass>
|
||||
<methodsynopsis>
|
||||
|
@ -16,7 +18,9 @@
|
|||
<methodparam><type>boolean</type><parameter>lenient</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
</classsynopsis>
|
||||
<para>Procedural style</para>
|
||||
<para>
|
||||
Procedural style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<type>boolean</type><methodname>datefmt_set_lenient</methodname>
|
||||
<methodparam><type>DateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
|
@ -38,7 +42,8 @@
|
|||
<term><parameter>fmt</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The formatter resource </para>
|
||||
The formatter resource
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
|
@ -68,13 +73,20 @@
|
|||
<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" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGO
|
||||
RIAN ,"dd/mm/yyyy");
|
||||
echo "lenient of the formatter is : ";
|
||||
if( $fmt->isLenient() ){
|
||||
echo('TRUE');
|
||||
}else{
|
||||
echo('FALSE');
|
||||
}
|
||||
datefmt_parse($fmt,"35/13/1971");
|
||||
echo "\n Trying to do parse('35/13/1971').Result is : " .datefmt_parse($fmt,"35/13/1971");
|
||||
if( intl_get_error_code() !=0 ){
|
||||
echo "Error_msg is : ".intl_get_error_message();
|
||||
echo "Error_code is : ".intl_get_error_code();
|
||||
}
|
||||
datefmt_set_lenient($fmt,false);
|
||||
echo "Now lenient of the formatter is : ";
|
||||
if( $fmt->isLenient() ){
|
||||
|
@ -82,6 +94,12 @@ if( $fmt->isLenient() ){
|
|||
}else{
|
||||
echo('FALSE');
|
||||
}
|
||||
datefmt_parse($fmt,"35/13/1971");
|
||||
echo "\n Trying to do parse('35/13/1971').Result is : " .datefmt_parse($fmt,"35/13/1971");
|
||||
if( intl_get_error_code() !=0 ){
|
||||
echo "Error_msg is : ".intl_get_error_message();
|
||||
echo "Error_code is : ".intl_get_error_code();
|
||||
}
|
||||
|
||||
?>
|
||||
]]>
|
||||
|
@ -92,13 +110,21 @@ if( $fmt->isLenient() ){
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fmt = new DateFormatter( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GREGORIAN,"MM/dd/yyyy" );
|
||||
$fmt = new DateFormatter( "en_US" ,DateFormatter::FULL,DateFormatter::FULL,'America/Los_Angeles',DateFormatter::GRE
|
||||
GORIAN,"dd/mm/yyyy" );
|
||||
echo "lenient of the formatter is : ";
|
||||
if( $fmt->isLenient() ){
|
||||
echo('TRUE');
|
||||
}else{
|
||||
echo('FALSE');
|
||||
}
|
||||
$fmt->parse("35/13/1971");
|
||||
echo "\n Trying to do parse('35/13/1971').Result is : " .$fmt->parse("35/13/1971");
|
||||
if( intl_get_error_code() !=0 ){
|
||||
echo "Error_msg is : ".intl_get_error_message();
|
||||
echo "Error_code is : ".intl_get_error_code();
|
||||
}
|
||||
|
||||
$fmt->setLenient(FALSE);
|
||||
echo "Now lenient of the formatter is : ";
|
||||
if( $fmt->isLenient() ){
|
||||
|
@ -106,6 +132,13 @@ if( $fmt->isLenient() ){
|
|||
}else{
|
||||
echo('FALSE');
|
||||
}
|
||||
$fmt->parse("35/13/1971");
|
||||
echo "\n Trying to do parse('35/13/1971').Result is : " .$fmt->parse("35/13/1971");
|
||||
if( intl_get_error_code() !=0 ){
|
||||
echo "Error_msg is : ".intl_get_error_message();
|
||||
echo "Error_code is : ".intl_get_error_code();
|
||||
}
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
@ -114,7 +147,12 @@ if( $fmt->isLenient() ){
|
|||
<screen>
|
||||
<![CDATA[
|
||||
lenient of the formatter is : TRUE
|
||||
Trying to do parse('35/13/1971').
|
||||
Result is : -2147483
|
||||
Now lenient of the formatter is : FALSE
|
||||
Trying to do parse('35/13/1971').
|
||||
Result is : Error_msg is : Date parsing failed: U_PARSE_ERROR Error_code is : 9
|
||||
|
||||
]]>
|
||||
</screen>
|
||||
</refsect1>
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<refentry xml:id="dateformatter.setpattern" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>DateFormatter::setPattern</refname>
|
||||
<refname>datefmt_set_pattern</refname>
|
||||
<refpurpose></refpurpose>
|
||||
<refpurpose>Set the pattern used for the DateFormatter</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>Object oriented style</para>
|
||||
<para>
|
||||
Object oriented style
|
||||
</para>
|
||||
<classsynopsis>
|
||||
<ooclass><classname>DateFormatter</classname></ooclass>
|
||||
<methodsynopsis>
|
||||
|
@ -16,14 +18,17 @@
|
|||
<methodparam><type>string</type><parameter>pattern</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
</classsynopsis>
|
||||
<para>Procedural style</para>
|
||||
<para>
|
||||
Procedural style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<type>boolean</type><methodname>datefmt_set_pattern</methodname>
|
||||
<methodparam><type>DateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>pattern</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
</para>
|
||||
Set the pattern used for the DateFormatter.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
|
@ -34,14 +39,16 @@
|
|||
<term><parameter>fmt</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The formatter resource </para>
|
||||
The formatter resource.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>pattern</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
new pattern string to use </para>
|
||||
New pattern string to use.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<refentry xml:id="dateformatter.settimezoneid" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>DateFormatter::setTimeZoneId</refname>
|
||||
|
@ -8,7 +8,9 @@
|
|||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>Object oriented style</para>
|
||||
<para>
|
||||
Object oriented style
|
||||
</para>
|
||||
<classsynopsis>
|
||||
<ooclass><classname>DateFormatter</classname></ooclass>
|
||||
<methodsynopsis>
|
||||
|
@ -16,7 +18,9 @@
|
|||
<methodparam><type>string</type><parameter>zone</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
</classsynopsis>
|
||||
<para>Procedural style</para>
|
||||
<para>
|
||||
Procedural style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<type>boolean</type><methodname>datefmt_set_timezone_id</methodname>
|
||||
<methodparam><type>DateFormatter</type><parameter>fmt</parameter></methodparam>
|
||||
|
@ -35,7 +39,8 @@
|
|||
<term><parameter>fmt</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The formatter resource. </para>
|
||||
The formatter resource.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
|
|
Loading…
Reference in a new issue