As we know the TENSES of English can be rather confusing for learners this is why I have decided to come up with a spectacular example using a made-up context which ought to help us see how the tenses involved work.
Imagine a situation. A person had worked at the office for 6 years and, say, on the 3 of March 2006 at 10 AM he was officially dismissed. But he was given one extra hour (until 11 AM) to collect his articles and say goodbye to his colleges. On the same day at 10.05 AM a new worker came to take his post over and he asked about the time having been spent by the old worker here. What tenses would fit for this situation? Let me give you my versions.
I think that the following TENSES are possible: (Do you agree?)
New Worker asks at 10.05 AM:
a) How long did you work here?
B) How long were you working here?
C) How long had you been working here until today?
D) How long had you worked here until today?
Is there any significant difference in subtleties between those four?
I also wonder whether it would be OK to use the Present Perfect in such a situation.
E) How long have you worked here?
I don’t feel comfortable with it, though. What do you think?
As for the answer of the old worker. I think that the TENSES used in the questions are OK. However, I am considering other options which I am not sure about.
F) I have been working here for the last 6 years. (Would it be correct to say it at 10.05 AM or is it only OK to say before 10.00 AM? Remember that he was dismissed at 10.00)
G) I was working here for the last 6 years. (I think it’s wrong. Do you agree?)