Oops, missed a line :-(

| amIaDate |
amIaDate := '30 Feb 2010'.
[amIaDate asDate]
on: Exception
do: [:ex | Transcript show: 'That''s not a date, you fool!']

Dan

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Jeff Gray
Sent: Monday, November 15, 2010 1:26
To: [email protected]
Subject: [Pharo-users] Check a text - is it a date?


How do I check a text for holding a date value?
isNumber is handy for numbers. Is there anything like that?

The scenario I'm looking at is making sure a value in a Seaside control has
been entered correctly.

 
-- 
View this message in context:
http://forum.world.st/Check-a-text-is-it-a-date-tp3042556p3042556.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

_______________________________________________
Pharo-users mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users

_______________________________________________
Pharo-users mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users

Reply via email to