开发者

how to compare date from timepicker with the current time

I use timepicker() to get both of the day and开发者_如何学C the time. Now I want to know if that moment(date+time) is already passed or not. You should know that I am passing these values to my controller with ajax. So I will get them as strings. How can I convert this string to date so that I can compare it ?


The simplest way is, to convert the date and time into milliseconds and then comepare these on server side.


Use ISO 8601 dates throughout, and compare them alphabetically.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜