This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Journey To Enterprise Agility and have Daryl Kulak & Hong Li on-line!
See this thread for details.
Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Validate date and time in locat time.  RSS feed

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a field which displays the date in the local time . I want to write a function to validate if the date and time is correct .How do i accomplish this. This should take care of all languages not only english.
I am using the toLocaleString() function to convert the date to the local time .
I would really appreciate your Input on this.
Thanks
 
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what do you mean "in local time"?
you want to display client's local time or
the time on your server?
 
dsw dsw
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let me explain the problem more clearly.
I have a field where the user enters the field in mm/dd/yyyy format. I use the tolocaleString to convert the date/time in the regional format.
For example if i enter the date as 1/12/2003.
Then it automatically converts the date as
Sunday, January 12, 2003 12:00:00 AM if my settings are in English. It gets converted to equivalent date and time if the setting is french and so on.
I want to write a function which validates this date and time Sunday, January 12, 2003 12:00:00 AM
is valid or not.
Let me know if you need additional clarification.
Thanks
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!