PHP date calculation

前端 未结 11 1683
不知归路
不知归路 2021-01-01 08:19

What is the best (date format independent way) in PHP to calculate difference in days between two dates in specified format.

I tried the following function:

11条回答
  •  时光取名叫无心
    2021-01-01 09:04

    I'm not sure what is considered best, since there is no built-in function in PHP for doing this, but some people have used gregoriantojd(), for example in this forum post.

提交回复
热议问题