Java Utililty Methods Calendar Create

List of utility methods to do Calendar Create

Description

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

Method

CalendarcreateIsoCalendar()
The ISO week-numbering year starts at the first day (Monday) of week 01 and ends at the Sunday before the new ISO year (hence without overlap or gap).
Calendar cal = new GregorianCalendar();
cal.clear();
cal.setMinimalDaysInFirstWeek(4);
cal.setFirstDayOfWeek(2);
return cal;
CalendarcreateResetCalendar()
Creates a new reset (non-lenient) calendar with the default time zone.
return createResetCalendar(TimeZone.getDefault());
StringcreateTimestampStr(Calendar para_calendar)
create Timestamp Str
String retTStamp = "";
retTStamp += (para_calendar.get(Calendar.DAY_OF_MONTH));
retTStamp += ("/" + (para_calendar.get(Calendar.MONTH) + 1));
retTStamp += ("/" + para_calendar.get(Calendar.YEAR));
retTStamp += ("   " + para_calendar.get(Calendar.HOUR_OF_DAY));
retTStamp += (":" + para_calendar.get(Calendar.MINUTE));
retTStamp += (":" + para_calendar.get(Calendar.SECOND));
return retTStamp;
...
CalendargetCalendar()
Get calendar instance with default time zone of GMT+8
TimeZone.setDefault(getDefaultTimeZone());
return Calendar.getInstance();
CalendargetCalendar()
returns Calendar#getInstance() with Calendar#setMinimalDaysInFirstWeek(int) set to 4.
Calendar c = Calendar.getInstance();
c.setMinimalDaysInFirstWeek(4);
return c;
CalendargetCalendar()
get Calendar
Calendar c = CACHED_CALENDAR.get();
if (c == null) {
    c = Calendar.getInstance();
    CACHED_CALENDAR.set(c);
return c;
CalendargetCalendar()
get GregorianCalendar.
return new GregorianCalendar();
CalendargetCalendar()
Returns a calendar instance.
return getCalendar(null, null);
CalendargetCalendar()
get Calendar
return Calendar.getInstance();
CalendargetCalendar()
Returns a Calendar instance.
return Calendar.getInstance(locale);