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'))}}