Skip to content
Tcl Source Code History Of Ticket 73384a82ad
Login

History Of Ticket 73384a82ad

Artifacts Associated With Ticket 73384a82ad

  1. Ticket change [33bf1edd5c] (rid 162408) by anonymous on 2018-04-16 15:57:59:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. 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
      
    5. foundin initialized to: "8.4.12, 8.4.20 , 8.6.5"
    6. is_private initialized to: "0"
    7. login: "anonymous"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "3c4d6f6b4a3d4195f9f74c004b27f16e8643661e"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "anonymous"
    14. subsystem initialized to: "16. Commands A-H"
    15. title initialized to: "clock scan calendaric calculation error"
    16. type initialized to: "Bug"
  2. Ticket change [797d53588a] (rid 162409) by sebres on 2018-04-16 16:40:44:

    1. assignee changed to: "kbk"
    2. 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?
      
    3. login: "sebres"
    4. mimetype: "text/plain"