When did Spain in the American Revolutionary War happen?

Spain in the American Revolutionary War happened in 1781.