Formats JavaScript dates to relative time strings (e.g., "3 hours ago").