let days
let months
let years
function setup() {
// Our anniversary is 4/7/2019
createCanvas(600, 600);
days = day()-7
months = month()-4
years = year()
}
function draw() {
background(255, 0, 150);
//heart
strokeWeight(0)
fill(255, 0, 0)
ellipse(200, 200, 250, 250)
ellipse(400, 200, 250, 250)
triangle(110, 290, 300, 490, 490, 290)
ellipse(300, 300, 100, 100)
//text
fill(0)
textStyle(BOLD);
textSize(20)
textAlign(CENTER, TOP)
text('It has been ' + months + ' months and ' + days + ' days since \n we first started dating', 300, 250)
}
My problem is that after the new year or any month change the dates will go into the negatives.
How would I make it so it keeps track of today's date and the set date and tells me the time in between them?