PHP strtotime() 函数
2016-10-26 20:57:42
•
阅读
打赏
函数原型
/**
* 将英文文本的日期时间描述解析为 Unix 时间戳
* @link http://php.net/manual/en/function.strtotime.php
* @param string $time 日期/时间字符串
* @param int $now [optional] 可选参数,用来计算返回值的时间戳
* @return int 成功返回时间戳,失败返回 FALSE。在 PHP 5.1.0 之前本函数在失败时返回 -1。
* @since 4.0
* @since 5.0
*/
function strtotime ($time, $now = null) {}
函数示例
<?php
echo strtotime("now");
echo time();
echo strtotime("26 October 2016") ."</br>";
echo strtotime("2016-10-26 06:06:01");
echo strtotime("+5 hours") ;
echo strtotime("+6 week");
echo strtotime("+1 week 3 days 7 hours 5 seconds");
echo strtotime("next Monday") ;
echo strtotime("last Sunday") ;
?>

相关推荐
深度学习 -- 损失函数
深度残差网络(Deep Residual Networks (ResNets))
深度学习 -- 激活函数
神经网络训练 -- 调整学习速率
生成对抗网络(GAN)改进与发展
生成对抗网络(GAN)优点与缺点
生成对抗网络(GAN)的训练
生成对抗网络(GAN)基本原理
生成模型与判别模型