SyntaxFix
Write A Post
Hire A Developer
Questions
You can do something like this
var now = moment(); var time = now.hour() + ':' + now.minutes() + ':' + now.seconds(); time = time + ((now.hour()) >= 12 ? ' PM' : ' AM');