Java's SimpleDateFormat can be set not to allow for lenient parsing.
Unfortunately NSTimestampFormatter lacks this ability.
I have created a subclass of NSTimestampFormatter which for parsing
uses an instance of SimpleDateFormat to create a Date which I then
convert to an NSTimestamp
IIRC SimpleDateFormat is not thread safe. Oh joy!
Pierre Bernard
Houdah Software s.à r.l.
On Sep 19, 2007, at 10:54 PM, James Cicenia wrote:
OK -
Now I am trying to validate dates. I hate dates. I especially hate
java dates, but I digress.
So now I have this little wizard component that asks for a date. It
has a date formatter.
However, someone could type in 13/33/09 and it will take it, albeit
change it to something else.
What is the best way to ensure a proper date is submitted or else
messaged back to them?
Thanks
James Cicenia
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/webobjects-
lists%40houdah.com
This email sent to [EMAIL PROTECTED]
- - -
Houdah Software s. à r. l.
http://www.houdah.com
HoudahGeo: One-stop photo geocoding
HoudahSpot: Powerful Spotlight frontend
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]