Re: Validating a date from a text

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Validating a date from a text

Johan Brichau-2
The best thing to do is to try to create a date object from it. If it fails, it's not a (correct) date.
How you do that depends on the Smalltalk you are using. Take a look at the Date or DateAndTime classes in your image.

cheers
Johan

On 15 Nov 2010, at 07:12, Jeff Gray wrote:

>
> Is there a method to check a text for being a date? Kind of like isNumber,
> but for dates...
> --
> View this message in context: http://forum.world.st/Validating-a-date-from-a-text-tp3042550p3042550.html
> Sent from the Seaside General mailing list archive at Nabble.com.
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Validating a date from a text

sebastianconcept@gmail.co
agree. That's valid even when you have to deal with different locale formats.




On Nov 15, 2010, at 5:15 AM, Johan Brichau wrote:

The best thing to do is to try to create a date object from it. If it fails, it's not a (correct) date.
How you do that depends on the Smalltalk you are using. Take a look at the Date or DateAndTime classes in your image.

cheers
Johan

On 15 Nov 2010, at 07:12, Jeff Gray wrote:


Is there a method to check a text for being a date? Kind of like isNumber,
but for dates...
--
View this message in context: http://forum.world.st/Validating-a-date-from-a-text-tp3042550p3042550.html
Sent from the Seaside General mailing list archive at Nabble.com.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside