↔️
Shift a Time
clock.shiftThe ClocktowerTimeMoves a moment later or earlier by a length of time: “3 days from now”, “1 hour before the event”. Leave the time blank for now. You get {{shifted.unix}}, {{shifted.iso}} and {{shifted.discord}}, ready to show or to hand to Do It Later's “At a set time”.
On the canvas
This is what Shift a Time looks like when you place it on your flow. Each field below is something you configure in the inspector panel.
↔️Time
Shift a Time
clock.shifttime
Now when empty
direction
select…
byrequired
e.g. 1h, 3 days
unit
select…
asrequired
shifted
output
invalid
Config fields
| Field | Type | Req | What it does |
|---|---|---|---|
timeNow when empty | text | — | From 📅 |
direction | select | — | Which way |
bye.g. 1h, 3 days | text | yes | By ⏱️ |
unit | select | — | A plain number means… ⏱️ |
asshifted | text | yes | Save it as ✨ |
Sparks this piece adds
After this piece runs, these values are available as sparks in every node downstream.
{{shifted.unix}}numberThe new moment, as a Unix time{{shifted.iso}}stringThe new moment, as an ISO date{{shifted.discord}}stringShown as a date in everyone's own time{{shifted.relative}}stringA live Discord countdown to itOutput ports
output{{shifted.*}} holds the new moment
invalidThe time or the length didn't make sense
📐
In TypeScript, this would be…
Not something you need to write — just a look at what Kitcord does for you.
TypeScript
const at = Date.now() + 7 * 24 * 3600_000; // 7 days later
const unix = Math.floor(at / 1000); // {{shifted.unix}}
const shown = `<t:${unix}:f>`; // {{shifted.discord}}