reference/datetime/functions/localtime.xml
a4ba07f273fd7d34520a8d02052a746076094e32
...
...
@@ -10,8 +10,8 @@
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
12
<type>array</type><methodname>localtime</methodname>
13
-
<methodparam choice="opt"><type>int</type><parameter>timestamp</parameter><initializer>time()</initializer></methodparam>
14
-
<methodparam choice="opt"><type>bool</type><parameter>is_associative</parameter><initializer>false</initializer></methodparam>
13
+
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>timestamp</parameter><initializer>&null;</initializer></methodparam>
14
+
<methodparam choice="opt"><type>bool</type><parameter>associative</parameter><initializer>&false;</initializer></methodparam>
15
15
</methodsynopsis>
16
16
<para>
17
17
The <function>localtime</function> function returns an array
...
...
@@ -28,67 +28,11 @@
28
28
&date.timestamp.description;
29
29
30
30
<varlistentry>
31
-
<term><parameter>is_associative</parameter></term>
31
+
<term><parameter>associative</parameter></term>
32
32
<listitem>
33
33
<para>
34
-
If set to &false; or not supplied then the array is returned as a regular,
35
-
numerically indexed array. If the argument is set to &true; then
36
-
<function>localtime</function> returns an associative array containing
37
-
all the different elements of the structure returned by the C
38
-
function call to localtime. The names of the different keys of
39
-
the associative array are as follows:
40
-
</para>
41
-
<para>
42
-
<itemizedlist>
43
-
<listitem>
44
-
<simpara>
45
-
"tm_sec" - seconds, <literal>0</literal> to <literal>59</literal>
46
-
</simpara>
47
-
</listitem>
48
-
<listitem>
49
-
<simpara>
50
-
"tm_min" - minutes, <literal>0</literal> to <literal>59</literal>
51
-
</simpara>
52
-
</listitem>
53
-
<listitem>
54
-
<simpara>
55
-
"tm_hour" - hours, <literal>0</literal> to <literal>23</literal>
56
-
</simpara>
57
-
</listitem>
58
-
<listitem>
59
-
<simpara>
60
-
"tm_mday" - day of the month, <literal>1</literal> to <literal>31</literal>
61
-
</simpara>
62
-
</listitem>
63
-
<listitem>
64
-
<simpara>
65
-
"tm_mon" - month of the year, <literal>0</literal> (Jan) to <literal>11</literal> (Dec)
66
-
</simpara>
67
-
</listitem>
68
-
<listitem>
69
-
<simpara>
70
-
"tm_year" - years since 1900
71
-
</simpara>
72
-
</listitem>
73
-
<listitem>
74
-
<simpara>
75
-
"tm_wday" - day of the week, <literal>0</literal> (Sun) to <literal>6</literal> (Sat)
76
-
</simpara>
77
-
</listitem>
78
-
<listitem>
79
-
<simpara>
80
-
"tm_yday" - day of the year, <literal>0</literal> to <literal>365</literal>
81
-
</simpara>
82
-
</listitem>
83
-
<listitem>
84
-
<simpara>
85
-
"tm_isdst" - is daylight savings time in effect?
86
-
</simpara>
87
-
<simpara>
88
-
Positive if yes, <literal>0</literal> if not, negative if unknown.
89
-
</simpara>
90
-
</listitem>
91
-
</itemizedlist>
34
+
Determines whether the function should return a regular, numerically indexed array,
35
+
or an associative one.
92
36
</para>
93
37
</listitem>
94
38
</varlistentry>
...
...
@@ -96,6 +40,71 @@
96
40
</para>
97
41
</refsect1>
98
42

43
+
<refsect1 role="returnvalues">
44
+
&reftitle.returnvalues;
45
+
<para>
46
+
If <parameter>associative</parameter> is set to &false; or not supplied then
47
+
the array is returned as a regular, numerically indexed array.
48
+
If <parameter>associative</parameter> is set to &true; then
49
+
<function>localtime</function> returns an associative array containing
50
+
the elements of the structure returned by the C
51
+
function call to localtime.
52
+
The keys of the associative array are as follows:
53
+
</para>
54
+
<para>
55
+
<itemizedlist>
56
+
<listitem>
57
+
<simpara>
58
+
"tm_sec" - seconds, <literal>0</literal> to <literal>59</literal>
59
+
</simpara>
60
+
</listitem>
61
+
<listitem>
62
+
<simpara>
63
+
"tm_min" - minutes, <literal>0</literal> to <literal>59</literal>
64
+
</simpara>
65
+
</listitem>
66
+
<listitem>
67
+
<simpara>
68
+
"tm_hour" - hours, <literal>0</literal> to <literal>23</literal>
69
+
</simpara>
70
+
</listitem>
71
+
<listitem>
72
+
<simpara>
73
+
"tm_mday" - day of the month, <literal>1</literal> to <literal>31</literal>
74
+
</simpara>
75
+
</listitem>
76
+
<listitem>
77
+
<simpara>
78
+
"tm_mon" - month of the year, <literal>0</literal> (Jan) to <literal>11</literal> (Dec)
79
+
</simpara>
80
+
</listitem>
81
+
<listitem>
82
+
<simpara>
83
+
"tm_year" - years since 1900
84
+
</simpara>
85
+
</listitem>
86
+
<listitem>
87
+
<simpara>
88
+
"tm_wday" - day of the week, <literal>0</literal> (Sun) to <literal>6</literal> (Sat)
89
+
</simpara>
90
+
</listitem>
91
+
<listitem>
92
+
<simpara>
93
+
"tm_yday" - day of the year, <literal>0</literal> to <literal>365</literal>
94
+
</simpara>
95
+
</listitem>
96
+
<listitem>
97
+
<simpara>
98
+
"tm_isdst" - is daylight savings time in effect?
99
+
</simpara>
100
+
<simpara>
101
+
Positive if yes, <literal>0</literal> if not, negative if unknown.
102
+
</simpara>
103
+
</listitem>
104
+
</itemizedlist>
105
+
</para>
106
+
</refsect1>
107
+

99
108
<refsect1 role="errors">
100
109
&reftitle.errors;
101
110
...
...
@@ -115,9 +124,12 @@
115
124
</row>
116
125
</thead>
117
126
<tbody>
118
-
119
-
&date.timezone.errors.changelog;
120
-
127
+
<row>
128
+
<entry>8.0.0</entry>
129
+
<entry>
130
+
<parameter>timestamp</parameter> is nullable now.
131
+
</entry>
132
+
</row>
121
133
</tbody>
122
134
</tgroup>
123
135
</informaltable>
...
...
@@ -183,7 +195,6 @@ Array
183
195
</refsect1>
184
196

185
197
</refentry>
186
-

187
198
<!-- Keep this comment at the end of the file
188
199
Local variables:
189
200
mode: sgml
190
201