Artifacts Associated With Ticket 73384a82ad
Ticket change [33bf1edd5c] (rid 162408) by anonymous on 2018-04-16 15:57:59:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
foreach part {yesterday today now tomorrow} { puts stdout "[clock format [clock scan "${part} 3 months ago" ] -format {%Y.%m.%d}] : ${part} 3 months ago" } 2018.01.17 : yesterday 3 months ago !!! FALSE that's tommorrow 3 months ago 2018.01.16 : today 3 months ago 2018.01.16 : now 3 months ago 2018.01.15 : tomorrow 3 months ago !!! FALSE that's yesterday 3 months ago Could it be yesterday and tomorrow are mixed in calendar calculations? Unsing '-3 months' instead of '3 months ago' gives correct results! foreach part {yesterday today now tomorrow} { puts stdout "[clock format [clock scan "${part} -3 months"] -format {%Y.%m.%d}] : ${part} -3 months" } 2018.01.15 : yesterday -3 months 2018.01.16 : today 3 months 2018.01.16 : now 3 months 2018.01.17 : tomorrow -3 months - foundin initialized to: "8.4.12, 8.4.20 , 8.6.5"
- is_private initialized to: "0"
- login: "anonymous"
- priority initialized to: "5 Medium"
- private_contact initialized to: "3c4d6f6b4a3d4195f9f74c004b27f16e8643661e"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "anonymous"
- subsystem initialized to: "16. Commands A-H"
- title initialized to: "clock scan calendaric calculation error"
- type initialized to: "Bug"
Ticket change [797d53588a] (rid 162409) by sebres on 2018-04-16 16:40:44:
- assignee changed to: "kbk"
- icomment:
The problem is - both "yesterday/tomorrow" as well as "3 months" are currently relative units (effectively days). So the suffix "ago" works like simply "negation" for both units equally. So unfortunately ATM it is even equally to: "tomorrow 3 months ago" === "1 day 1 month ago" "yesterday 3 months ago" === "-1 day 1 month ago" Sounds a bit strange, but simply said: don't use "ago" suffix if you've multiple relative units (as mix) in the free-scan string. @Kevin, @TCT Theoretically I could relative easy change the logic of "tomorrow/yesterday" (should not be tDAY_UNIT (yyRelDay) anymore, so can affect the base instead of relunit), but such change is not backwards-compatible at all. What would you say about?
- login: "sebres"
- mimetype: "text/plain"