diff --git a/src/pages/demo/plugins/day/index.vue b/src/pages/demo/plugins/day/index.vue index 5b07e09c..cafe332a 100644 --- a/src/pages/demo/plugins/day/index.vue +++ b/src/pages/demo/plugins/day/index.vue @@ -9,27 +9,48 @@

获取

- {{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.isBefore(now.add(1, 'day'), 'days')}} + {{now.isBefore(now.subtract(1, 'day'), 'days')}} + {{now.isSame(now)}} + {{now.isSame(now.add(1, 'day'), 'days')}}