Date
Type
data-ops.datebasic/data-opsAny
Value
Any
Date (canvas label Date · plus the operation) runs one date/time Operation and writes the result to the data pipe. Instants are milliseconds since Unix epoch. The inspector labels those fields Timestamp (ms).
Unit choices: millisecond, second, minute, hour, day, week, month, year. Timezone fields use names such as UTC or America/New_York. Format / Pattern uses tokens such as YYYY-MM-DD HH:mm:ss.
Use Schedule to run a graph later. This block only computes values.
Configure
| Setting | Description |
|---|---|
| Operation | Grouped list (Core, Manipulation, Getters, and so on). Changing it resets the other fields |
| Remaining fields | Depend on Operation. Bind literals or context paths |
Handles
| Handle | Role |
|---|---|
| In (target) | Incoming connection |
| Out (source) | Continues after the operation |
Pipe schema
The next block reads this on the data pipe (pipe.value). The type depends on Operation: number (timestamps and components), true/false, or text (format).
Operations
Core
| Operation | Result | Inputs |
|---|---|---|
| Now | number | None — current time in ms |
| Parse | number | Input (required), optional Format, optional Timezone |
| From Unix (s → ms) | number | Unix seconds |
Manipulation
| Operation | Result | Inputs |
|---|---|---|
| Add / Subtract | number | Timestamp (ms), Amount, Unit |
| Start of / End of | number | Timestamp (ms), Unit |
| Round | number | Timestamp (ms), Unit — nearest unit boundary |
| Floor | number | Same as start of unit |
| Ceil | number | Instant after end of unit |
Getters
Each takes Timestamp (ms) and returns a number: Get year, Get month (0–11), Get day of month, Get day of week (0–6) (Sunday = 0), Get hour, Get minute, Get second, Get millisecond, Day of year, ISO week of year, Get quarter (1–4).
Comparison
| Operation | Result | Inputs |
|---|---|---|
| Is after / Is before | true/false | A (ms), B (ms) |
| Is same | true/false | A (ms), B (ms), optional Unit |
| Is between | true/false | Timestamp (ms), Min (ms), Max (ms), optional Inclusive bounds (default yes) |
Difference and format
| Operation | Result | Inputs |
|---|---|---|
| Difference | number | Start (ms), End (ms), Unit, optional Fractional |
| Format | text | Timestamp (ms), Pattern |
Timezone
| Operation | Result | Inputs |
|---|---|---|
| To UTC (epoch ms) | number | Timestamp (ms) |
| To timezone (epoch ms) | number | Timestamp (ms), Timezone |
| UTC offset (minutes) | number | Timestamp (ms), optional Timezone |
Helpers and business days
| Operation | Result | Inputs |
|---|---|---|
| Is valid timestamp | true/false | Timestamp (ms) |
| To Unix (ms → s) | number | Timestamp (ms) — whole seconds |
| Earliest / Latest | number | A (ms), B (ms) |
| Add business days | number | Timestamp (ms), Days — skips Saturday and Sunday |
| Next business day | number | Timestamp (ms) — next weekday |
Use case
- Now then Add a number of days for a due date.
- Parse an ISO string from an API, then Format for a message.
- Add business days for SLA deadlines that skip weekends.