reference/datetime/functions/gmstrftime.xml
9b1673cf114a1e10c4563ab9223cb56aed552b89
...
...
@@ -6,12 +6,21 @@
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
+
<modifier role="attribute">#[\Deprecated]</modifier>
21
+
<type class="union"><type>string</type><type>false</type></type><methodname>gmstrftime</methodname>
13
22
<methodparam><type>string</type><parameter>format</parameter></methodparam>
14
-
<methodparam choice="opt"><type>int</type><parameter>timestamp</parameter><initializer>time()</initializer></methodparam>
23
+
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>timestamp</parameter><initializer>&null;</initializer></methodparam>
15
24
</methodsynopsis>
16
25
<para>
17
26
Behaves the same as <function>strftime</function> except that the
...
...
@@ -20,6 +29,13 @@
20
29
"Dec 31 1998 20:00:00", while the second prints "Jan 01 1999
21
30
01:00:00".
22
31
</para>
32
+
<warning>
33
+
<para>
34
+
This function depends on operating system locale information, which might
35
+
be inconsistent with each other, or not available at all. Instead use the
36
+
<methodname>IntlDateFormatter::format</methodname> method.
37
+
</para>
38
+
</warning>
23
39
</refsect1>
24
40

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

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

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

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