Java Utililty Methods Timestamp to Calendar

List of utility methods to do Timestamp to Calendar

Description

The list of methods to do Timestamp to Calendar are organized into topic(s).

Method

CalendargetCalendar(Timestamp timestamp)
get Calendar
Calendar cal = null;
if (timestamp != null) {
    cal = Calendar.getInstance();
    cal.setTimeInMillis(timestamp.getTime());
return cal;
CalendargetCalendarFromTimeStamp(Timestamp t)
get Calendar From Time Stamp
Calendar c = Calendar.getInstance();
c.setTimeInMillis(t.getTime());
return c;
StringgetCalendarModel(java.sql.Timestamp date)
get Calendar Model
if (date != null) {
    return getHours(date.toString());
} else {
    return null;
IntegergetCalendarOfTimestamp(java.sql.Timestamp tTimestamp, Locale locale)
get Calendar Of Timestamp
Calendar cal = Calendar.getInstance(locale);
cal.setMinimalDaysInFirstWeek(4);
cal.setTime(tTimestamp);
return new Integer(cal.get(Calendar.WEEK_OF_YEAR));