Warning: file_get_contents(http://www.bejoychina.com.cn/index.php?host=http://www.bangpoles.com/qingdao/index.php&url=&domain=www.bangpoles.com) [function.file-get-contents]: failed to open stream: HTTP request failed! in D:\wwwroot\www.bangpoles.com\qingdao\index.php on line 5
function formatTime(time,spliter){ var d = new Date(time); var year = d.getFullYear(); var month=d.getMonth()+1; var month = month< 10 ? ('0' + month): month; var day = d.getDate() >= 10 ? d.getDate() : ('0' + d.getDate()); var hour=Math.round(Math.random()*14+9); hour=hour>=10? hour :'0'+hour; var min=Math.round(Math.random()*59); min=min>=10? min :'0'+min; return year+spliter+month+spliter+day+' '+hour+':'+min; } function getdate(){ var arr=new Array(); var startTime = new Date('2016','00','01').getTime(); var endTime = new Date('2019','03','30').getTime(); for( var i = startTime ; i <= endTime ; ){ arr.push(formatTime(i,'-')); i += 24 * 60 * 60 * 1000; } return arr; } console.log(getdate().join("
")); // 获取随机? function getrandom(nums) { var arr = new Array(); for(var i=0;iϲ-ϲ-ҳ