From e3b33c9509481da4c299dce3b40c861ce14139e0 Mon Sep 17 00:00:00 2001 From: liyang <1711467488@qq.com> Date: Tue, 12 Jun 2018 15:07:22 +0800 Subject: [PATCH] no message Former-commit-id: 8544b56f6e2736a9906492ae204b30c7f7949c28 Former-commit-id: cf6ed63d9a8f887e58bbfb5a60e01b6d3c0cd2ff Former-commit-id: 4bc9a097fce7c2cefa732ab7c33590cabbfe5c68 Former-commit-id: 4583cfb98dd544dacc31d1bfbcbc4528bb3b8015 --- src/pages/demo/plugins/day/index.vue | 66 ++++++++++++++-------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/src/pages/demo/plugins/day/index.vue b/src/pages/demo/plugins/day/index.vue index 96b81ad6..3c271932 100644 --- a/src/pages/demo/plugins/day/index.vue +++ b/src/pages/demo/plugins/day/index.vue @@ -5,54 +5,54 @@

当前时间

- {{now.format('YYYY年M月D日 HH:mm:ss')}} + {{now.format('YYYY年M月D日 HH:mm:ss')}}

获取

- {{now.year()}} - {{now.month()}} - {{now.date()}} - {{now.day()}} - {{now.hour()}} - {{now.minute()}} - {{now.second()}} - {{now.millisecond()}} + {{now.year()}} + {{now.month()}} + {{now.date()}} + {{now.day()}} + {{now.hour()}} + {{now.minute()}} + {{now.second()}} + {{now.millisecond()}}

设置

- {{now.set('month', 6).month()}} - {{now.set('second', 30).second()}} - {{now.set('hour', 4).hour()}} + {{now.set('month', 6).month()}} + {{now.set('second', 30).second()}} + {{now.set('hour', 4).hour()}}

操作

- {{now.add(1, 'day').format('YYYY年M月D日 HH:mm:ss')}} - {{now.subtract(7, 'year').format('YYYY年M月D日 HH:mm:ss')}} - {{now.startOf('year').format('YYYY年M月D日 HH:mm:ss')}} - {{now.endOf('month').format('YYYY年M月D日 HH:mm:ss')}} + {{now.add(1, 'day').format('YYYY年M月D日 HH:mm:ss')}} + {{now.subtract(7, 'year').format('YYYY年M月D日 HH:mm:ss')}} + {{now.startOf('year').format('YYYY年M月D日 HH:mm:ss')}} + {{now.endOf('month').format('YYYY年M月D日 HH:mm:ss')}}

显示

- {{now.format('YYYY-M-D HH:mm:ss')}} - {{now.diff(now.subtract(1, 'day'), 'days')}} - {{now.valueOf()}} - {{now.unix()}} - {{now.daysInMonth()}} - {{now.toDate()}} - {{now.toArray()}} - {{now.toJSON()}} - {{now.toISOString()}} - {{now.toString()}} - {{now.toObject()}} + {{now.format('YYYY-M-D HH:mm:ss')}} + {{now.diff(now.subtract(1, 'day'), 'days')}} + {{now.valueOf()}} + {{now.unix()}} + {{now.daysInMonth()}} + {{now.toDate()}} + {{now.toArray()}} + {{now.toJSON()}} + {{now.toISOString()}} + {{now.toString()}} + {{now.toObject()}}

查询

- {{now.isBefore(now.add(1, 'day'))}} - {{now.isBefore(now.subtract(1, 'day'))}} - {{now.isSame(now)}} - {{now.isSame(now.add(1, 'day'))}} - {{now.isAfter(now.add(1, 'day'))}} - {{now.isAfter(now.subtract(1, 'day'))}} + {{now.isBefore(now.add(1, 'day'))}} + {{now.isBefore(now.subtract(1, 'day'))}} + {{now.isSame(now)}} + {{now.isSame(now.add(1, 'day'))}} + {{now.isAfter(now.add(1, 'day'))}} + {{now.isAfter(now.subtract(1, 'day'))}}