When did cold harbor take place?

On May 31, 1864, Gen. Sheridan managed to occupy Old Cold Harbor, repulsing the Confederate's counter attacks.
On June 3, 1864 the Union forces broke out an offensive against the opposite Confederate positions but they were repulsed with a loss of about 7000 dead and wounded.