reference/intl/dateformatter/get-timezone-id.xml
1976eae0d815797af97a1e16c5cd90ffc2868395
...
...
@@ -11,16 +11,16 @@
11
11
<para>
12
12
&style.oop;
13
13
</para>
14
-
<methodsynopsis>
15
-
<modifier>public</modifier> <type>string</type><methodname>IntlDateFormatter::getTimeZoneId</methodname>
16
-
<void />
14
+
<methodsynopsis role="IntlDateFormatter">
15
+
<modifier>public</modifier> <type class="union"><type>string</type><type>false</type></type><methodname>IntlDateFormatter::getTimeZoneId</methodname>
16
+
<void/>
17
17
</methodsynopsis>
18
18
<para>
19
19
&style.procedural;
20
20
</para>
21
21
<methodsynopsis>
22
-
<type>string</type><methodname>datefmt_get_timezone_id</methodname>
23
-
<methodparam><type>IntlDateFormatter</type><parameter>fmt</parameter></methodparam>
22
+
<type class="union"><type>string</type><type>false</type></type><methodname>datefmt_get_timezone_id</methodname>
23
+
<methodparam><type>IntlDateFormatter</type><parameter>formatter</parameter></methodparam>
24
24
</methodsynopsis>
25
25
<para>
26
26
Get the timezone-id used for the IntlDateFormatter.
...
...
@@ -32,7 +32,7 @@
32
32
<para>
33
33
<variablelist>
34
34
<varlistentry>
35
-
<term><parameter>fmt</parameter></term>
35
+
<term><parameter>formatter</parameter></term>
36
36
<listitem>
37
37
<para>
38
38
The formatter resource.
...
...
@@ -47,7 +47,7 @@
47
47
<refsect1 role="returnvalues">
48
48
&reftitle.returnvalues;
49
49
<para>
50
-
ID string for the time zone used by this formatter.
50
+
ID string for the time zone used by this formatter, &return.falseforfailure;.
51
51
</para>
52
52
</refsect1>
53
53
...
...
@@ -65,9 +65,9 @@ $fmt = datefmt_create(
65
65
'America/Los_Angeles',
66
66
IntlDateFormatter::GREGORIAN
67
67
);
68
-
echo 'timezone_id of the formatter is : ' . datefmt_get_timezone_id($fmt);
69
-
datefmt_set_timezone_id($fmt, 'CN');
70
-
echo 'Now timezone_id of the formatter is : ' . datefmt_get_timezone_id($fmt);
68
+
echo 'timezone_id of the formatter is: ' . datefmt_get_timezone_id($fmt) . "\n";
69
+
datefmt_set_timezone($fmt, 'Europe/Madrid');
70
+
echo 'Now timezone_id of the formatter is: ' . datefmt_get_timezone_id($fmt);
71
71

72
72
?>
73
73
]]>
...
...
@@ -85,9 +85,9 @@ $fmt = new IntlDateFormatter(
85
85
'America/Los_Angeles',
86
86
IntlDateFormatter::GREGORIAN
87
87
);
88
-
echo 'timezone_id of the formatter is : ' . $fmt->getTimezoneId();
89
-
$fmt->setTimezoneId('CN');
90
-
echo 'Now timezone_id of the formatter is : ' . $fmt->getTimezoneId();
88
+
echo 'timezone_id of the formatter is: ' . $fmt->getTimezoneId() . "\n";
89
+
$fmt->setTimezone('Europe/Madrid');
90
+
echo 'Now timezone_id of the formatter is: ' . $fmt->getTimezoneId();
91
91

92
92
?>
93
93
]]>
...
...
@@ -96,8 +96,8 @@ echo 'Now timezone_id of the formatter is : ' . $fmt->getTimezoneId();
96
96
&example.outputs;
97
97
<screen>
98
98
<![CDATA[
99
-
timezone_id of the formatter is : America/Los_Angeles
100
-
Now timezone_id of the formatter is : CN
99
+
timezone_id of the formatter is: America/Los_Angeles
100
+
Now timezone_id of the formatter is: Europe/Madrid
101
101
]]>
102
102
</screen>
103
103
</refsect1>
...
...
@@ -106,13 +106,12 @@ Now timezone_id of the formatter is : CN
106
106
&reftitle.seealso;
107
107
<para>
108
108
<simplelist>
109
-
<member><function>datefmt_set_timezone_id</function></member>
109
+
<member><function>datefmt_set_timezone</function></member>
110
110
<member><function>datefmt_create</function></member>
111
111
</simplelist>
112
112
</para>
113
113
</refsect1>
114
114
</refentry>
115
-

116
115
<!-- Keep this comment at the end of the file
117
116
Local variables:
118
117
mode: sgml
119
118