Skip to content

Commit 1fcb672

Browse files
committed
Document what the fields in the output of DateTimeZone::getLocation() mean
php/doc-en@c904155
1 parent 10db6a3 commit 1fcb672

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

reference/datetime/datetimezone/getlocation.xml

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 02ff7fef5b34cf8f5395180d9d39fb64d9398d00 Maintainer: takagi Status: ready -->
3+
<!-- EN-Revision: c90415586ef8e226765667808874b6fd9c33ef09 Maintainer: takagi Status: ready -->
44
<!-- Credits: mumumu -->
55

66
<refentry xml:id="datetimezone.getlocation" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
@@ -51,7 +51,7 @@
5151
<programlisting role="php">
5252
<![CDATA[
5353
<?php
54-
$tz = new DateTimeZone("Europe/Prague");
54+
$tz = new DateTimeZone("Asia/Jakarta");
5555
print_r($tz->getLocation());
5656
print_r(timezone_location_get($tz));
5757
?>
@@ -62,22 +62,31 @@ print_r(timezone_location_get($tz));
6262
<![CDATA[
6363
Array
6464
(
65-
[country_code] => CZ
66-
[latitude] => 50.08333
67-
[longitude] => 14.43333
68-
[comments] =>
65+
[country_code] => ID
66+
[latitude] => -6.16667
67+
[longitude] => 106.8
68+
[comments] => Java, Sumatra
6969
)
7070
Array
7171
(
72-
[country_code] => CZ
73-
[latitude] => 50.08333
74-
[longitude] => 14.43333
75-
[comments] =>
72+
[country_code] => ID
73+
[latitude] => -6.16667
74+
[longitude] => 106.8
75+
[comments] => Java, Sumatra
7676
)
7777
]]>
7878
</screen>
7979
</example>
8080
</para>
81+
<para>
82+
<literal>country_code</literal> 要素には、ISO 3166-1 alpha-2
83+
で定められた国コードがそれぞれ入っています。
84+
<literal>latitude</literal> と <literal>longitude</literal>
85+
要素には、タイムゾーンの識別子に含まれる都市の座標が入ります。
86+
<literal>comments</literal> 要素には (&false; でない場合)、
87+
指定された国でこのタイムゾーンが適用される場所のヒントが入ります。
88+
この情報はエンドユーザー向けの表現に適しています。
89+
</para>
8190
</refsect1>
8291

8392
<refsect1 role="seealso">

0 commit comments

Comments
 (0)