September 11th, 2002, 08:26 AM
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".
September 14th, 2002, 10:02 PM
Calendar.get(Calendar.DAY_OF_WEEK) will return 1 for sunday, 2 for monday, etc. They're actually constants, Calendar.SUNDAY, Calendar.MONDAY, etc.
September 16th, 2002, 04:06 AM
Thanks Bricker42, that's just what I needed!
September 16th, 2002, 08:30 AM
More help please, I can;y get this to work :-(
September 23rd, 2002, 06:17 AM
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.
September 23rd, 2002, 02:11 PM
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.
September 24th, 2002, 02:18 AM
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:
September 24th, 2002, 10:32 AM
Just change the code I gave you here [Day name] to have a different format (all the E's). Something like "MM-dd-yyyy EEEEEEEEEE", maybe.
September 25th, 2002, 06:03 AM
You';re my man! ;-)