ToObject
ToObject는 날짜 속성을 담은 object
를 반환하는 .toObject()
API를 제공합니다.
javascript
var toObject = require('dayjs/plugin/toObject');
// import toObject from 'dayjs/plugin/toObject' // ES 2015
dayjs.extend(toObject);
dayjs('2019-01-25').toObject();
/* { years: 2019,
months: 0,
date: 25,
hours: 0,
minutes: 0,
seconds: 0,
milliseconds: 0 } */