diff --git a/skills/objectstack-query/rules/aggregation.md b/skills/objectstack-query/rules/aggregation.md index 745a49cb4c0..0b5b20581b0 100644 --- a/skills/objectstack-query/rules/aggregation.md +++ b/skills/objectstack-query/rules/aggregation.md @@ -79,10 +79,10 @@ aggregations (never bucket by hand in app code): the projected COLUMN only** — grouping still keys on the field, so the buckets themselves are unchanged. Read the result under `alias ?? field`, and reference that same name from `having`. -- The engine pushes bucketing down to the driver (`DATE_TRUNC` etc.) when - the dialect supports that granularity, and transparently falls back to - in-memory bucketing otherwise — results are correct either way, **including - the column keys**. +- The engine pushes bucketing down to the driver (`to_char` / `date_format` / + `strftime` / `$dateToString`, never `date_trunc`) when the dialect supports + that granularity, and transparently falls back to in-memory bucketing + otherwise — results are correct either way, **including the column keys**. ## HAVING Clause diff --git a/skills/objectstack-ui/rules/dashboards.md b/skills/objectstack-ui/rules/dashboards.md index 69c22ded67a..990102821b2 100644 --- a/skills/objectstack-ui/rules/dashboards.md +++ b/skills/objectstack-ui/rules/dashboards.md @@ -318,14 +318,14 @@ const signedByMonth: DashboardWidget = { id: 'signed_by_month', type: 'line', | `dateGranularity` | Rendered bucket label | |:--|:--| | `'day'` | `YYYY-MM-DD` | -| `'week'` | ISO date of the bucket (`YYYY-MM-DD`) | +| `'week'` | ISO week `YYYY-Www` | | `'month'` | `YYYY-MM` | | `'quarter'` | `YYYY-Qn` | | `'year'` | `YYYY` | -* **Engine support** — Postgres `date_trunc`, MySQL `date_format`, SQLite - `strftime`, MongoDB `$dateTrunc`, in-memory fallback. All emitted by the - analytics service, not the client. +* **Engine support** — drivers emit the bucket as a label (`2026-01`), not + an instant: Postgres `to_char`, MySQL `date_format`, SQLite `strftime`, + MongoDB `$dateToString`, in-memory `bucketDateKey`. * **Human labels are automatic** — the analytics layer formats the bucket value to the label above, and resolves `select`/`lookup` dimension values to their option label / related-record name. Measures carry their `label` + `format`