+
时间戳格式化
- 一组:
- 二组:
- 三组:
- 四组:
- 五组:
+
+
+
+
@@ -43,7 +43,7 @@ var DateFormat={};!function(a){var b=["Sunday","Monday","Tuesday","Wednesday","T
var vm = new Vue({
el: "#main",
data: {
- timestamp: new Date().getTime(),
+ timestamp: new Date(new Date().getFullYear(), new Date().getMonth(), 1, 0, 0, 0, 0).getTime(),
date: ''
},
mounted: function () {
@@ -65,7 +65,7 @@ var DateFormat={};!function(a){var b=["Sunday","Monday","Tuesday","Wednesday","T
var vm = new Vue({
el: "#main1",
data: {
- timestamp: new Date().getTime(),
+ timestamp: new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate(), 0, 0, 0, 0).getTime(),
date: ''
},
mounted: function () {
@@ -86,7 +86,7 @@ var DateFormat={};!function(a){var b=["Sunday","Monday","Tuesday","Wednesday","T
var vm = new Vue({
el: "#main2",
data: {
- timestamp: new Date().getTime(),
+ timestamp: new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate(), new Date().getHours(), 0, 0, 0).getTime(),
date: ''
},
mounted: function () {
@@ -107,7 +107,7 @@ var DateFormat={};!function(a){var b=["Sunday","Monday","Tuesday","Wednesday","T
var vm = new Vue({
el: "#main3",
data: {
- timestamp: new Date().getTime(),
+ timestamp: new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate(), new Date().getHours(), new Date().getMinutes(), 0, 0).getTime(),
date: ''
},
mounted: function () {
@@ -127,6 +127,27 @@ var DateFormat={};!function(a){var b=["Sunday","Monday","Tuesday","Wednesday","T
+
+