Approach to convert from org.joda.time.DateTime to java.util.Calendar
Question
Anyone done this and can share? I see an option or two but want to know what others have accomplished.
No correct solution
OTHER TIPS
According to joda-time documentation the preferred method to use is to call this: AbstractDateTime#toCalendar.
You can also call AbstractInstant#toDate
http://joda-time.sourceforge.net/api-release/org/joda/time/base/AbstractInstant.html#toDate()
in the 2.1 you can use
public static Calendar parseCalendar(DateTime dt){
return dt.toGregorianCalendar();
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow