Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 542cf64fa5c8b77cb09dd548a2d81598fde643c0
Ticket: 1160695fffffffffffffffffffffffffffffffff
clock scan "next wed" is wrong?
User & Date: dwcollins on 2005-03-10 15:36:22
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    Using clock scan "next <dayname>" seems to go 2 
    weeks ahead, rather than 1, why is that? This affects 
    both the 8.4 line and 8.5.
    
    telhp6:/home/dcollins/tmp/tcl8.5a2/unix$ date
    Thu Mar 10 15:23:16 GMT 2005
    
    clock format [clock scan "+1 wed"] -format "%Y-%m-%
    d"
    2005-03-16
    clock format [clock scan "-1 wed"] -format "%Y-%m-%d"
    2005-03-09
    clock format [clock scan "next wed"] -format "%Y-%m-
    %d"
    2005-03-23
    clock format [clock scan "last wed"] -format "%Y-%m-%
    d"
    2005-03-09
    
    I can use +1 wed and -1 wed instead which seem to 
    work fine, but I mentally assumed that last/next was the 
    same as -1/+1, have I got it wrong?
    
    I tracked the "problem" to something in the yacc 
    grammer (Below). If I change the yyDayOrdinal to 1, 
    then I get the "correct" results, but it looks like it was 
    designed this way, so does the help need updating?
    
            | tNEXT tDAY {
                yyDayOrdinal = 2;
                yyDayNumber = $2;
            }
    
    This is probably obselete in 8.5 with the new clock 
    scan, but what's the equivalent 8.5 syntax?
    
    
  4. foundin changed to: "obsolete: 8.4.9"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "dwcollins"
  9. subsystem changed to: "16. Commands A-H"
  10. title changed to: "clock scan "next wed" is wrong?"
  11. type changed to: "Bug"