We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

Calendar in Java

expertsit
expertsit asked
on
Medium Priority
313 Views
Last Modified: 2010-03-31
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
Comment
Watch Question

Mick BarryJava Developer
CERTIFIED EXPERT
Top Expert 2010

Commented:
Use Calendar.DAY_OF_WEEK and Calendar.DATE
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

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
Thanks to you all.
Mick BarryJava Developer
CERTIFIED EXPERT
Top Expert 2010

Commented:
how is that different from what I and Kelvin_King already suggested?

Author

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.

Mick BarryJava Developer
CERTIFIED EXPERT
Top Expert 2010

Commented:
thanks for the clarification :)
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.