DurationValue duration = (DurationValue) arg.itemAt(0);
YearMonthDurationValue duration = (YearMonthDurationValue) arg.itemAt(0);
    public Sequence eval(Sequence contextSequence, Item contextItem) throws XPathException {        if (context.getProfiler().isEnabled()) {            context.getProfiler().start(this);            context.getProfiler().message(this, Profiler.DEPENDENCIES, "DEPENDENCIES", Dependency.getDependenciesName(this.getDependencies()));            if (contextSequence != null)                context.getProfiler().message(this, Profiler.START_SEQUENCES, "CONTEXT SEQUENCE", contextSequence);            if (contextItem != null)                context.getProfiler().message(this, Profiler.START_SEQUENCES, "CONTEXT ITEM", contextItem.toSequence());        }                Sequence result;        Sequence arg = getArgument(0).eval(contextSequence, contextItem);        if (arg.isEmpty())            result = Sequence.EMPTY_SEQUENCE;        else {            DurationValue duration = (DurationValue) arg.itemAt(0);            result = new IntegerValue(duration.getPart(DurationValue.MONTH));        }                if (context.getProfiler().isEnabled())            context.getProfiler().end(this, "", result);                return result;    }