return maxDateOf(arguments, context);
}
private Object maxDateFor(List arguments, ExpressionContext context)
{
DateData result = null;
Object val;
String name = asString(getArg(arguments, 0));
if (name == null) return null;
Iterator i = collapseLists(arguments, 1).iterator();
String path, dataName;
while (i.hasNext()) {
path = asStringVal(i.next());
if (path == null) continue;
dataName = DataRepository.createDataName(path, name);
val = context.get(dataName);
if (val == null)
return null;
if (val instanceof DateData &&
(result == null || result.lessThan((DateData) val)))
result = (DateData) val;
}
return result;
}