Returns the Julian calendar system instance (singleton). 'jcal'
and 'jeras' are set upon the return.
176212
private static synchronized BaseCalendar getJulianCalendarSystem() {
        if (jcal == null) {
            jcal = (JulianCalendar) CalendarSystem.forName("julian");
            jeras = jcal.getEras();
        }
        return jcal;
    }
1329271
def get_instance(self, payload):
        
        return DailyInstance(self._version, payload, account_sid=self._solution['account_sid'], )
890159
public static PojoUtil getInstance() {

    if (instance == null) {
      PojoUtilImpl impl = null;
      synchronized (PojoUtilImpl.class) {
        if (instance == null) {
          impl = new PojoUtilImpl();
          impl.initialize();
          instance = impl;
        }
      }
    }
    return instance;
  }
449139
def singleton(cls):
    
    instances = {}
    def getinstance(**kwargs):
        """
        Creates a new RGeocoder instance if not created already
        """
        if cls not in instances:
            instances[cls] = cls(**kwargs)
        return instances[cls]
    return getinstance
1091283
def to_jd(year, month, day, method=None):
    ''''''
    method = method or 'equinox'

    if day < 1 or day > 30:
        raise ValueError("Invalid day for this calendar")

    if month > 13:
        raise ValueError("Invalid month for this calendar")

    if month == 13 and day > 5 + leap(year, method=method):
        raise ValueError("Invalid day for this month in this calendar")

    if method == 'equinox':
        return _to_jd_equinox(year, month, day)

    else:
        return _to_jd_schematic(year, month, day, method)
521750
public static SystemUtil getInstance() {

    if (instance == null) {
      synchronized (SystemUtilImpl.class) {
        if (instance == null) {
          instance = new SystemUtilImpl();
        }
      }
    }
    return instance;
  }
759553
def from_jd(jd):
    ''''''
    year = gregorian.from_jd(jd)[0]
    day = jwday(jd) + 1

    dayofyear = ordinal.from_jd(jd)[1]
    week = trunc((dayofyear - day + 10) / 7)

    # Reset year
    if week < 1:
        week = weeks_per_year(year - 1)
        year = year - 1

    # Check that year actually has 53 weeks
    elif week == 53 and weeks_per_year(year) != 53:
        week = 1
        year = year + 1

    return year, week, day
374628
public static double getJulianDayNumber(Calendar time) {

        if (time == null) {
            time = GregorianCalendar.getInstance(TimeZone.getTimeZone("GMT"));
        }

        double jd = BASE_JD + time.getTimeInMillis() / MILLISEC_PER_DAY;

        return jd;
    }
757945
def get_instance(self, payload):
        
        return SessionInstance(self._version, payload, service_sid=self._solution['service_sid'], )
386905
public static JKTimeObject getCurrntTime() {
		JKTimeObject fsTimeObject = new JKTimeObject();
		Calendar instance = Calendar.getInstance();
		fsTimeObject.setYear(instance.get(Calendar.YEAR));
		fsTimeObject.setMonth(instance.get(Calendar.MONTH));
		fsTimeObject.setDay(instance.get(Calendar.DAY_OF_MONTH));
		fsTimeObject.setHour(instance.get(Calendar.HOUR_OF_DAY));
		fsTimeObject.setMunite(instance.get(Calendar.MINUTE));
		return fsTimeObject;
	}
951582
def from_jd(jd, method=None):
    ''''''
    method = method or 'equinox'

    if method == 'equinox':
        return _from_jd_equinox(jd)

    else:
        return _from_jd_schematic(jd, method)
479109
function (jd) {
			var mcjdn = jd - 2400000 + 0.5; // Modified Chronological Julian Day Number (MCJDN)
			// the MCJDN's of the start of the lunations in the Umm al-Qura calendar 
			// are stored in the 'ummalqura_dat' array
			var index = 0;
			for (var i = 0; i < ummalqura_dat.length; i++) {
				if (ummalqura_dat[i] > mcjdn) break;
				index++;
			}
			var lunation = index + 15292; //UmmAlQura Lunation Number
			var ii = Math.floor((lunation - 1) / 12);
			var year = ii + 1;
			var month = lunation - 12 * ii;
			var day = mcjdn - ummalqura_dat[index - 1] + 1;
			return this.newDate(year, month, day);
		}
469874
public static ComponentManager getInstance() throws SshException {
		synchronized (ComponentManager.class) {
			if (instance == null) {
				instance = new JCEComponentManager();
				instance.init();
			}
			return instance;
		}
	}
106401
static RLSSuspendTokenManager getInstance()
    {
        if (tc.isEntryEnabled()) Tr.entry(tc, "getInstance");
        if (tc.isEntryEnabled()) Tr.exit(tc, "getInstance", _instance);
    	return _instance;
    }
441985
static JClassLoader getSystemClassLoader()
  {
    if (_staticClassLoader == null)
      _staticClassLoader = JClassLoaderWrapper.create(ClassLoader.getSystemClassLoader());

    return _staticClassLoader;
  }
329558
def singleton(cls):
    
    INSTANCES = {}

    def _singleton(*args, **kwargs):
        if cls not in INSTANCES:
            INSTANCES[cls] = cls(*args, **kwargs)
        return INSTANCES[cls]

    return _singleton
962155
public GregorianCalendar getValueAsCalendar() {
		if (getValue() == null) {
			return null;
		}
		GregorianCalendar cal;
		if (getTimeZone() != null) {
			cal = new GregorianCalendar(getTimeZone());
		} else {
			cal = new GregorianCalendar();
		}
		cal.setTime(getValue());
		return cal;
	}