This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have a JSpinner that uses SpinnerDateModel and I need to get the selected day, month and year. SpinnerDateModel has a method getDate() which returns a Date object and Date has methods getDay(), getMonth() and getYear(). The problem is that those methods are deprecated. The API says for Date.getDay(): "Deprecated. As of JDK version 1.1, replaced by Calendar.get(Calendar.DAY_OF_WEEK)." I can't find a way to convert Date to Calendar or to GregorianCalendar. Does anyone know how I can get the values without using deprecated methods?
Joined: Dec 03, 2005
I solved it by using SimpleDateFormat.format(Date date). It returns a String which is enough for me.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com