This lightweight TypeScript utility library comes with common and utility dates functions.
Everything is exported from the root of this library but specific paths can be used too (especially when dynamically importing functions and tree shaking has no effect).
- Getting started
- What's Changed
- What's inside
- Development
- Contributing
- Security
- Credits
Run the following command to start using date-utils in your projects:
npm i @alessiofrittoli/date-utilsor using pnpm
pnpm i @alessiofrittoli/date-utilsformatDate- token
Tnow outputs time divider. - Timezone identifier - short offset is now returned by
otoken.
- token
npm installor using pnpm
pnpm iRun the following command to test and build code for distribution.
pnpm buildwarnings / errors check.
pnpm lintRun all the defined test suites by running the following:
# Run tests and watch file changes.
pnpm test:watch
# Run tests in a CI environment.
pnpm test:ci- See
package.jsonfile scripts for more info.
Run tests with coverage.
An HTTP server is then started to serve coverage files from ./coverage folder.
test:coverage:serveContributions are truly welcome!
Please refer to the Contributing Doc for more information on how to start contributing to this project.
Help keep this project up to date with GitHub Sponsor.
If you believe you have found a security vulnerability, we encourage you to responsibly disclose this and NOT open a public issue. We will investigate all legitimate reports. Email [email protected] to disclose any security vulnerabilities.
|
|
|