moment.js 24h format

前端 未结 8 991
無奈伤痛
無奈伤痛 2020-12-01 09:04

How do I display my time in 24h format instead of 12?

I am using moment.js.

I am pretty sure that these lines could have something to do with it.

<         


        
8条回答
  •  情深已故
    2020-12-01 09:18

    Try: moment({ // Options here }).format('HHmm'). That should give you the time in a 24 hour format.

提交回复
热议问题