首页 > Web开发 > 详细

js date

时间:2017-06-09 14:50:30      阅读:193      评论:0      收藏:0      [点我收藏+]

 

 

 

   var IssuedTime=new Date(selectRows.IssuedTime);
            //计划下发年月日小时 
            var IssuedYear = IssuedTime.getFullYear();  
            var IssuedMonth = IssuedTime.getMonth()+1;  
            var IssuedDate = IssuedTime.getDate();    
            var IssuedHours = IssuedTime.getHours();  

            var date = new Date();
            //当前时间年月日小时  
            var NowYear = date.getFullYear();  
            var NowMonth = date.getMonth()+1;  
            var NowDate = date.getDate();    
            var NowHours = date.getHours();

//时间比较
   if (IssuedTime < date) {
                $.messager.alert(‘提示信息‘, "已经超过计划发布日期,请确认!");
                return;
            }
         //时间计算

  // 给日期类对象添加日期差方法,返回日期与diff参数日期的时间差,单位为天
                //return (this.getTime() - date.getTime()) / (24 * 60 * 60 * 1000);
                debugger;
                var IssH = (IssuedTime - date) / (60 * 60 * 1000);

  

js date

原文:http://www.cnblogs.com/lhlong/p/6971710.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!