8000 Add quarter 'q' to format string by ehartford · Pull Request #1311 · moment/moment · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add quarter 'q' to format string #1311

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

Merged
merged 3 commits into from
Nov 26, 2013
Merged

Add quarter 'q' to format string #1311

merged 3 commits into from
Nov 26, 2013

Conversation

ehartford
Copy link

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
Copy link
Member

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
Copy link
Member

And see my comment here on Q vs q

@ehartford
Copy link
Author

ok I will add the change you suggest.

@ehartford
Cop 8000 y link
Author

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
Add quarter 'q' to format string
@icambron icambron merged commit ce83f29 into moment:develop Nov 26, 2013
@icambron
Copy link
Member

Thanks!

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
0