Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using Deprecated API in Code

 
Ramaswamy Srinivasan
Ranch Hand
Posts: 295
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Need your comments regarding this.

I have to make a code which does the following

1. Get a date, which is passed as a String ("2005/07/17")
2. Format the date in desirable "dd-MMM-yyyy" format.

I plan to do the following



I know that (1) has been deprecated. I would like to know, what will the impact be, if I am using it in my code. And what would be the suitable alternative?

Thanks in advance for your kind help....

Cheers,
Ram
 
ramprasad madathil
Ranch Hand
Posts: 489
Eclipse IDE Java Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alternative :


Impact of using deprecated api:

When an api is tagged 'deprecated', it means that it wouldnt probably be supported in future versions - so probably this code, say, 10 years from now
on the latest java platform at that time, would give bizzare output.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have some SimpleDateFormat objects here ... look at the parse() method to create a Date.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic