Even when we English-speakers feel pretty comfortable about imparfait v.s. passé composé in general, the choice can be difficult for the verb
être. I suspect it has something to do with the way we are taught to choose between these two tenses.
It's not so much that there's a rule about when to use which tense, but rather that choosing to conjugate
être in one tense or the other affects the focus of your sentence. Choosing between these two past tenses (for any verb) communicates your point of view on the event that you mention; it tells us the lens through which you view the event for the purpose of the thought or idea or story that is in your mind right now. So you could say that your choice of tense provides context at a very fundamental level.
Using the passé composé signals that you view the event as a unit, without any consideration of flow of time during the event/action/situation. That makes it a natural choice for "point in time" or "instantaneous" things, and for sequential actions. It means we don't expect any information about what happened "during" the event/situation. With the passé composé, there is no "during"... not necessarily because there wasn't time for a "during," but because you deem it to be irrelevant to the idea you're trying to express. Another way to think about it is that the passé composé talks about an event as "all or nothing": it either happened, or it didn't, but you have no interest whatsoever in any sort of incomplete state where the event was in progress but not yet finished.
Conversely, choosing to use the imparfait clues us in that you do care about the flow of time during the event/situation/action you mention. It focuses us on the "during" (however long or brief, however clearly or poorly defined that duration may be), and we expect you to fill in more information about that "during," about other things that happened or were the case after the event/situation/action started and before it came to an end. For this reason, the imparfait is perfectly suited to "setting the scene" upon which other events played out.
So in the end, why are you telling us that you were there [for a few weeks, from May 1-15, etc.]? The sentence is surely part of a conversation. Because you do define the time period, it's entirely possible that you're thinking of that trip as a discrete and indivisible block... but if that were the case, you'd probably be more likely to use a verb other than
être (
"Nous avons passé 2 semaines à Capri", "Nous leur avons rendu visite du 1 au 15", etc.). If you do use
être, it's more likely that you're thinking about what you did/saw/etc. during your stay, and that saying "we were there [for a certain amount of time]" is just setting the context for statements about other actions, events, etc. that took place while you were there. Even if you don't intend to go on to detail all your activities, putting the statement "we were there" in the imperfect implies that there were such activities, that being there was not the goal in and of itself. Since all of these thoughts and implications are about the "during" period, the imperfect is very natural when you use
être... even when you include words to define the duration or your stay.
Does that help at all?
