SunQuest
           Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old September 11th, 2002, 08:26 AM
EHendriks EHendriks is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2002
Location: Amersfoort, The Netherlands
Posts: 10 EHendriks User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 37 sec
Reputation Power: 0
Question Name of the day

I need a function that returns the name of the day when I give it a date.
I believe I need a function in the calender class, but can't find it at SUN... maybe this is faster..
example: give_day_name("2002-09-11") returns "wednesday".

Suggestions please!

Erwin

Reply With Quote
  #2  
Old September 14th, 2002, 10:02 PM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
Calendar.get(Calendar.DAY_OF_WEEK) will return 1 for sunday, 2 for monday, etc. They're actually constants, Calendar.SUNDAY, Calendar.MONDAY, etc.

Reply With Quote
  #3  
Old September 16th, 2002, 04:06 AM
EHendriks EHendriks is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2002
Location: Amersfoort, The Netherlands
Posts: 10 EHendriks User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 37 sec
Reputation Power: 0
Thanks Bricker42, that's just what I needed!

Erwin

Reply With Quote
  #4  
Old September 16th, 2002, 08:30 AM
EHendriks EHendriks is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2002
Location: Amersfoort, The Netherlands
Posts: 10 EHendriks User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 37 sec
Reputation Power: 0
More help please, I can;y get this to work :-(

Erwin

Reply With Quote
  #5  
Old September 23rd, 2002, 06:17 AM
EHendriks EHendriks is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2002
Location: Amersfoort, The Netherlands
Posts: 10 EHendriks User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 37 sec
Reputation Power: 0
Please Help! :-(

This is the error:

org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.


An error occurred at line: 326 in the jsp file: /Rubriek_adv.jsp

Generated servlet error:
/opt/jakarta-tomcat-4.0.3/work/localhost/test/Rubriek_0005fadv$jsp.java:317: Invalid type expression.
Calendar.get(Calendar.DAY_OF_WEEK)


Suggestions Please!

Erwin

Reply With Quote
  #6  
Old September 23rd, 2002, 02:11 PM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
I'm not sure why it's doing that. Can you tell me what you're trying to do? Maybe there's another way to get the info you want.

Reply With Quote
  #7  
Old September 24th, 2002, 02:18 AM
EHendriks EHendriks is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2002
Location: Amersfoort, The Netherlands
Posts: 10 EHendriks User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 37 sec
Reputation Power: 0
I have a listbox in a page, containing dates. The user chooses a date to place an advertisement. To help him, I would like to show the name of the day next to the datre: example rows of the listbox:

17-09-2002 Tuesday
18-09-2002 Wednesday
.
.
22-09-2002 Sunday

Reply With Quote
  #8  
Old September 24th, 2002, 10:32 AM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
Just change the code I gave you here [http://forums.devshed.com/showthrea...&threadid=43703] to have a different format (all the E's). Something like "MM-dd-yyyy EEEEEEEEEE", maybe.

Reply With Quote
  #9  
Old September 25th, 2002, 06:03 AM
EHendriks EHendriks is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2002
Location: Amersfoort, The Netherlands
Posts: 10 EHendriks User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 37 sec
Reputation Power: 0
You';re my man! ;-)

Erwin

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > Name of the day


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway