When the ark of the LORD had been in the land of the Philistines for seven months,