Java Calendar Create getLocalCalendar()

Here you can find the source of getLocalCalendar()

Description

get Local Calendar

License

LGPL

Declaration

private static final Calendar getLocalCalendar() 

Method Source Code

//package com.java2s;
//License from project: LGPL 

import java.util.Calendar;

public class Main {
    private static final ThreadLocal<Calendar> localCalendar = new ThreadLocal<Calendar>();

    private static final Calendar getLocalCalendar() {
        Calendar cal = localCalendar.get();
        if (cal == null) {
            cal = Calendar.getInstance();
            localCalendar.set(cal);/*from  w w w  . j  a  v  a2s  .c o  m*/
        }
        return cal;
    }
}

Related

  1. getCalendarOf(int slot)
  2. getCalendarRange(Calendar date, int i)
  3. getCalendarTime(long timestamp)
  4. getCalendarTodayZero(Calendar today)
  5. getCalendarTypeForString(String oneChar)
  6. getLocalCalendar()