### Install Day.js Source: https://github.com/iamkun/dayjs/blob/dev/README.md Install the library via npm. ```console npm install dayjs --save ``` -------------------------------- ### Extend with Plugins Source: https://github.com/iamkun/dayjs/blob/dev/README.md Load and register plugins to add extra functionality to the core library. ```javascript import advancedFormat from 'dayjs/plugin/advancedFormat' // load on demand dayjs.extend(advancedFormat) // use plugin dayjs().format('Q Do k kk X x') // more available formats ``` -------------------------------- ### Configure Internationalization Source: https://github.com/iamkun/dayjs/blob/dev/README.md Load locales on demand and apply them globally or to specific instances. ```javascript import 'dayjs/locale/es' // load on demand dayjs.locale('es') // use Spanish locale globally dayjs('2018-05-05').locale('zh-cn').format() // use Chinese Simplified locale in a specific instance ``` -------------------------------- ### Use Day.js API Source: https://github.com/iamkun/dayjs/blob/dev/README.md Common operations for parsing, formatting, manipulating, and querying dates. ```javascript dayjs('2018-08-08') // parse dayjs().format('{YYYY} MM-DDTHH:mm:ss SSS [Z] A') // display dayjs().set('month', 3).month() // get & set dayjs().add(1, 'year') // manipulate dayjs().isBefore(dayjs()) // query ``` -------------------------------- ### Perform Date Manipulation Source: https://github.com/iamkun/dayjs/blob/dev/README.md Chainable methods to modify and format a date object. ```js dayjs().startOf('month').add(1, 'day').set('year', 2018).format('YYYY-MM-DD HH:mm:ss'); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.