Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions reference/datetime/functions/date-sun-info.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 17c238517825dfb7ec3edfef5972acd944ffbc1e Maintainer: takagi Status: ready -->
<!-- EN-Revision: aac47e05048c3371bfc46d65247d7bf1c4505bf3 Maintainer: takagi Status: ready -->
<!-- Credits: mumumu -->
<refentry xml:id="function.date-sun-info" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
Expand Down Expand Up @@ -178,6 +178,7 @@
<programlisting role="php">
<![CDATA[
<?php
date_default_timezone_set('Asia/Jerusalem');
$sun_info = date_sun_info(strtotime("2006-12-12"), 31.7667, 35.2333);
foreach ($sun_info as $key => $val) {
echo "$key: " . date("H:i:s", $val) . "\n";
Expand All @@ -187,15 +188,15 @@ foreach ($sun_info as $key => $val) {
&example.outputs;
<screen>
<![CDATA[
sunrise: 05:52:11
sunset: 15:41:21
transit: 10:46:46
civil_twilight_begin: 05:24:08
civil_twilight_end: 16:09:24
nautical_twilight_begin: 04:52:25
nautical_twilight_end: 16:41:06
astronomical_twilight_begin: 04:21:32
astronomical_twilight_end: 17:12:00
sunrise: 06:29:21
sunset: 16:36:00
transit: 11:32:41
civil_twilight_begin: 06:02:36
civil_twilight_end: 17:02:45
nautical_twilight_begin: 05:32:14
nautical_twilight_end: 17:33:08
astronomical_twilight_begin: 05:02:31
astronomical_twilight_end: 18:02:51
]]>
</screen>
</example>
Expand Down Expand Up @@ -279,13 +280,13 @@ $si = date_sun_info(strtotime('2022-08-26'), 50.45, 30.52);
$diff = $si['sunset'] - $si['sunrise'];
echo "Length of day: ",
floor($diff / 3600), "h ",
floor(($diff % 3600) / 60), "s\n";
floor(($diff % 3600) / 60), "m\n";
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Length of day: 13h 53s
Length of day: 13h 53m
]]>
</screen>
</example>
Expand Down
12 changes: 8 additions & 4 deletions reference/uri/uri/whatwg/url/getport.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: a00f03a6131b0b74c851b06879c528fc9537da8c Maintainer: KentarouTakeda Status: ready -->
<!-- EN-Revision: 0e06411471a898974e114bd57f624781fe3a0b89 Maintainer: KentarouTakeda Status: ready -->
<refentry xml:id="uri-whatwg-url.getport" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Uri\WhatWg\Url::getPort</refname>
Expand Down Expand Up @@ -37,16 +37,20 @@
<programlisting role="php">
<![CDATA[
<?php
$url = new \Uri\WhatWg\Url("https://example.com:443");
$url = new \Uri\WhatWg\Url("https://example.com:8080");
var_dump($url->getPort());

echo $url->getPort();
// 443 は https のデフォルトポートなので、保持されません。
$url = new \Uri\WhatWg\Url("https://example.com:443");
var_dump($url->getPort());
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
443
int(8080)
NULL
]]>
</screen>
</example>
Expand Down
4 changes: 2 additions & 2 deletions reference/uri/uri/whatwg/url/parse.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 8e2cfbdce0cd028a6521c6e073f148e0f7efac7c Maintainer: KentarouTakeda Status: ready -->
<!-- EN-Revision: 0e06411471a898974e114bd57f624781fe3a0b89 Maintainer: KentarouTakeda Status: ready -->
<refentry xml:id="uri-whatwg-url.parse" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Uri\WhatWg\Url::parse</refname>
Expand Down Expand Up @@ -81,7 +81,7 @@ if ($url !== null) {
&example.outputs;
<screen>
<![CDATA[
Valid URL: https://example.com
Valid URL: https://example.com/
]]>
</screen>
</example>
Expand Down
11 changes: 8 additions & 3 deletions reference/uri/uri/whatwg/url/withport.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 39596f1226fd3b502bfbba09068ad6701235426f Maintainer: KentarouTakeda Status: ready -->
<!-- EN-Revision: 0e06411471a898974e114bd57f624781fe3a0b89 Maintainer: KentarouTakeda Status: ready -->

<refentry xml:id="uri-whatwg-url.withport" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
Expand Down Expand Up @@ -53,16 +53,21 @@
<![CDATA[
<?php
$url = new \Uri\WhatWg\Url("https://example.com:8080");

// 443 は https のデフォルトポートなので、保持されません。
$url = $url->withPort(443);
var_dump($url->getPort());

echo $url->getPort();
$url = $url->withPort(8443);
var_dump($url->getPort());
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
443
NULL
int(8443)
]]>
</screen>
</example>
Expand Down
Loading