JSFiddle - React, Tailwind, and code Playground

by Thiago Diniz

HTML

<div id="date"></div>

<div class="item one">
    Manhã 
</div>

<div class="item two">
    tarde
</div>

<div class="item three">
    noite
</div>

CSS

.item{
    margin:10px;
    display:block;
    display:none;
}

JavaScript

var local = new Date();
var localtime = local.getHours();

if(localtime < 12){
    $('.one').show();
}else if(localtime < 18){
    $('.two').show();
}else{
	$('.three').show();
}