Shortest way to compare 2 dates in dd/mm/yyyy format

后端 未结 7 1234
轻奢々
轻奢々 2021-01-20 23:44

can anyone suggest the neatest way to do this comparison? I need to test if a date provided in dd/mm/yyyy format is less than a fixed date, e.g 01/05/2009 - I know I can convert

7条回答
  •  再見小時候
    2021-01-21 00:18

    Well, you could use the PHP date class, but I am not sure it would be any better than you current solution...

    http://php.net/manual/en/book.datetime.php

提交回复
热议问题