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>

Leave a Comment