cmdr
Check-in [85fb0a7a39]
Not logged in
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Clarify integer offset
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 85fb0a7a3924bfcfb71b04473a0030ee31302bce
User & Date: andreask 2015-07-15 23:29:29
Context
2015-07-15
23:30
Fix comment ref to tested v-type check-in: 4251025187 user: andreask tags: trunk
23:29
Clarify integer offset check-in: 85fb0a7a39 user: andreask tags: trunk
2015-07-14
03:59
parameter - Added convenience command stop!". Bumped version to 1.6. check-in: 91942da7f1 user: aku tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to vt_time_minute.tcl.

    77     77       # No completion.
    78     78       return {}
    79     79   }
    80     80   proc ::cmdr::validate::time::minute::validate {p x} {
    81     81       debug.cmdr/validate/time/minute {}
    82     82       try {
    83     83   	if {[string is integer -strict $x] && ($x >= 0)} {
    84         -	    # Integer, direct offset from midnight, force range.
           84  +	    # Integer, direct minute offset from midnight, force range.
    85     85   	    set minoffset [expr {$x % 1440}]
    86     86   	} else {
    87     87   	    # TODO: error code in clock::iso8601.
    88     88   	    set minoffset [expr {(([clock::iso8601 parse_time ${x}:00] - [DayBase]) / 60) % 1440}]
    89     89   	}
    90     90       } on error {e o} {
    91     91   	fail $p TIME "a time to the minute" $x