wood burning stoves 2.0*
The moose likes Java in General and the fly likes Date output with respect to 2 parameters inDate and weekday Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Date output with respect to 2 parameters inDate and weekday" Watch "Date output with respect to 2 parameters inDate and weekday" New topic
Author

Date output with respect to 2 parameters inDate and weekday

dinesh laxman kumar
Greenhorn

Joined: Jul 11, 2012
Posts: 19
Hi,

I have a scenario wherein I need to get the Date based on two input parameters date and weekday

For example

I have inputs Date(MM/dd/yyyy): 10/30/2012 and weekday: saturday

The output should be - "11/03/2012"

The output is that because its saturday... I tried exploring Calendar API, no clear cut thought yet...

Help please

Jeff Verdegan
Bartender

Joined: Jan 03, 2004
Posts: 6109
    
    6

Forget about Calendar and anything else Java-specific or even programming specific for now. You need to write down in English (or whatever your native language is) precisely what steps you would use to go about doing this "manually." Once you've got that--and the steps are very simple and very precise--then you can work on figuring out how to translate it to Java.

When you get stuck, TellTheDetails(←click) about your efforts and where you're having problems.
dinesh laxman kumar
Greenhorn

Joined: Jul 11, 2012
Posts: 19
Thanks, One of the best suggestions ever...
 
 
subject: Date output with respect to 2 parameters inDate and weekday