• 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: Sam Barnum <email@hidden>
  • Date: Thu, 20 Sep 2007 07:19:40 -0700

Right, SimpleDateFormat isn't thread safe. I've heard recommendataions to use joda time instead (http://joda- time.sourceforge.net/)

Seems like it takes some of the ugliness out of dealing with dates (haven't used it personally, but plan to)

I think it's probably a good fit for what you're trying to do, since it's savvy about weeks.

On Sep 19, 2007, at 6:42 PM, Chuck Hill wrote:


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:
40360works.com


This email sent to email@hidden

_______________________________________________ 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
References: 
 >Validation Week (From: James Cicenia <email@hidden>)
 >Re: Validation Week (From: Pierre Bernard <email@hidden>)
 >Re: Validation Week (From: Chuck Hill <email@hidden>)

  • Prev by Date: Fetching Relation Empty
  • Next by Date: Re: class does not extend WOElement
  • Previous by thread: Re: Validation Week
  • Next by thread: Re: Validation Week
  • Index(es):
    • Date
    • Thread