The number of the days that David lived in the country of the Philistines was a full year and four months.
Actually he was wiping out a lot of these little Philistine villages, and Canaanite villages and making out to king Achish that he was fighting against Judah.