File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Help with Date class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Help with Date class" Watch "Help with Date class" New topic

Help with Date class

Judy Thompson

Joined: Apr 02, 2004
Posts: 2
I am trying to Debug a program that uses 3 deprecated Date functions (getMonth, getDay, getYear). Any suggestions on what to replace them with???
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

Hi Judy,
Welcome to JavaRanch!
Date is deprecated in favor of java.util.Calendar. Calendar is, unfortunately, a little more complex to use, but not horribly so.

[Jess in Action][AskingGoodQuestions]
Judy Thompson

Joined: Apr 02, 2004
Posts: 2
Thanks so much..........I'll give those a try!!
I agree. Here's the link:
subject: Help with Date class
It's not a secret anymore!