Hiyve Components - v1.0.0
    Preparing search index...

    Function formatTimestamp

    • Format a timestamp for display.

      Parameters

      • date: Date

        The date to format

      • relative: boolean = false

        Whether to use relative time (e.g., "2 minutes ago")

      Returns string

      Formatted time string

      formatTimestamp(new Date()); // "10:30:45 AM"
      formatTimestamp(new Date(), true); // "just now"