本文共 284 字,大约阅读时间需要 1 分钟。
getMax(date1,date2){ var oDate1 = new Date(date1); var oDate2 = new Date(date2); if(oDate1.getTime() > oDate2.getTime()){ console.log('第一个大'); } else { console.log('第二个大'); }}this.getMax('2015-10-10','2015-10-11');
希望文档能帮助到您,最后求个赞,谢谢~
转载地址:http://kgevfk.baihongyu.com/