次の形式で「今週」の完全な日付範囲を取得するためのサポートが必要です:Ymd
「今月」の完全な日付範囲を取得できましたが、「今週」の完全な日付範囲を取得できませんでした。
これは「今月」の私のコードです。
//Functions for later use
function firstOfMonth() {
return date("Y-m-d", strtotime(date('m').'/01/'.date('Y').' 00:00:00'));
}
function lastOfMonth() {
return date("Y-m-d", strtotime('-1 second',strtotime('+1 month',strtotime(date('m').'/01/'.date('Y').' 00:00:00'))));
}
//Setup the date_range variables
$date_start = firstOfMonth();
$date_end = lastOfMonth();
どんな助けでも大歓迎です!