It says that Congress debated and revised the Decleration of Independence, and finally approved it on July 4th.
The legal seperation from the UK was July 2nd.
"One of the most enduring myths about Independence Day is that Congress signed the Declaration of Independence on July 4, 1776.[4] The myth had become so firmly established that, decades after the event and nearing the end of their lives, even the elderly Thomas Jefferson and John Adams had come to believe that they and the other delegates had signed the Declaration on the fourth.[5] Most delegates actually signed the Declaration on August 2, 1776."