Laravel Carbon See if date is in the past

前端 未结 3 1940
慢半拍i
慢半拍i 2020-12-17 08:34

I am very confused by this, maybe its something simple I am not seeing. If I want to see if a date is in the past of today I should be able to do something like this?

3条回答
  •  不思量自难忘°
    2020-12-17 09:17

    Check the section “Comparison” on carbon docs. You should call $first->lte($second) to compare two carbon instances.

提交回复
热议问题