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)); }
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)); }