# “ComputedDate”'s interpretation of “next”

Today


Interpreter["ComputedDate"] /@ {"next Monday", "next Tuesday", "next Wednesday"}


What explains this behavior? Can it be controlled?

• In all fairness, Interpreter documentation says "applied to a string to try to interpret..." What makes you believe its output should always be correct? – alancalvitti Nov 2 '14 at 1:23
• That language obviously refers to the fact that the function can only recognize a finite number of patterns. There is only one type of pattern being submitted here and it is exhibiting inconsistent behavior; I did not say it was incorrect but rather asked if there was an explanation. Clearly "next" is a relative concept depending on when the week starts, so for all I know it is a timezone issue. – mfvonh Nov 2 '14 at 15:27
• I was joking, welcome to a new kind of speculative science. I don't think it's a TZ issue, try more days. – alancalvitti Nov 2 '14 at 17:32
• My bad, went over my head. Days Wednesday and forward are shifted shifted a week ahead as of today (Sunday). – mfvonh Nov 2 '14 at 20:15
• @mfvonh Have you tried "this" over "next". People have argued about definition of this Monday vs next Monday. Even Interpreter["ComputedDate"] /@ {"this Monday", "this Tuesday", "this Wednesday"} is ambiguous. Try "current". – Hans Nov 5 '14 at 15:38

As @Hans pointed out in a comment, this isn't as straightforward to interpret as it may seem. Take a look at this question from english.stackexchange: "Which day does “next Tuesday” refer to?". The English language is a complex beast!

To me, “next Tuesday” means the Tuesday that comes next week. For example, on Monday, October 11 and Wednesday, October 13, “next Tuesday” means October 19. Whereas on Monday, October 18, “next Tuesday” means October 26. “This Tuesday” refers to the Tuesday that comes this week, which on Wednesday would refer to yesterday, and on Monday refers to tomorrow. Similarly, “Last Tuesday” is the Tuesday that came last week.

Without any descriptors, day names by themselves mean the next such day in the future unless used in the past tense. “He will do it on Tuesday” means the next time there is a Tuesday, which on Monday would mean “tomorrow” but on Wednesday would mean the following Tuesday. In the past tense, day names mean the last such day which occurred. “He did it on Tuesday” means the most recent day that was a Tuesday.

This alternative is perhaps a bit easier to interpret, and the results it returns make sense to me. You could also use "current Monday" etc.

Today
(* Mon 13 Apr 2015 *)

Interpreter["ComputedDate"] /@ {"this Monday", "this Tuesday",
"this Wednesday", "this Thursday", "this Friday", "this Saturday",
"this Sunday"}


However, returning to your example using the word "next", quite why the change occurs between Thursday 23rd and Friday 17th April I don't know.

Interpreter["ComputedDate"] /@ {"next Monday", "next Tuesday",
"next Wednesday", "next Thursday", "next Friday", "next Saturday",
"next Sunday"}


Another thing to try is the following. It seems that the new week is interpreted to start on a Sunday.

Interpreter["ComputedDate"] /@ {"Monday next week",
"Tuesday next week", "Wednesday next week", "Thursday next week",
"Friday next week", "Saturday next week", "Sunday next week"}