Exemplo n.º 1
0
        private ResultSequence minusXSTimeDuration(Item at)
        {
            XSTime   val        = (XSTime)at;
            Duration dtduration = null;
            Calendar thisCal    = normalizeCalendar(calendar(), tz());
            Calendar thatCal    = normalizeCalendar(val.calendar(), val.tz());
            long     duration   = thisCal.getTimeInMillis() - thatCal.getTimeInMillis();

            dtduration = _datatypeFactory.newDuration(duration);
            return(ResultSequenceFactory.create_new(XSDayTimeDuration.parseDTDuration(dtduration.ToString())));
        }
Exemplo n.º 2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: private org.eclipse.wst.xml.xpath2.api.ResultSequence minusXSDate(org.eclipse.wst.xml.xpath2.api.ResultSequence arg) throws org.eclipse.wst.xml.xpath2.processor.DynamicError
        private ResultSequence minusXSDate(ResultSequence arg)
        {
            XSDate   val        = (XSDate)NumericType.get_single_type(arg, typeof(XSDate));
            Duration dtduration = null;
            Calendar thisCal    = normalizeCalendar(calendar(), tz());
            Calendar thatCal    = normalizeCalendar(val.calendar(), val.tz());
            long     duration   = thisCal.getTimeInMillis()
                                  - thatCal.getTimeInMillis();

            dtduration = _datatypeFactory.newDuration(duration);
            return(ResultSequenceFactory.create_new(XSDayTimeDuration.parseDTDuration(dtduration.ToString())));
        }