JSPM

  • Created
  • Published
  • Downloads 679
  • Score
    100M100P100Q96969F
  • License MIT

The Stacks datetime helpers.

Package Exports

  • @stacksjs/datetime
  • @stacksjs/datetime/dist/index.mjs

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@stacksjs/datetime) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Stacks Datetime

Easily work with dates.

☘️ Features

  • Display & visualize dates in a human-friendly way
  • Easily convert dates to different formats & timezones
  • Simply calculate the difference between 2 dates
  • Modify dates with ease

🤖 Usage

pnpm i -D @stacksjs/datetime

Now, you can easily access it in your project:

import { now, useDateFormat } from '@stacksjs/datetime'

const formatted = useDateFormat(now(), 'YYYY-MM-DD HH:mm:ss')
console.log(formatted) // 2022-11-01 17:06:01

To view the full documentation, please visit https://stacksjs.dev/datetime.

🧪 Testing

pnpm test

📈 Changelog

Please see our releases page for more information on what has changed recently.

💪🏼 Contributing

Please review the Contributing Guide for details.

🏝 Community

For help, discussion about best practices, or any other conversation that would benefit from being searchable:

Discussions on GitHub

For casual chit-chat with others using this package:

Join the Stacks Discord Server

🙏🏼 Credits

Many thanks to the following core technologies & people who have contributed to this package:

📄 License

The MIT License (MIT). Please see LICENSE for more information.

Made with ❤️