Skip to content

Convert numerical dates in your payload to JavaScript Dates

License

Notifications You must be signed in to change notification settings

PrecisionNutrition/ember-data-numerical-date-transform

Repository files navigation

ember-data-numerical-date-transform Build Status

==============================================================================

Converts dates represented as seconds since epoch to and from raw Dates.

Compatibility

  • Ember.js v3.4 or above
  • Ember CLI v2.13 or above
  • Node.js v8 or above

Installation

ember install ember-data-numerical-date-transform

Usage

// In your model...
import Model from 'ember-data/model';
import attr from 'ember-data/attr';

export default Model.extend({
  myDate: attr('numerical-date')
});

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.