I have been thinking about certain temporal sentences like the following:

1. When I go to the store, I will get milk.

and

2. When I went to the store, I got milk.

I do not know anything about the literature on this topic (if there is any). So, what I am about to say might have been said by someone else or definitively disproven. If anyone has any information about the literature on this topic, I would be happy to hear it.

Here is an initial idea that seemed plausible to me:

3. Necessarily ((when I go to the store, I will get milk is true) iff (the

nearest future time during which I am going to the store is a time at which I get milk))

Unfortunately, there are several counterexamples to this suggestion. Here is one. Suppose I utter sentence (1) and then set out to get milk. One time during which I am going to the store is a time that ends the moment I step through the grocery store doors. But, that is not a time during which I get milk. However, if I get milk shortly after stepping through the door, then it seems spoke truly when I uttered (1).

Here are two modifications. The first is my lame suggestion and the second is Andrews more interesting suggestion:

4. Necessarily ((when I go to the store, I will get milk is true) iff (the

nearest future event during which I am go to the store is an event during which I get milk))

This might be subject to the same sorts of objections as (3). It all depends on what you think about events. Here is a variant of Andrew's suggestion:

5. Necessarily ((when I go to the store, I will get milk is true) iff (the

nearest future continuous time every subinterval of which is a time during which I am going to the store and no continuous superinterval of which includes more times during which I am going to the store is a time during which I get milk))

There are similar accounts of the (2) involving past times which I will not spell out here. What do you guys think of this suggestion? Are there any obvious counterexamples? I have had at least one person tell me that these accounts are too narrow because (1) is true if I get milk at any time in the future while I am going to the store. Does anyone else share that intuition about (1)?

UPDATE: Please note that I have revised (5) in my comments below and ignore the formulation in the post.