Dayjs is tiny js library that helps with manipulating dates. Check out its home page for more info. To facilitate to be used in lwc, we copied the esm files from npm repo and version controled here.
Warning
Dayjs files in this repo should not be modified except dayjsUtils component. Instead get the latest version from Dayjs and use it.
This repo currently has dayjs v1.11.13
- 
Copy the component into your org and deploy it.
 - 
Then use the
dayjsUtilscomponent to get hold ofdayjsinstance and use its methods. 
import {getDayjs} from 'c/dayjsUtils';
...
currentDate() {
  return getDayjs().format('ddd, MMM DD YYYY')
}
...
Follow these steps to update to new version
- Goto npm package https://www.npmjs.com/package/dayjs?activeTab=code
 - Copy the main file 
esm/index.jsand any other files referred from that file - Note that we should copy only from 
esmsubfolder as commonjs format is not supported in lwc - Make sure you copy the latest dayjs package.json as well into lwc component folder, which contains the version information. Since lwc doesn't like 
.jsonextn files as part of lwc component, rename it to.json.txt 
Dayjs library copyrights are held as outlined in the rpeo. Checkouts its license at https://github.com/iamkun/dayjs/blob/dev/LICENSE
Copyright for files we created are held by Datasert and are licensed under the same MIT license.