> ## Documentation Index
> Fetch the complete documentation index at: https://invoca-5bd45748-mintlify-17ed87db.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Dates and times

> How dates, times, date filters, and relative timestamps are formatted across Invoca products.

## Dates

The format is `M/D/YYYY`. Single-digit months and days do **not** carry a leading zero.

| Rule                                           | ✅ Do       | ❌ Don't      |
| ---------------------------------------------- | ---------- | ------------ |
| No leading zero on single-digit months or days | `2/1/2020` | `02/01/2020` |

## Filtering of dates

When a user filters data by date, the filter's displayed label is not always the same
as the option they selected. Six of the eleven presets display their own name; the
"Current" presets display as "This".

| Selection            | Display for filter                                             |
| -------------------- | -------------------------------------------------------------- |
| Today                | Today                                                          |
| Yesterday            | Yesterday                                                      |
| Last 7 Days & Today  | Last 7 Days & Today                                            |
| Last 7 Days          | Last 7 Days                                                    |
| Last 30 Days & Today | Last 30 Days & Today                                           |
| Last 30 Days         | Last 30 Days                                                   |
| **Current Month**    | **This Month**                                                 |
| Last Month           | Last Month                                                     |
| **Current Quarter**  | **This Quarter**                                               |
| Last Quarter         | Last Quarter                                                   |
| This Year            | This Year                                                      |
| Custom Date Range    | `[START DATE] - [END DATE]`<br />Ex) `12/12/2020 - 12/15/2020` |

<Note>
  **"Current" in the picker becomes "This" in the filter label** — for Month and Quarter,
  but not for Year, which is already "This Year" in both. The asymmetry is in the source
  documentation and is preserved here. If it is unintentional, fix the picker rather than
  this table.
</Note>

## Times

The format is `h:mmam` / `h:mmpm` — no space before the meridiem, lowercase, no leading
zero on the hour.

| Rule                                  | ✅ Do      | ❌ Don't   |
| ------------------------------------- | --------- | --------- |
| Lowercase `am` and `pm`               | `11:30am` | `12:20AM` |
| No leading zero on single-digit hours | `1:30am`  | `02:20pm` |

## Timestamps

When a comment is posted, a timestamp shows how long ago it happened.

| Timeframe              | Text to display                |
| ---------------------- | ------------------------------ |
| Less than 1 minute ago | Less than 1 minute ago         |
| Less than 1 hour ago   | 2 minutes – 59 minutes ago     |
| Less than 1 day ago    | 1 hour – 23 hours ago          |
| Less than 1 week ago   | 1 day – 6 days ago             |
| More than 1 week ago   | `[DATE]`<br />Ex) `12/12/2020` |

<Warning>
  **This table is transcribed exactly, and it does not mean what it appears to mean.**

  The right-hand column is labeled "Text to display," but rows 2–4 contain *ranges*
  rather than display strings. No interface renders the literal string
  "2 minutes – 59 minutes ago."

  Read as intended, the right-hand column describes the **bucket boundary** and the
  actual output is a count plus a unit:

  | Elapsed      | Renders as               |
  | ------------ | ------------------------ |
  | \< 1 minute  | `Less than 1 minute ago` |
  | 1–59 minutes | `{n} minutes ago`        |
  | 1–23 hours   | `{n} hours ago`          |
  | 1–6 days     | `{n} days ago`           |
  | ≥ 7 days     | The date, `M/D/YYYY`     |

  **That reconstruction is an inference, not the source.** It needs confirmation against
  shipped behavior before it becomes the documented rule — in particular whether the
  singular forms read "1 minute ago" or "1 minutes ago," which the source does not say.
</Warning>

## Constraints

| ID                | Constraint                                                                               | Rationale                                                                           |
| ----------------- | ---------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| **TITAN-DATE-01** | Dates render as `M/D/YYYY` with no leading zero on month or day.                         | Consistency; leading zeros add width without adding information.                    |
| **TITAN-DATE-02** | Date filter labels use the "Display for filter" column, not the picker's option text.    | The picker says "Current Month"; the applied filter reads "This Month".             |
| **TITAN-DATE-03** | Custom ranges render as `[START] - [END]` using the same `M/D/YYYY` format on both ends. | A range with two different formats reads as two unrelated values.                   |
| **TITAN-TIME-01** | Meridiem is lowercase, with no space before it.                                          | `11:30am`, not `11:30 AM`.                                                          |
| **TITAN-TIME-02** | Times have no leading zero on single-digit hours.                                        | Matches TITAN-DATE-01.                                                              |
| **TITAN-TIME-03** | Relative timestamps switch to an absolute date at 7 days.                                | Past a week, "43 days ago" requires the reader to do arithmetic to place the event. |

## Gaps in the current rules

<Card title="Dates and times: open issues" icon="triangle-exclamation" href="/invoca-design-system/content/dates-and-times/open-issues">
  Divergences, open decisions, and undocumented gaps for Dates and times.
</Card>

## Why it works this way

**No leading zeros** trades a small amount of column alignment for reduced visual noise.
It is the right trade in an interface where dates appear inline in prose and in dense
tables; it is the wrong trade in a fixed-width export. If date columns need to align, the
alignment belongs to the table cell, not to the format.

**Relative timestamps stop at a week** because relative time is only useful while the
reader can convert it without effort. "3 hours ago" is immediately meaningful. "43 days
ago" is arithmetic, and worse, it decays — the same comment reads differently every day,
which makes it unquotable in a support ticket.
