GeeCON Prague 2014*
The moose likes Java in General and the fly likes Get first sunday of a month Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "Get first sunday of a month" Watch "Get first sunday of a month" New topic
Author

Get first sunday of a month

Dev Anand
Ranch Hand

Joined: Aug 30, 2009
Posts: 41
Hi,
I'm preparing calendar in Java and display events like Friendships day, Mothers day etc.
Friendship day fall on first sunday of August.
I want to get the date of first sunday of a given month.
Can anyone help me in this regard?
Thank you.

Regards
Dev Anand
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39095
    
  23
What have you do so far?
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19697
    
  20

Hint: use java.util.Calendar.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
nvinod kumarjava
Greenhorn

Joined: Nov 09, 2010
Posts: 1
Hi Dev Anand,

Use following code

[Moderator action: Removed code. @nvinod kumarjava , please DontBeACodeMill.(⇐click) Also removed color. That much color is hard to read.]
Jeff Verdegan
Bartender

Joined: Jan 03, 2004
Posts: 6109
    
    6

Nvinod Kumarjava, please see your private messages for an important administrative matter.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Get first sunday of a month