@oss-autopilot/core - v3.7.0
    Preparing search index...

    Function formatRelativeTime

    • Formats a timestamp as a human-readable relative time string.

      Returns minutes for < 1 hour, hours for < 1 day, days for < 30 days, and a locale-formatted date string for anything older.

      Parameters

      • dateStr: string

      Returns string

      formatRelativeTime('2024-01-20T10:00:00Z')
      // "5d ago" (if called on Jan 25)