moment format hours 24 code example
Example 1: convert 24 hour to 12 hour moment js
moment("15", "hh").format('LT')
Example 2: moment format 23 hour
let dt = moment();
dt.format("HH:mm") // 24 hour time
dt.format("hh:mm a") // 12 hour time (with am/pm)