--
You received this message because you are subscribed to the Google Groups "mementodatabase" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mementodataba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mementodatabase/6897deb9-35ec-4126-8957-f7ae7124ff65n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mementodatabase/823ca968-0f22-439f-8dbc-6641174527a8n%40googlegroups.com.
if (field("Count")<="0")'0';
else field("Count")
To view this discussion on the web visit https://groups.google.com/d/msgid/mementodatabase/e9c137cb-1456-4f6e-a9f7-1d0d21e3f11fn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mementodatabase/87894189-c62a-49e5-b3f3-7fe2dd887ba9n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mementodatabase/3D72845E-4A8D-4CA2-9BC3-3A19A1DC8311%40gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mementodatabase/895bf159-4252-4d27-95c1-b4e5e0a5933en%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mementodatabase/2225b293-c1f3-427e-b1c4-b62ee8a0666bn%40googlegroups.com.
var remaining = field("Deadline") - Date.now();
if (remaining <= 0)
"";
else
(remaining / 86400000).toFixed();
I'm surprised toFixed() is supported in Calculation script. I thought that was a JavaScript-only method for numbers. In JavaScript, times are in milliseconds. I guess in Calculation scripts, they are in seconds. I have a JavaScript EntryColor field to color expired countdowns differently. Later, I'll add code to advance the deadline by a year or other unit of time, so I don't have to keep adding recurring deadlines.
To view this discussion on the web visit https://groups.google.com/d/msgid/mementodatabase/894a6810-8a8a-4790-986a-29fc31e1eb78n%40googlegroups.com.