Ember date helpers with locale support.
This addon includes time-ago-in-words
, time-ahead-in-words
, time-delta-in-words
,
time-format
, day-of-the-week
, date-and-time
, month-and-day
, month-and-year
.
It uses moment.js.
Installation
ember install:addon ember-cli-dates
Usage
Now, in your views/templates/components:
Time Deltas
Time Ago in Words
Time Ahead in Words
Time Delta in Words
Month and Day
Month and Year
Date and Time
Custom Format
Day of the Week
Locale Support
In order to add locale support, you need to import the locale file in your app's Brocfile.js
:
app.import(app.bowerDirectory + '/moment/locale/pt-br.js');
You then have the ability to specify any imported locale with:
License
MIT
Contributing
- Fork it
- npm install
- bower install
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Crafted with <3 by John Otander(@4lpine).