製品ページの製品到着予定時刻 (ETA) に取り組んでいますが、アイデアを機能させるのに苦労しています。
私のPHPスクリプトは次のようになります:
$now = new DateTime(date("y:m:j",time()));
$eta = new DateTime($row['ArrivalDate']);
$diff = $now->diff($eta);
次に、これは私がアーカイブしたいものです If $diff < 30 days then out “ within 30 days”</p>
If $diff = or > 60days then output “2 months”
If $diff = or > 90 days then output “3 months”
If $diff > 365 days then output “over a year”
If $diff = 25 December then output “Date to be confirmed”
ETA 列で、ETA を「2 か月」と表示したい</p>
助けてください、私はPHPの第一人者ではありません