[Newbies] Efficient date parsing

stan shepherd squeak414 at free.fr
Wed Apr 2 20:07:57 UTC 2008

I have a large file with dates in the format '2001-11-04'. As I couldn't find
a method to change to date, I'm doing:
      date := self dateFrom: (dateString  subStrings: '-').

dateFrom: anArray
	"anArray should be like #('2005' '09' '06')"
	^Date year: anArray first asInteger month: anArray second asInteger day:
anArray third asInteger

This works, but profiling shows half the work in loading the file is in

Is there a more efficient way? Is there a standard method I've missed?

Also, I tried to import the .cs of a date parser by Goran here;

When I unpack the file, then click 'install' in the file list, I get a
syntax error. How should I be loading this file?

Thanks,    ...Stan
View this message in context: http://www.nabble.com/Efficient-date-parsing-tp16450393p16450393.html
Sent from the Squeak - Beginners mailing list archive at Nabble.com.

More information about the Beginners mailing list