用jquery和比较明天的日期 [英] get tomorrows date with jquery and compare
本文介绍了用jquery和比较明天的日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何以这种格式获取日期? 28/09/2013
how is it possble to get the date in this format ? 28/09/2013
我现在得到的是,
Fri Sep 27 2013 15:19:01 GMT+0530 (Sri Lanka Standard Time)
这是我编写的代码可以得到这个..
This is the code i have written to get that..
var date = new Date();
var tomorrow = new Date(date.getTime() + 24 * 60 * 60 * 1000);
alert(tomorrow);
我需要看天气,明天是给定的日期。这样的事情,当我给28/09/2013它应该提醒明天或不。
and i need to see weather, is the given date is tomorrow. something like this when i give 28/09/2013 it should alert as tomorrow or not.
任何帮助是突出赞赏。
注意:我只需要与日期进行比较。 28/09/2013 ===明天
NOTE : i only need to compare with date. 28/09/2013 === tomorrow
推荐答案
我将使用 DateJS库 。
var tomorrow = new Date.today().addDays(1).toString("dd-mm-yyyy");
这篇关于用jquery和比较明天的日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文