Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for moment().calendar() with moment-calendar #143

Conversation

ivanvanderbyl
Copy link
Contributor

Adds support for the moment().calendar() — Calendar Time display, and addresses #126

Usage:

{{moment-calendar aDate}}
{{moment-calendar aDate optionalReferenceDate locale="es" timeZone="Australia/Sydney"}}

Produces such outputs as:

  • Today at 2:36 PM
  • Yesterday at 2:36 PM
  • Tomorrow at 2:36 PM
  • Sunday at 2:36 PM
  • Last Monday at 2:36 PM
  • 7/10/2011

@jasonmit
Copy link
Collaborator

Tests failing because of timezone difference

@ivanvanderbyl
Copy link
Contributor Author

@jasonmit yep, fixing now.

@jasonmit
Copy link
Collaborator

👍 thanks for working on this

@ivanvanderbyl
Copy link
Contributor Author

No worries, we've actually had the code sitting in our app for a while, just decided to extract it so we could remove the tests from our suite.

Fixed applying tz and locale

Clarify dates in tests a bit

Timezones are hard
@ivanvanderbyl ivanvanderbyl force-pushed the feature/add-moment-calendar-support branch from cdfbca8 to 67b7b9c Compare January 19, 2016 09:04
@ivanvanderbyl
Copy link
Contributor Author

@jasonmit should be ready to roll!

@jasonmit
Copy link
Collaborator

Looks great, thanks again!

jasonmit added a commit that referenced this pull request Jan 19, 2016
…r-support

Added support for moment().calendar() with moment-calendar
@jasonmit jasonmit merged commit 94b6b32 into adopted-ember-addons:master Jan 19, 2016
@ivanvanderbyl ivanvanderbyl deleted the feature/add-moment-calendar-support branch January 19, 2016 09:10
@jasonmit
Copy link
Collaborator

Versioned as 5.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants