日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > php >内容正文

php

php成品代码,PHP代码

發布時間:2025/3/8 php 17 豆豆
生活随笔 收集整理的這篇文章主要介紹了 php成品代码,PHP代码 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

日期

當日

date('Y-m-d")

date('Y-m-d 00:00:00')

取日期:年 月 日

date("Y", strtotime($startday))

date("m", strtotime($startday))

date("d", strtotime($startday))

上月 下月

$last_mont_first_date = date('Y-m-01 00:00:00',strtotime('last month'))

$next_mont_first_date = date('Y-m-20 00:00:00',strtotime('next month'))

2個日期比較大小的方法

protected function DateCompare($dateString1,$dateString2){

$month1 = date("m", strtotime($dateString1));

$month2 = date("m", strtotime($dateString2));

$day1 = date("d", strtotime($dateString1));

$day2 = date("d", strtotime($dateString2));

$year1 = date("Y", strtotime($dateString1));

$year2 = date("Y", strtotime($dateString2));

$hour1 = date("H", strtotime($dateString1));

$hour2 = date("H", strtotime($dateString2));

$minute1 = date("i", strtotime($dateString1));

$minute2 = date("i", strtotime($dateString2));

$second1 = date("s", strtotime($dateString1));

$second2 = date("s", strtotime($dateString2));

$do1 = mktime($hour1, $minute1, $second1, $month1, $day1, $year1);

$do2 = mktime($hour2, $minute2, $second2, $month2, $day2, $year2);

if($do1

return '0';

}

if($do1==$do2){

return '1';

}

if($do1>$do2){

return '2';

}

}

標簽:00,代碼,dateString2,dateString1,strtotime,date,PHP,startday

來源: https://blog.51cto.com/ikezcn/2535114

總結

以上是生活随笔為你收集整理的php成品代码,PHP代码的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。