🕊️

Double Progress Bar

Master Tag
Tips & Tricks
Created
Feb 11, 2021 10:12 PM
Usage
empty
floor
Format
dateBetween
Slice
Web Tags
Database
Formula
Alternatives
Cover

Donate

notion imagenotion image
📋
What's happening here? Let's assume you're reading material for an exam, and you want to give yourself a number of days to finish reading the material and make sense of the text before the exam. Progress bar 1: The reading progress: The reading material progress. Progress bar 2: The date progress: The date progress from now to exam THE GOAL: make sure the green book leads the red dot (stay ahead of schedule)
Reading

Formula

if(not empty(prop("Pages")) and not empty(prop("Date Range")), "Progress: " + format(slice("‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒", 0, floor(20 * prop("Page On") / prop("Pages"))) + "📗" + slice("‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒", 0, 20 - floor(20 * prop("Page On") / prop("Pages"))) + " " + format(floor(100 * prop("Page On") / prop("Pages"))) + "%") + "\nDeadline: " + format(if(dateBetween(start(prop("Date Range")), now(), "days") > 0, "⭕‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒ 0%", if(dateBetween(end(prop("Date Range")), now(), "days") > -1, slice("‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒", 0, floor(20 * dateBetween(now(), start(prop("Date Range")), "days") / dateBetween(end(prop("Date Range")), start(prop("Date Range")), "days"))) + "⭕" + slice("‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒", 0, 20 - floor(20 * dateBetween(now(), start(prop("Date Range")), "days") / dateBetween(end(prop("Date Range")), start(prop("Date Range")), "days"))) + " " + format(floor(100 * dateBetween(now(), start(prop("Date Range")), "days") / dateBetween(end(prop("Date Range")), start(prop("Date Range")), "days"))) + "%", "‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒⭕ 100%"))), "")