reference/datetime/functions/gmstrftime.xml
5c951013ca04161992efed8b86fb40f55669958e
...
...
@@ -6,12 +6,20 @@
6
6
<refpurpose>Format a GMT/UTC time/date according to locale settings</refpurpose>
7
7
</refnamediv>
8
8

9
+
<refsynopsisdiv>
10
+
&warn.deprecated.function-8-1-0.alternatives;
11
+
<simplelist role="alternatives">
12
+
<member><function>gmdate</function></member>
13
+
<member><methodname>IntlDateFormatter::format</methodname></member>
14
+
</simplelist>
15
+
</refsynopsisdiv>
16
+

9
17
<refsect1 role="description">
10
18
&reftitle.description;
11
19
<methodsynopsis>
12
-
<type>string</type><methodname>gmstrftime</methodname>
20
+
<type class="union"><type>string</type><type>false</type></type><methodname>gmstrftime</methodname>
13
21
<methodparam><type>string</type><parameter>format</parameter></methodparam>
14
-
<methodparam choice="opt"><type>int</type><parameter>timestamp</parameter><initializer>time()</initializer></methodparam>
22
+
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>timestamp</parameter><initializer>&null;</initializer></methodparam>
15
23
</methodsynopsis>
16
24
<para>
17
25
Behaves the same as <function>strftime</function> except that the
...
...
@@ -20,6 +28,13 @@
20
28
"Dec 31 1998 20:00:00", while the second prints "Jan 01 1999
21
29
01:00:00".
22
30
</para>
31
+
<warning>
32
+
<para>
33
+
This function depends on operating system locale information, which might
34
+
be inconsistent with each other, or not available at all. Instead use the
35
+
<methodname>IntlDateFormatter::format</methodname> method.
36
+
</para>
37
+
</warning>
23
38
</refsect1>
24
39

25
40
<refsect1 role="parameters">
...
...
@@ -47,6 +62,31 @@
47
62
local time if no timestamp is given. Month and weekday names and
48
63
other language dependent strings respect the current locale set
49
64
with <function>setlocale</function>.
65
+
On failure, &false; is returned.
66
+
</para>
67
+
</refsect1>
68
+

69
+
<refsect1 role="changelog">
70
+
&reftitle.changelog;
71
+
<para>
72
+
<informaltable>
73
+
<tgroup cols="2">
74
+
<thead>
75
+
<row>
76
+
<entry>&Version;</entry>
77
+
<entry>&Description;</entry>
78
+
</row>
79
+
</thead>
80
+
<tbody>
81
+
<row>
82
+
<entry>8.0.0</entry>
83
+
<entry>
84
+
<parameter>timestamp</parameter> is nullable now.
85
+
</entry>
86
+
</row>
87
+
</tbody>
88
+
</tgroup>
89
+
</informaltable>
50
90
</para>
51
91
</refsect1>
52
92

...
...
@@ -72,12 +112,13 @@ echo gmstrftime("%b %d %Y %H:%M:%S", mktime(20, 0, 0, 12, 31, 98)) . "\n";
72
112
&reftitle.seealso;
73
113
<para>
74
114
<simplelist>
115
+
<member><methodname>IntlDateFormatter::format</methodname></member>
116
+
<member><methodname>DateTimeInterface::format</methodname></member>
75
117
<member><function>strftime</function></member>
76
118
</simplelist>
77
119
</para>
78
120
</refsect1>
79
121
</refentry>
80
-

81
122
<!-- Keep this comment at the end of the file
82
123
Local variables:
83
124
mode: sgml
84
125