if (value < 30) value += 1900; else if (value <= 99) value += 2000;
if (value < 30) value += 2000; else if (value <= 99) value += 1900;
void setTextField(int fieldName, int value, boolean commit) {	int max = calendar.getActualMaximum(fieldName);	int min = calendar.getActualMinimum(fieldName);	if (fieldName == Calendar.YEAR) {		max = 9999;		min = 1000;	}	if (value > max) value = min; // wrap	if (commit) {		if (fieldName == Calendar.YEAR) {			/* Special case: convert 2-digit years into reasonable 4-digit years. */			if (value < 30) value += 1900;			else if (value <= 99) value += 2000;		}		if (value < min) value = max; // wrap	}	int start = fieldIndices[currentField].x;	int end = fieldIndices[currentField].y;	text.setSelection(start, end);	StringBuffer buffer = new StringBuffer(String.valueOf(value));	int prependCount = end - start - buffer.length();	for (int i = 0; i < prependCount; i++) {		buffer.insert(0, ' ');	}	ignoreVerify = true;	text.insert(buffer.toString()); // TODO: ampm needs special treatment	ignoreVerify = false;	selectField(currentField);	if (commit) setField(fieldName, value);}