Ember Dayjs

screenshot of Ember Dayjs

day.js template helpers and a service for Ember. Nearly drop-in replacement for ember-moment.

Overview:

The Ember-dayjs addon is a template helper and service for Ember.js that serves as a drop-in replacement for the popular ember-moment addon. With Ember-dayjs, developers can easily work with dates and times in their Ember.js applications using day.js, a lightweight JavaScript library for date manipulation and formatting. This addon provides compatibility with Ember.js v3.28 or above and requires either Embroider or ember-auto-import v2 for installation.

Features:

  • Ember.js Compatibility: Works with Ember.js v3.28 or above.
  • Template Helpers: Provides template helpers for working with dates and times in Ember.js templates.
  • Service Integration: Includes a service for accessing day.js functionality in Ember.js components and controllers.
  • Easy Replacement: Simply replace all "moment-" with "dayjs-" to migrate from ember-moment to Ember-dayjs.
  • Flexible Input: Supports various input formats for date/time values, including date strings, Dayjs objects, and Date objects.
  • UTC Mode Support: Allows the use of a template helper to return a Dayjs object with UTC mode set.
  • Customizable Output Format: Provides the ability to specify a custom date/time string output format with the template helper.
  • Time Zone Conversion: Allows the conversion of a date/time to a specified time zone using the template helper.

Summary:

The Ember-dayjs addon is a powerful tool for handling dates and times in Ember.js applications. With its template helpers and service integration, developers can easily manipulate, format, and convert dates using the lightweight day.js library. The addon offers compatibility with Ember.js v3.28 or above and requires Embroider or ember-auto-import v2 for installation. Whether you need to replace ember-moment or are looking for a new solution for date and time handling in Ember.js, Ember-dayjs provides a flexible and convenient option.