第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

獲取本周的周三到上周的周三 但是周日的時(shí)候時(shí)間老是不對(duì)

獲取本周的周三到上周的周三 但是周日的時(shí)候時(shí)間老是不對(duì)

PHP
12345678_0001 2019-03-06 13:27:25
1.我用php獲取本周的周三時(shí)間到上一周的周三時(shí)間當(dāng)本地時(shí)間是周日的時(shí)候獲取的時(shí)間是錯(cuò)的 2.下面是我的代碼 $wednesdayfirst = date('Y-m-d', strtotime('this week wednesday')); $wednesdaylast = date('Y-m-d', strtotime('last week wednesday')); 3.當(dāng)前時(shí)間我調(diào)整到了10月的29號(hào)周日
查看完整描述

4 回答

?
MMTTMM

TA貢獻(xiàn)1869條經(jīng)驗(yàn) 獲得超4個(gè)贊

$a = date('Y-m-d', strtotime('wednesday'));
$b = date('Y-m-d', strtotime('last wednesday'));
查看完整回答
反對(duì) 回復(fù) 2019-03-18
?
月關(guān)寶盒

TA貢獻(xiàn)1772條經(jīng)驗(yàn) 獲得超5個(gè)贊

This is likely the result of a bug that affected PHP versions 5.6.23 to 5.6.30, 7.0.8 to 7.0.16, and 7.1.0 to 7.1.2. It also affects the DateTime class.

這是一個(gè) PHP 舊版本的 bug,參考:PHP strtotime wrong only on sundays

看一下你當(dāng)前的 PHP 版本,我這里是 PHP 7.0.22-0,已不存在此 bug.

查看完整回答
反對(duì) 回復(fù) 2019-03-18
?
慕斯王

TA貢獻(xiàn)1864條經(jīng)驗(yàn) 獲得超2個(gè)贊

$date1 = date('Y-m-d', strtotime('last wed'));

$date2 = date('Y-m-d', strtotime('wed'));
查看完整回答
反對(duì) 回復(fù) 2019-03-18
  • 4 回答
  • 0 關(guān)注
  • 568 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢(xún)優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)