ember-cli-dates icon indicating copy to clipboard operation
ember-cli-dates copied to clipboard

Use Timezones

Open hhff opened this issue 10 years ago • 5 comments

Hi @johnotander !

This is an awesome little set of helpers - but I have a use case where I need to lock the output to a certain timezone, rather than the user's computer's timezone.

Would you accept a PR for Timezone support?

hx

hhff avatar Jul 12 '15 21:07 hhff

Hey! I'd love to accept a PR for Timezone support.

johno avatar Jul 13 '15 15:07 johno

Cool. I just added timezone support to https://github.com/stefanpenner/ember-moment

To save duplicating code - I think it makes more sense to make ember-moment a hard dependency of ember-cli-dates.

Thoughts?

hhff avatar Jul 13 '15 18:07 hhff

I'm all for the reduction of code duplication. A while back I created an issue with ember-moment begin discussing the best method in which to combine these two addons.

It seems to me that having this addon sit atop ember-moment and provide additional helpers might be the best approach. Though, I'm not sure about the current status of the peer addon story. Is it possible to install an additional dependency and run the generator from another addon if it doesn't exist?

For example, as a user if I ember install ember-cli-dates, but don't have ember-moment installed, it'd be great if ember-moment is automatically installed as this would be a preferable installation method.

Another thought: If this addon is to sit atop ember-moment, it might be appropriate to rename to something like ember-moment-helpers or something of the like.

johno avatar Jul 13 '15 19:07 johno

If we implement the addon's default generator, we can install ember-moment automatically when ember-cli-dates is installed.

:+1: for ember-moment-helpers

I'll take a first pass at the ember-moment stuff.

hhff avatar Jul 14 '15 11:07 hhff

If we implement the addon's default generator, we can install ember-moment automatically when ember-cli-dates is installed.

Perfection.

I'll take a first pass at the ember-moment stuff.

Great, thanks!

johno avatar Jul 14 '15 17:07 johno