//final formula
if(prop("Total Read") == 0, "You've not started this challenge yet.", if(floor(subtract(prop("Total Read"), prop("Current Target"))) < 0,concat("You've read " + format(prop("Total Read")) + "/" + format(prop("Reading Goal")) + " books so far! Keep going!"), concat("You've read " + format(prop("Total Read")) + "/" + format(prop("Reading Goal")) + " books! Keep going!")))
//breaking down the formula into components while writting it components
//books per day
prop("Reading Goal") / 365
//calculate books should have read by now
floor(toNumber(format(dateBetween(end(now()), start(prop("Start Date")), "days") + 1)) * prop("Books Per Day"))
//calculate books ahead or behind
floor(subtract(prop("Total Read"), prop("Current Target")))
//display books behind
concat("You've read " + format(prop("Total Read")) + "/" + format(prop("Reading Goal")) + " books so far! Keep going!")
//display books ahead
concat("You've read " + format(prop("Total Read")) + "/" + format(prop("Reading Goal")) + " books! Keep going!")
//level 1 of final formula - no books read
if(prop("Total Read") == 0, 1, 0)
//final level of formula - behind/ahead schedule
if(prop("Total Read") == 0, "You've not started this challenge yet.", if(floor(subtract(prop("Total Read"), prop("Current Target"))) < 0,concat("You've read " + format(prop("Total Read")) + "/" + format(prop("Reading Goal")) + " books so far! Keep going!"), concat("You've read " + format(prop("Total Read")) + "/" + format(prop("Reading Goal")) + " books! Keep going!")))
Book tracking
Books