https://github.com/ladjs/dayjs-with-plugins
Day.js with all plugins and locales added out of the box, no need to use dayjs.extend!
https://github.com/ladjs/dayjs-with-plugins
alternative api browser bundler date datetime day dayjs format formatter javascript moment node replacement
Last synced: 4 months ago
JSON representation
Day.js with all plugins and locales added out of the box, no need to use dayjs.extend!
- Host: GitHub
- URL: https://github.com/ladjs/dayjs-with-plugins
- Owner: ladjs
- License: mit
- Created: 2019-10-10T18:22:13.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-06-25T19:28:47.000Z (over 1 year ago)
- Last Synced: 2025-04-05T02:01:53.796Z (10 months ago)
- Topics: alternative, api, browser, bundler, date, datetime, day, dayjs, format, formatter, javascript, moment, node, replacement
- Language: JavaScript
- Homepage: https://github.com/iamkun/dayjs
- Size: 298 KB
- Stars: 7
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dayjs-with-plugins
[](https://github.com/ladjs/dayjs-with-plugins/actions/workflows/ci.yml)
[](https://github.com/sindresorhus/xo)
[](https://github.com/prettier/prettier)
[](https://lass.js.org)
[](LICENSE)
[](https://npm.im/dayjs-with-plugins)
> Day.js with all plugins and locales added out of the box, no need to use `dayjs.extend` nor `dayjs.locale`!
## Table of Contents
* [Install](#install)
* [Usage](#usage)
* [Node](#node)
* [Browser](#browser)
* [Debugging](#debugging)
* [Contributors](#contributors)
* [License](#license)
## Install
[npm][]:
```sh
npm install dayjs dayjs-with-plugins
```
## Usage
### Node
```js
const dayjs = require('dayjs-with-plugins');
console.log('M/D/YY', dayjs().format('M/D/YY'));
```
### Browser
#### VanillaJS
This is the solution for you if you're just using `` tags everywhere!
```html
<script src="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?features=Promise">
(function() {
console.log('M/D/YY', dayjs().format('M/D/YY'));
})();
```
##### Required Browser Features
We recommend using (specifically with the bundle mentioned in [VanillaJS](#vanillajs) above):
```html
```
* Promise is not supported in op\_mini all
#### Bundler
This assumes you are using [browserify][], [webpack][], [rollup][], or another bundler.
See [Node](#node) usage above for how to use in a bundler environment.
### Debugging
You can use `NODE_DEBUG=dayjs-with-plugins node app.js` to debug output from this package.
## Contributors
| Name | Website |
| -------------- | -------------------------- |
| **Nick Baugh** | |
## License
[MIT](LICENSE) © [Nick Baugh](http://niftylettuce.com/)
##
[npm]: https://www.npmjs.com/
[browserify]: https://github.com/browserify/browserify
[webpack]: https://github.com/webpack/webpack
[rollup]: https://github.com/rollup/rollup