wood burning stoves 2.0*
The moose likes Java in General and the fly likes Months and years Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Months and years" Watch "Months and years" New topic
Author

Months and years

Paul Keohan
Ranch Hand

Joined: Mar 15, 2000
Posts: 411
Is there a way in Java to get future month informtaion? Such as, what day of the week is August 15th 2003 going to be. I'm looking at the Calendar class to see if that might provide a way.
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Look into SimpleDateFormat in the API to get the 'patterns' you can use to format a date...

I believe the code below is a quick and dirty ( no error checking ) solution... just run the program, passing in a command-line argument in the form of mm/dd/yyyy, where mm is the month, dd is the day, and yyyy is the year. The program will return the day of the week that date is...



HTH,
-Nate
[This message has been edited by Nathan Pruett (edited July 10, 2001).]


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Months and years
 
Similar Threads
Retrieve Images from oracle
yadda..yadda..yadda...i did it ...finally...
IBM free testing opportunity...
Can anyone prevent his code from being decompiled
reading pdf,ppt,doc in swing app