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

后端 未结 7 1350
轻奢々
轻奢々 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:23

    I think that your solution of converting it to Epoch then doing a comparison is as fast and as clean as your going to get.

提交回复
热议问题