コード例 #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())));
        }
コード例 #2
0
ファイル: XSDate.cs プロジェクト: kaby76/AntlrTreeEditing
//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())));
        }