Closed herzzanu closed 7 years ago
Yes you can go around the moment service but it is the public API for a reason.
Moment does not trigger events on locale change, and I have no intentions of monkey patching moment to observe locale changes. This is required so people go through these setter methods in order to trigger things like ember-helper recomputes when the locale changes at runtime.
It also enables a API for subscribing to locale change events within your Ember application.
this.get('moment').setTimeZone('America/Los_Angeles')
should bethis.get('moment').set('timezone', 'America/Los_Angeles')
and
this.get('moment').setLocale('es')
should bethis.get('moment').set('locale', 'es')
At least that's how it works for me.