Get current date in DD-Mon-YYY format in JavaScript/Jquery

后端 未结 15 1747
攒了一身酷
攒了一身酷 2020-12-01 03:06

I need to get the date format as \'DD-Mon-YYYY\' in javascript. I had asked a question, and it got marked duplicate to jQuery date formatting

But, the answers provi

15条回答
  •  清歌不尽
    2020-12-01 03:35

    Use the Moment.js library http://momentjs.com/ It will save you a LOT of trouble.

    moment().format('DD-MMM-YYYY');
    

提交回复
热议问题