Circle V2 API Docs
    Preparing search index...

    Function formatDateRangeLabel

    • Formats a date range (ISO date strings like "2026-03-05") into a human-readable label for filter badges.

      Examples:

      • from + to, same year: "Mar 1 – Mar 31"
      • from + to, diff years: "Mar 1, 2025 – Jan 15, 2026"
      • from only: "Mar 1, 2026"
      • to only: "Mar 31, 2026"

      Parameters

      • Optionalfrom: string
      • Optionalto: string

      Returns string