From c95b5e6691124ed28c85cc39fe7b93641d657586 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BA=95=E5=B1=82=E7=94=A8=E6=88=B7?= Date: Wed, 13 Oct 2021 18:19:50 +0800 Subject: [PATCH] delete --- js/time.js | 76 ------------------------------------------------------ 1 file changed, 76 deletions(-) diff --git a/js/time.js b/js/time.js index f821152..044c700 100644 --- a/js/time.js +++ b/js/time.js @@ -1,79 +1,3 @@ -/* -var vm = new Vue({ - el: '#date', - data: { - hour: "", - week: "", - curweek: "", - day: "", - curday: "", - month: "", - outday: "", - }, - created: function () { //这里是定时器 - this.timer(); - setInterval(this.timer, 60000); - }, - methods: { - timer: function () { - var myDate = new Date(); - var myYear = myDate.getFullYear(); // 获取当前年份 - var myMonth = myDate.getMonth() + 1; // 获取当前月份 - var myDay = myDate.getDate(); // 获取当前日(1- 31) - var myHours = myDate.getHours(); // 获取当前小时(0-23) - var myMinu = myDate.getMinutes(); // 获取当前分钟(0-59) - var mySec = myDate.getSeconds(); // 获取当前秒数(0-59) - var myWeek = myDate.getDay(); //获取当前星期几(0-6) - - this.hour = myHours; - this.year = myYear; - this.month = myMonth - 1; - this.day = myDay - 1; - this.curday = myDay; - this.week = myWeek + 6; - this.curweek = myWeek + 7; - this.minute = myMinu; - this.age = myYear - this.yearForYour; - }, - //今天 - jinduT: function () { - var tian = ((this.hour * 60 + this.minute) / 24 / 60 * 100).toFixed(1); - return "
" + tian + " %" + - "
"; - }, - //本周 - jinduZ: function () { - var curdayWithHour = (this.week * 24 * 60 + this.hour * 60 + this.minute) / 7 / 24 / 60; - var zhou = (curdayWithHour * 100).toFixed(1); - return "
" + zhou + " %" + - "
"; - }, - //这个月 - jinduD: function () { - var days = new Date(this.year, this.month + 1, 0).getDate(); - var yue = ((this.day * 24 * 60 + this.hour * 60 + this.minute) / days / 24 / 60 * 100) - .toFixed(1); - return "
" + yue + " %" + "
"; - }, - //年 - jinduY: function () { - var olddate = new Date(this.year, 0); - var nowdate = new Date(this.year, this.month, this.day + 1); - var outday = (nowdate - olddate) / (1000 * 60 * 60 * 24) + 1; // - this.outday = outday; //已经过去天数 - var isLeap = (0 === this.year % 4) && (0 === this.year % 100) || (0 === this.year % - 400); - var days = isLeap ? 366 : 365; //今年的天数 - var ye = (((outday - 1) * 24 * 60 + this.hour * 60 + this.minute) / days / 24 / 60 * - 100).toFixed(1); - return "
" + ye + " %" + "
"; - } - } -}) -*/ - function init_life_time() { function getAsideLifeTime() { /* 当前时间戳 */