JSFiddle - React, Tailwind, and code Playground
by moritzkobrna
JavaScript
const start = new Date(2018, 10, 12, 0, 0);
const today = new Date();
const startDay = new Date(start.getFullYear(), start.getMonth(), start.getDate());
const diff = Math.abs(today - startDay);
const daysPassed = Math.floor(diff / (24 * 60 * 60 * 1000));
console.log(daysPassed);