Answers for "javascript not getting month"

20

javascript month name

let date = new Date(2020, 05, 21); // 2020-06-21
let longMonth = date.toLocaleString('en-us', { month: 'long' }); /* June */
let shortMonth = date.toLocaleString('en-us', { month: 'short' }); /* Jun */
let narrowMonth = date.toLocaleString('en-us', { month: 'narrow' }); /* J */
Posted by: Guest on June-21-2020

Code answers related to "javascript not getting month"

Code answers related to "Javascript"

Browse Popular Code Answers by Language