Get month name from two digit month number

后端 未结 4 1064
既然无缘
既然无缘 2021-02-02 09:26

I want to get month name from two digit month number (ex- 09). I tried with this code. But it doesn\'t work. The code give current month name only. What are the correct code for

4条回答
  •  天涯浪人
    2021-02-02 10:17

    For those looking to do it and changing languages (locale), this is what I did

    let month = moment().month(09).locale('pt-br').format('MMMM');
    

提交回复
热议问题