The Battle of Chancellorsville was fought at the end of April and the beginning of May in 1863. There are several different definitions for the start and end of the battle.
Hooker's army began its river crossings and the first shots were fired on the evening of April 28 and the morning of the 29th. His army consolidated around Chancellorsville on April 30, which the National Park Service considers as the starting date of the battle. But many historians consider the actual battle to have begun on May 1, when the first fighting started between large bodies of infantry.
The heaviest fighting was on May 2 and 3. By the end of May 3 Hooker had been forced out of Chancellorsville and into a defensive perimeter around United States Ford. This was the last major fighting around Chancellorsvile itself. May 4 saw both armies quietly on the defensive, and Hooker's main force retreated across the river on May 5 and 6, with hardly a shot fired. So some historians consider May 3 the last day of the battle, and others (including the Park Service) consider it the 6th.
But in and around Fredericksburg the fighting had continued after the 3rd. Union forces had stormed and taken the heights on May 3 and had advanced a few miles toward Chancellorsville. On May 4, the outnumbered Union forces fought a bloody battle around Salem Church and Bank's Ford before returning across the Rappahannock. So May 4 - the last day of heavy fighting in the campaign - is also considered the last day of the battle.