Answer based on context:

In February 1916 the Germans attacked French defensive positions at the Battle of Verdun, lasting until December 1916. The Germans made initial gains, before French counter-attacks returned matters to near their starting point. Casualties were greater for the French, but the Germans bled heavily as well, with anywhere from 700,000 to 975,000 casualties suffered between the two combatants. Verdun became a symbol of French determination and self-sacrifice. The Battle of the Somme was an Anglo-French offensive of July to November 1916. The opening day of the offensive  was the bloodiest day in the history of the British Army, suffering 57,470 casualties, including 19,240 dead. The entire Somme offensive cost the British Army some 420,000 casualties. The French suffered another estimated 200,000 casualties and the Germans an estimated 500,000. Gun fire wasn't the only factor taking lives; the diseases that emerged in the trenches were a major killer on both sides. The living conditions made it so that countless diseases and infections occurred, such as trench foot, shell shock, blindness/burns from mustard gas, lice, trench fever, cooties  and the ‘Spanish Flu'.

How many months was the battle of Somme?
4