File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SimpleDateFormat

 
Mike Hays
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello again,

Does anyone know if its OK to use SimpleDateFormat in this project? The documentation for constructors in this class says "This constructor may not support all locales. For full coverage, use the factory methods in the DateFormat class." Is this not portable enough?
 
Roel De Nijs
Sheriff
Posts: 9216
78
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mike,

I just handled the dates as Strings, so no conversions or formatting (because you don't need it to find and book rooms). But a SimpleDateFormat will do the job. Although if I'm not mistaken it generates a valid date, also when you have a String that doesn't exactly match the pattern. More info can be found here.

Kind regards,
Roel
 
Roberto Perillo
Bartender
Posts: 2271
3
Eclipse IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy, Mike!

Roel De Nijs wrote:I just handled the dates as Strings, so no conversions or formatting (because you don't need it to find and book rooms).


Me too! And Mike, since you are not required to format them, my advice would be to keep things as simple as possible and not to format them.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic