He brought them before the king of Moab: and they lived with him all the while that David was in the stronghold.
The phrase “all the while,” would indicate that David sojourned a considerable time in Moab.