• Given two dates, it returns a human-readable string representing the time elapsed between them.

    Parameters

    • from: Date

      Start date.

    • to: Date

      End date.

    Returns string

    A string like "5 minutes ago" or "2 days ago".