Skip to content

Instantly share code, notes, and snippets.

@dantetesta
Created March 16, 2022 13:28
Show Gist options
  • Save dantetesta/e365eb09f8510b3e11730cc59c8fd892 to your computer and use it in GitHub Desktop.
Save dantetesta/e365eb09f8510b3e11730cc59c8fd892 to your computer and use it in GitHub Desktop.
<script>
var hoje = new Date();
var dia = hoje.getDate();
var ontem = dia-1;
var antiontem = ontem-1;
const mes = new Array();
mes[0] = "Janeiro";
mes[1] = "Fevereiro";
mes[2] = "Março";
mes[3] = "Abril";
mes[4] = "Maio";
mes[5] = "Junho";
mes[6] = "Julho";
mes[7] = "Agosto";
mes[8] = "Setembro";
mes[9] = "Outubro";
mes[10] = "Novembro";
mes[11] = "Dezembro";
var mesatual = mes[hoje.getMonth()];
var frase = `Preço especial válido: ${antiontem}, ${ontem} e ${dia} de ${mesatual} (isso termina hoje) `;
jQuery('.frase h2').text(frase);
</script>
Adicione um titulo h2 no elementor e chame o class css como .frase
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment