What's the issue in a code written for comparing the date with today's date?

前端 未结 3 1677
小鲜肉
小鲜肉 2020-12-07 06:53

I\'m comparing a date with current date(i.e. today\'s date). It is expected that the error should come only when the date to be compared is greater than today\'s date. It sh

3条回答
  •  旧巷少年郎
    2020-12-07 06:56

    I think you need to compare date in 'Y-m-d' or 'd-m-Y' format. I think it is not possible to compare date in 'm-d-Y' format

提交回复
热议问题