aspose file tools*
The moose likes Beginning Java and the fly likes Problem regarding Date class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Problem regarding Date class" Watch "Problem regarding Date class" New topic
Author

Problem regarding Date class

Chintan Shah
Greenhorn

Joined: Jun 29, 2005
Posts: 27
Hi..guys,
I am developing one website..and i am using Date class in JSP.
The date class returns 1 for Monday, 2 for Tuesday.
Now what i want is that i need to reconvert 1 to Monday, 2 to Tuesday because..i need to compare all of them..and then show appropriately Monday, Tuesday on customers page. Please let me know..how to compare..and how to show week days.
any help is appreciated . thanx in advance.
Chintan shah
ak pillai
author
Ranch Hand

Joined: Feb 11, 2006
Posts: 288
java.util.Date.getDay() is a deprecated method. You should use the java.util.Calendar.

check this API out:

http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#SUNDAY



java j2ee job interview questions with answers | Learn the core concepts and the key areas
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61216
    
  66

Not much to do with JSP, so this has been moved to Java in General (beginner).


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Alana Sparx
Ranch Hand

Joined: Feb 14, 2006
Posts: 121
Is there a solution involving


Sorry, last (first?) probable post today - close of day in my timezone zzzzz.....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem regarding Date class