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");
$("#date").append(now);
<span id="date"></span>

22 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

    Reply

Leave a Comment