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:
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.