# 倒计时时间

```javascript
import dayjs from 'dayjs';
import duration from 'dayjs/plugin/duration';

dayjs.extend(duration);


setInterval(() => {
      const deadline = ''
      const time = '';
      const result = dayjs.duration(dayjs(time).diff(dayjs(Date.now())));
      const { days, hours, minutes } = result.$d;
      deadLine = `${days}天${hours}时${minutes}分`;
    }, 1000);
```
