php 检查当前日期已超过特定日期

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php 检查当前日期已超过特定日期相关的知识,希望对你有一定的参考价值。

$current_date_time = Carbon::now();

$invitation_expired_at = Carbon::parse($meeting_invitation->expired_at);

//if expired
if ($current_date_time->gt($invitation_expired_at)) {
  return $this->response->error('Meeting invitation already expired', 422);
}

以上是关于php 检查当前日期已超过特定日期的主要内容,如果未能解决你的问题,请参考以下文章