惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Y
Y Combinator Blog
博客园 - 叶小钗
GbyAI
GbyAI
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Stack Overflow Blog
Stack Overflow Blog
Jina AI
Jina AI
Microsoft Security Blog
Microsoft Security Blog
T
Tailwind CSS Blog
S
SegmentFault 最新的问题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 聂微东
Google DeepMind News
Google DeepMind News
Martin Fowler
Martin Fowler
有赞技术团队
有赞技术团队
Hugging Face - Blog
Hugging Face - Blog
N
Netflix TechBlog - Medium
B
Blog
MongoDB | Blog
MongoDB | Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
V
V2EX
雷峰网
雷峰网
Apple Machine Learning Research
Apple Machine Learning Research
人人都是产品经理
人人都是产品经理

博客园 - Burt

软件项目研发的设计流程 访问IIS元数据库失败解决方法(转) 经典SQL语句大全 合并表格,并实现对datatable的group by 功能 - Burt 时间段查询 left join on sql 日期格式转换(convert用法)(转) 分页存储过程 刷新后保持页面滚动条位置C#&VB(转) - Burt - 博客园 Dropdownlist样式设置 - Burt - 博客园 TreeView的遍历(转) 读取天气预报所产生乱码解决方法MiniSite.Weather.print("Wealth") 40种网页常用小技巧(javascript) 页面图象鼠标操作放大和制作图片热点 无法将类型login_aspx转换为System.Web.UI.WebControl c# 发邮件(转摘) [没有相关源的行] 访问被拒绝 水晶报表制作 页面自动刷新以及广告程序得Javascript代码
js 比较2日期大小 - Burt - 博客园
Burt · 2009-07-03 · via 博客园 - Burt

//比较2日期大小
   function isStartEndDate(startDate,endDate){  
                //alert(startDate+"==="+endDate);  
                if(startDate.length>0&&endDate.length>0){  
                    var startDateTemp = startDate.split(" ");  
                    var endDateTemp = endDate.split(" ");  
                    var arrStartDate = startDateTemp[0].split("-");  
                    var arrEndDate = endDateTemp[0].split("-");  
                   if(parseInt(arrStartDate[0])>parseInt(arrEndDate[0]))
                    return false;
                   else
                    if(parseInt(arrStartDate[0])==parseInt(arrEndDate[0]))
                   {
                          if(parseInt(arrStartDate[1])>parseInt(arrEndDate[1]))
                          return false;
                           else
                           if(parseInt(arrStartDate[1])==parseInt(arrEndDate[1]))
                           {
                                   if(parseInt(arrStartDate[2])>parseInt(arrEndDate[2]))
                                   return false;
                                   else
                                   return true;
                           }
                           else return true;
                   }
                   else return true;
                  
                 }
                 else
                  return false;
            }        

posted on 2009-07-03 15:29  Burt  阅读(238)  评论()    收藏  举报