PHP date_sun_info() 函数
PHP 教程
· 2019-01-23 22:27:03
实例
返回有关 2013 年 1 月 1 日,纬度 31.7667,经度 35.2333 的日出/日落和黄昏开始/黄昏结束的信息:
<?php
$sun_info=date_sun_info(strtotime("2013-01-01"),31.7667,35.2333);
foreach ($sun_info as $key=>$val)
{
echo "$key: " . date("H:i:s",$val) . "<br>";
}
?>
$sun_info=date_sun_info(strtotime("2013-01-01"),31.7667,35.2333);
foreach ($sun_info as $key=>$val)
{
echo "$key: " . date("H:i:s",$val) . "<br>";
}
?>
定义和用法
date_sun_info() 函数返回一个包含有关指定日期与地点的日出/日落和黄昏开始/黄昏结束的信息的数组。
提示:请参阅 date_sunrise() 函数,返回指定日期与地点的日出时间。
提示:请参阅 date_sunset() 函数,返回指定日期与地点的日落时间。
语法
date_sun_info(timestamp,latitude,longitude);
| 参数 | 描述 |
|---|---|
| timestamp | 必需。规定时间戳。 |
| latitude | 必需。规定纬度。 |
| longitude | 必需。规定经度。 |
技术细节
| 返回值: | 如果成功则返回一个数组,如果失败则返回 FALSE。 |
|---|---|
| PHP 版本: | 5.1.2+ |
点击查看所有 PHP 教程 文章: https://codercto.com/courses/l/5.html
An Introduction to the Analysis of Algorithms
Robert Sedgewick、Philippe Flajolet / Addison-Wesley Professional / 1995-12-10 / CAD 67.99
This book is a thorough overview of the primary techniques and models used in the mathematical analysis of algorithms. The first half of the book draws upon classical mathematical material from discre......一起来看看 《An Introduction to the Analysis of Algorithms》 这本书的介绍吧!