How to convert yyyy-mm-dd formatted date to 'long date' format using jquery?

后端 未结 4 1166
故里飘歌
故里飘歌 2021-01-22 13:18

I have date in yyyy-mm-dd format. It is found to be ISO Date format. I need to convert it to Long Date format.

eg: I have date as \'2015-07-15\'. The converted date for

4条回答
  •  失恋的感觉
    2021-01-22 13:56

    I'd use the Moment.js library for this purpose:

    console.log(moment("2015-07-15").format("DD MMMM YYYY")); //prints 15 July 2015

提交回复
热议问题