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

Adds comma between day-of-month and year for en-US locale. #1784

Closed
wants to merge 1 commit into
base: develop
from

Conversation

Projects
None yet
3 participants
@97jaz
Contributor

97jaz commented Jul 19, 2014

Specifically:

  • LL => 'MMMM D, YYYY'
  • LLL => 'MMMM D, YYYY LT'
  • LLLL => ''dddd, MMMM D, YYYY LT'

... and similarly for the lowercase variants.

The use of a comma between the day-of-month and year is standard
practice in US English. See:

  • ICU docs [http://demo.icu-project.org/icu-bin/locexp?_=en_US](under Date & Time Patterns)
  • Chicago Manual of Style (by way of the Library of Congress)
    [http://lcweb2.loc.gov/ammem/ndlpedit/handbook/numberdate.html]
  • Wikipedia [http://en.wikipedia.org/wiki/Date_and_time_notation_in_the_United_States]
Adds comma between day-of-month and year for en-US locale.
Specifically:
- LL   => 'MMMM D, YYYY'
- LLL  => 'MMMM D, YYYY LT'
- LLLL => ''dddd, MMMM D, YYYY LT'

... and similarly for the lowercase variants.

The use of a comma between the day-of-month and year is standard
practice in US English. See:
- ICU docs [http://demo.icu-project.org/icu-bin/locexp?_=en_US]
  (under Date & Time Patterns)
- Chicago Manual of Style (by way of the Library of Congress)
  [http://lcweb2.loc.gov/ammem/ndlpedit/handbook/numberdate.html]
- Wikipedia [http://en.wikipedia.org/wiki/Date_and_time_notation_in_the_United_States]
@ichernev

This comment has been minimized.

Contributor

ichernev commented Jul 23, 2014

@97jaz good points.

I'm just worried if changing that won't break code (this is English after all). What if somebody parses the string manually? It should still work unless in strict mode. @icambron what do you think?

@icambron

This comment has been minimized.

Member

icambron commented Jul 23, 2014

+1, I think the commas are idiomatic AmEn. For the manual parse case, I think that's probably rare (they should just use LLL to parse too), and it seems unlikely that same person would be using strict mode. I'd be more worried about:

  1. `moment().format("LLL");
  2. save string to database or local storage or something
  3. upgrade moment
  4. moment(savedThing, "LLL", true); //=> invalid date

It's nice that without the strict flag they're still fine and it's a silly storage format to begin with. So I say we just do it.

ichernev added a commit that referenced this pull request Jul 25, 2014

@ichernev

This comment has been minimized.

Contributor

ichernev commented Jul 25, 2014

Merged in manually in 19974bc

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