CupThread React Native & Expo SDK - v0.1.0
    Preparing search index...

    Function formatDate

    • Formats an ISO 8601 date string to a human-friendly relative or calendar date.

      Parameters

      • OptionalisoDateString: string | null

        ISO 8601 timestamp string.

      • OptionalcommonStrings: CommonStrings

        Optional localized relative time strings.

      Returns string

      Human-friendly relative date representation (e.g. 'Just now', '5m ago').

      Small device clock skew is clamped, so a timestamp a few seconds or minutes ahead still renders as 'Just now'. Dates more than FUTURE_DATE_TOLERANCE_MS ahead fall through to the calendar rendering rather than showing a relative label forever.