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

Add quarter 'q' to format string #1311

Merged
merged 3 commits into from Nov 26, 2013

Conversation

Projects
None yet
2 participants
@ehartford

ehartford commented Nov 26, 2013

I added a 'q' to the format string that will output the quarter.
January - March will output 1.
April - June will output 2.
July - September will output 3.
October - December will output 4.
I added a test in format.js called "quarter formats"

@icambron

This comment has been minimized.

Member

icambron commented Nov 26, 2013

Looks great. Couple of quick adjustments because you're also publicly exposing quarterOfYear():

  1. Rename it to quarter()
  2. Add some tests for calling it explicitly

If you make those changes, I'll merge this.

@icambron

This comment has been minimized.

Member

icambron commented Nov 26, 2013

And see my comment here on Q vs q

@ehartford

This comment has been minimized.

ehartford commented Nov 26, 2013

ok I will add the change you suggest.

@ehartford

This comment has been minimized.

ehartford commented Nov 26, 2013

I changed the name from quarterOfYear() to quarter() and I added a new library test.

icambron added a commit that referenced this pull request Nov 26, 2013

Merge pull request #1311 from ericstob/develop
Add quarter 'q' to format string

@icambron icambron merged commit ce83f29 into moment:develop Nov 26, 2013

1 check passed

default The Travis CI build passed
Details
@icambron

This comment has been minimized.

Member

icambron commented Nov 26, 2013

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment