Esempio n. 1
0
        private XSDuration castDuration(AnyAtomicType aat)
        {
            if (aat is XSDuration)
            {
                XSDuration duration = (XSDuration)aat;
                return(new XSDuration(duration.year(), duration.month(), duration.days(), duration.hours(), duration.minutes(), duration.seconds(), duration.negative()));
            }

            return(parseDTDuration(aat.StringValue));
        }
Esempio n. 2
0
        private XSDuration castYearMonthDuration(AnyAtomicType aat)
        {
            if (aat is XSDuration)
            {
                XSDuration duration = (XSDuration)aat;
                return(new XSYearMonthDuration(duration.year(), duration.month(), duration.negative()));
            }

            return(parseYMDuration(aat.StringValue));
        }