• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Validation Week
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Validation Week


  • Subject: Re: Validation Week
  • From: Chuck Hill <email@hidden>
  • Date: Wed, 19 Sep 2007 18:42:55 -0700


On Sep 19, 2007, at 3:33 PM, Pierre Bernard wrote:

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

I was going to write the same thing. I have found numerous issues with NSTimestampFormatter, with formatting some symbols as well as parsing. It looks like we have arrived at the same solution.



IIRC SimpleDateFormat is not thread safe. Oh joy!

I noticed that as well. That could be an issue for how I usually use them (one instance cached at the application level). I will have to look and see if it is safe to use like this if none of the set... methods are called.


Chuck


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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


This email sent to email@hidden

- - - 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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net


This email sent to email@hidden


--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects






_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Validation Week
      • From: Sam Barnum <email@hidden>
References: 
 >Validation Week (From: James Cicenia <email@hidden>)
 >Re: Validation Week (From: Pierre Bernard <email@hidden>)

  • Prev by Date: Re: Force Refresh Relation
  • Next by Date: Re: Validating a percentage?
  • Previous by thread: Re: Validation Week
  • Next by thread: Re: Validation Week
  • Index(es):
    • Date
    • Thread