cmdr
Check-in [85fb0a7a39]
Not logged in

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 Unified Diffs Ignore Whitespace Patch

Changes to vt_time_minute.tcl.

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







|







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