The Artima Developer Community
Sponsored Link

Java Answers Forum
days of the week....

2 replies on 1 page. Most recent reply: Oct 2, 2005 11:41 PM by Matthias Neumair

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
rey

Posts: 10
Nickname: zerocoal
Registered: Sep, 2005

days of the week.... Posted: Oct 2, 2005 4:00 PM
Reply to this message Reply
Advertisement
hi, i already finish my work. But i have difficulties in determining the day of the week. I was not abble to compute and get the rigth day..

ex: The user will input month = 1; day = 2; year = 2005;

The output will tuesday January 2, 2005;

In would like to ask some help.....

Thanks!


Matthias Neumair

Posts: 660
Nickname: neumi
Registered: Sep, 2003

Re: days of the week.... Posted: Oct 2, 2005 10:10 PM
Reply to this message Reply
Try reading the API of GregorianCalendar.

There is a constant called DAY_OF_WEEK.

Matthias Neumair

Posts: 660
Nickname: neumi
Registered: Sep, 2003

Re: days of the week.... Posted: Oct 2, 2005 11:41 PM
Reply to this message Reply
DAY_OF_WEEK is a constant.
Use it like this:
calendarObject.get(Calendar.DAY_OF_WEEK);

Flat View: This topic has 2 replies on 1 page
Topic: help........me....... Previous Topic   Next Topic Topic: Help With Java Server

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use