Calendar in Java

In Java , I would like to determine if a 'Monday' is the first or second etc.

How do we do that. We have the Calendar. WeekOfMonth. That will give us only the week number of a day.

thanks in advance
expertsitAsked:
Who is Participating?
 
Manikandan ThiagarajanSenior consultantCommented:
0
 
objectsCommented:
Use Calendar.DAY_OF_WEEK and Calendar.DATE
0
 
Kelvin_KingCommented:
These links have some examples on getting the day of the week

http://www.rgagnon.com/javadetails/java-0100.html
http://javaalmanac.com/egs/java.util/GetDaysInMonth.html

Also, the Calendar API has more functions which you can use.

http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

 
expertsitAuthor Commented:
Thanks to you all.
0
 
objectsCommented:
how is that different from what I and Kelvin_King already suggested?
0
 
expertsitAuthor Commented:
Ok. When I went back to my question this morning, there were several replies to it. I went through the sites mentioned and found answer to my problem.
I then clicked the 'Accept Answer' to one of them. (I could not accept multiple answers).

That is why I mentioned 'Thanks to you all' in my comments.

0
 
objectsCommented:
thanks for the clarification :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.