View Single Post
Old 07-22-2004, 06:24 PM   #2 (permalink)
technobard
Centurion Nova Prime
 
technobard's Avatar
 
Join Date: May 2002
Location: Oak Park, IL (USA)
Posts: 285
technobard is on a distinguished road
Sun screwed up Date when they made it. Now it's in that goofy state where most of the methods are deprecated, but it still exists. As far as I know, the only option you have (other than using the deprecated api) is to create a Calendar object and use the Date to set the Calendar to the same time. Then you can use the Calendar methods for getting what you want. It's messy and not really a good solution, but I think that's your only other option. That's assuming you need to keep the Date object around for some reason.

Did I mention that I hate Date?
__________________
It takes 2 points to draw a straight line, but at least 3 points to draw a conclusion.
technobard is offline   Reply With Quote