Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
利用可能な日付があるとします:2012-06-11
今週の日付範囲を検索したいのですが、
今日までに現在の週:2012-06-06〜2012-06-12(水曜日から次の火曜日)
ex1。06-17(日)範囲= 06-13(水)〜06-19(火) ex2:06-21(木)範囲= 06-20(水)〜06-26(火)
どうすれば見つけることができますか?
echo date('Y-m-d', strtotime('2012-06-21 last wednesday')), ' ~ ', date('Y-m-d', strtotime('2012-06-21 tuesday'));
もっと効率的で良い方法があるかもしれませんが、これが手っ取り早く簡単な方法です。