public static Calendar getCalendarInstance(final Date date) {
        Calendar instance;
        if (date instanceof DateTime) {
            final DateTime dateTime = (DateTime) date;
            if (dateTime.getTimeZone() != null) {
                instance = Calendar.getInstance(dateTime.getTimeZone());
            }
            else if (dateTime.isUtc()) {
                instance = Calendar.getInstance(TimeZones.getUtcTimeZone());
            }
            else {
            	// a date-time without a timezone but not UTC is floating
                instance = Calendar.getInstance();
            }
        }
        else {
            instance = Calendar.getInstance(TimeZones.getDateTimeZone());
        }
        return instance;
    }
public static Calendar getCalendarInstance ( final Date date ) { Calendar instance ; if ( date instanceof DateTime ) { final DateTime dateTime = ( DateTime ) date ; if ( dateTime . getTimeZone ( ) != null ) { instance = Calendar . getInstance ( dateTime . getTimeZone ( ) ) ; } else if ( dateTime . isUtc ( ) ) { instance = Calendar . getInstance ( TimeZones . getUtcTimeZone ( ) ) ; } else { instance = Calendar . getInstance ( ) ; } } else { instance = Calendar . getInstance ( TimeZones . getDateTimeZone ( ) ) ; } return instance ; }
Returns an instance of <code>java.util.Calendar</code> that is suitably
initialised for working with the specified date.
@param date a date instance
@return a <code>java.util.Calendar</code>