DEV Community

Discussion on: How to get month list in your locale

Collapse
 
mvalentine512 profile image
Mark Valentine

Sorry I know this is a bit of an old thread but I can't find an answer via google. Could someone please explain line 8 of Danny Engleman's 2nd post.

I get that it is creating an object as the 2nd parameter to "DateTimeFormat" with 1 attribute named "month" that maps to another object.

What does [notation[0]] || "long" do? To me it looks like it should be a 2nd attribute of the outer object, but in my mind it should have a comma.

Thank you in advance.

Collapse
 
mvalentine512 profile image
Mark Valentine

Never mind. I got it.