Carter's Vietnam pardon issued January 21, 1977. Vietnam War ended January 27, 1973 (Paris Peace Accords signing).
Both basically 3-year gaps after the fact. So to that end, Trump could sign a Jan6 pardon on his first day in office January 20, 2025. That's 4 years and 14 days but same general idea as the Civil War and Vietnam pardons.