You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Michael L. Gantz" <st...@barcodesolutions.com> on 2003/01/31 21:22:19 UTC

Handling i18n dates in forms.

  What convienent utilities exist to handle i18n dates in forms?  The 
documentation appears to indicate that the Validator can validate dates 
based on the users current Locale.  But, when populating the form, which 
holds the date as a string, how do I do the international date 
conversion into and out of the form?  There appears to be a lot of 
locale specific conversion utilities in commons, but I can't find 
anything that appears to do the following:

   1) Take a date and convert it to a string using a short i18n format, 
i.e. MM/DD/YYYY or YYYY/MM/DD base on the users current Locale.

   2) Do the opposite of 1 and convert back to a date object based on 
the current users Locale.

I'm sure this is possible I just can't seem to get all the pieces put 
together.

Thanks.

Michael L. Gantz



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org