Mantis - Squeak
Viewing Issue Advanced Details
7274 Kernel major always 01-25-09 11:27 01-25-09 11:37
0007274: Date class>>fromString: cannot handle dates that contain a day name or day abbreviation at the beginning (FIX)
Date class>>fromString: and TimeStamp class>>fromString: (the latter uses the former) cannot handle date strings that contain a day name or abbreviation at the beginning offset by a period, comma or whitespace as is common in many date formats.
 Date [^] (1,367 bytes) 01-25-09 11:27
 Date [^] (638 bytes) 01-25-09 11:28 [^] (552 bytes) 01-25-09 11:28
 Date [^] (1,367 bytes) 01-25-09 11:30
 Date [^] (638 bytes) 01-25-09 11:31 [^] (552 bytes) 01-25-09 11:31

01-25-09 11:37   
The first file modifies readFrom: to call #skipDayName: if the date begins with a letter. The second file contains #skipDayName:, which will remove a sequence of letters from the stream and see if it matches a valid day name or abbreviation. If not, it will push it back onto the stream.

The third file modifies the readFrom: test case to test dates with day names/abbreviations in them. I replaced the multiple nearly identical #assert: statements with iteration.