How to display the time of day with moment.js?

How would I display something like "Sunday Morning" if it’s before 12pm or "Sunday Afternoon" if it’s after 12pm?

I’m using the below to get the current day

var now = moment().format("dddd");
<span id="date"></span>

25 thoughts on “How to display the time of day with moment.js?”

  1. 933471 31647As far as me being a member here, I wasnt aware that I was a member for any days, truly. When the post was published I received a notification, so that I could participate inside the discussion of the post, That would explain me stumbuling upon this post. But were undoubtedly all members within the world of tips. 989589

  2. 828100 970584A thoughtful insight and suggestions I will use on my internet site. Youve certainly spent some time on this. Congratulations! 167234


Leave a Comment