首页 > 其他分享 >简单获取当前日期 时分秒 周几

简单获取当前日期 时分秒 周几

时间:2023-02-22 15:22:49浏览次数:35  
标签:seconds month hours 日期 year date 周几 vWeek 时分秒

time() {
	 				var vWeek, vWeek_s, vDay;
	 				vWeek = ["星期天", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
	 				var date = new Date();
	 				year = date.getFullYear();
	 				month = date.getMonth() + 1;
     				day = date.getDate();
	 				hours = date.getHours();
	 				minutes = date.getMinutes();
	 				seconds = date.getSeconds();
	 				vWeek_s = date.getDay();
					  //+ vWeek[vWeek_s]
					return year + "年" + month + "月" + day + "日" + "\t" + hours + ":" + minutes +":" + seconds + "\t"
				 },

  

标签:seconds,month,hours,日期,year,date,周几,vWeek,时分秒
From: https://www.cnblogs.com/zyzlb/p/17144516.html

相关文章