Preview:
  const dataExpiracao = new Date('2023-01-03');
  let dateToday = new Date()
  const offset = dateToday.getTimezoneOffset()
  dateToday = new Date(dateToday.getTime() - (offset*60*1000))
  var dateNow = dateToday.toISOString().split('T')[0]
  console.log(dateNow)
  var currentDate = new Date(dateNow);
  console.log(currentDate)
  console.log(dataExpiracao)

  const diffTime = Math.abs(currentDate - dataExpiracao);
  const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24)); 
  console.log(diffTime + " milliseconds");
  console.log(diffDays + " days");
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter