File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes plz help me, with Calendar problem.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "plz help me, with Calendar problem.." Watch "plz help me, with Calendar problem.." New topic
Author

plz help me, with Calendar problem..

Jack Daniel
Ranch Hand

Joined: Jun 15, 2002
Posts: 163
Hi e'body...
Well.. my objective is to get the date of the corrosponding SUN or MON or..
according to the situation, when i am given a date
ok, let me consider that i am given a date: 09/29/2003, and to find the corrosponding SUN in that week, this is the code that i have written :
the answer should have been 09/28/2003

But I am getting 09/07/2003, which is the first SUNDAY of the month.. NOT the corrosponding SUNDAY of that week..which is 09/28/2003
Can anybody help me, on what the problem is,..??
It would be great, if anybody can help me, on this issue..
Thanks again
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
Try this (for Mondays, DAY_OF_WEEK + 1 becomes DAY_OF_WEEK + 2)
Jack Daniel
Ranch Hand

Joined: Jun 15, 2002
Posts: 163
Thanks a lot, dude...
It was a nice way of solving my problem..
cheers
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: plz help me, with Calendar problem..