public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval serialNumVE, ValueEval returnTypeVE) {double serialNum;try {serialNum = NumericFunction.singleOperandEvaluate(serialNumVE, srcRowIndex, srcColumnIndex);} catch (EvaluationException e) {return ErrorEval.VALUE_INVALID;}Calendar serialNumCalendar = LocaleUtil.getLocaleCalendar();serialNumCalendar.setTime(DateUtil.getJavaDate(serialNum, false));int returnType;try {ValueEval ve = OperandResolver.getSingleValue(returnTypeVE, srcRowIndex, srcColumnIndex);returnType = OperandResolver.coerceValueToInt(ve);} catch (EvaluationException e) {return ErrorEval.NUM_ERROR;}if (returnType != 1 && returnType != 2) {return ErrorEval.NUM_ERROR;}return new NumberEval(this.getWeekNo(serialNumCalendar, returnType));}
public override ValueEval Evaluate(int srcRowIndex, int srcColumnIndex, ValueEval serialNumVE, ValueEval returnTypeVE){double serialNum = 0.0;try{serialNum = NumericFunction.SingleOperandEvaluate(serialNumVE, srcRowIndex, srcColumnIndex);}catch (EvaluationException){return ErrorEval.VALUE_INVALID;}DateTime serialNumCalendar = DateUtil.GetJavaDate(serialNum, false);int returnType = 0;try{ValueEval ve = OperandResolver.GetSingleValue(returnTypeVE, srcRowIndex, srcColumnIndex);returnType = OperandResolver.CoerceValueToInt(ve);}catch (EvaluationException){return ErrorEval.NUM_ERROR;}if (returnType != 1 && returnType != 2){return ErrorEval.NUM_ERROR;}return new NumberEval(this.getWeekNo(serialNumCalendar, returnType));}