Is it possible to tell the difference between 2 ember-date time objects in days?
For example, if I have the following 2 date objects
var start_date = Ember.DateTime.parse(app.start_date, '%Y-%m-%d');
var end_date = Ember.DateTime.parse(app.end_date, '%Y-%m-%d');
I can tell which one is greater than the other like this:
Ember.DateTime.compareDate(end_date, start_date);
But is there a way of getting the difference in days?
I am not sure there is an API to get difference in days (something like in
JodaTime).I know that
Ember.DateTimebasically extends the regular jsDateso you can do something like:Hope it helps…