cmdr
Check-in [8772a8cd12]
Not logged in

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

Overview
Comment:Fixed missing trap clause needed for some inputs (number out of range)
Timelines: family | ancestors | descendants | both | vtype-testing
Files: files | file ages | folders
SHA1:8772a8cd12135f43a7b0ff62b062867aeb27f0c5
User & Date: aku 2015-07-03 04:19:56
Context
2015-07-03
04:20
Expanded VT testing. check-in: c502011735 user: aku tags: vtype-testing
04:19
Fixed missing trap clause needed for some inputs (number out of range) check-in: 8772a8cd12 user: aku tags: vtype-testing
04:18
Fix comment typo check-in: 3505bed918 user: aku tags: vtype-testing
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to vt_weekday.tcl.

74
75
76
77
78
79
80


81
82
83
84
85
86
87
    # Accept short and long weekday names, and weekday numbers 0-7.
    # Sunday can be either 0, or 7.

    set xa [string tolower $x]
    foreach pattern {%A %a %u %w} {
	try {
	    set epoch [clock scan $xa -format $pattern]


	} trap {CLOCK badInputString} {e o} {
	    continue
	} on ok {e o} {
	    # We have an epoch value.
	    # Format it back to a numeric weekday (1->monday, 7->sunday).
	    # (iso8601)
	    return [clock format $epoch -format %u]







>
>







74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
    # Accept short and long weekday names, and weekday numbers 0-7.
    # Sunday can be either 0, or 7.

    set xa [string tolower $x]
    foreach pattern {%A %a %u %w} {
	try {
	    set epoch [clock scan $xa -format $pattern]
	} trap {CLOCK badDayOfWeek} {e o} {
	    continue
	} trap {CLOCK badInputString} {e o} {
	    continue
	} on ok {e o} {
	    # We have an epoch value.
	    # Format it back to a numeric weekday (1->monday, 7->sunday).
	    # (iso8601)
	    return [clock format $epoch -format %u]