Package net.sf.saxon.value

Examples of net.sf.saxon.value.DateTimeValue.convert()


        final int targetType = getItemType(th).getPrimitiveType();
        switch (targetType) {
            case StandardNames.XS_DATE_TIME:
                return dt;
            case StandardNames.XS_DATE:
                return dt.convert(BuiltInAtomicType.DATE, true, context).asAtomic();
            case StandardNames.XS_TIME:
                return dt.convert(BuiltInAtomicType.TIME, true, context).asAtomic();
            case StandardNames.XS_DAY_TIME_DURATION:
            case StandardNames.XS_DURATION:
                return dt.getComponent(Component.TIMEZONE);
View Full Code Here


            case StandardNames.XS_DATE_TIME:
                return dt;
            case StandardNames.XS_DATE:
                return dt.convert(BuiltInAtomicType.DATE, true, context).asAtomic();
            case StandardNames.XS_TIME:
                return dt.convert(BuiltInAtomicType.TIME, true, context).asAtomic();
            case StandardNames.XS_DAY_TIME_DURATION:
            case StandardNames.XS_DURATION:
                return dt.getComponent(Component.TIMEZONE);
            default:
                throw new IllegalArgumentException("Wrong target type for current date/time");
View Full Code Here

        int targetType = getItemType().getPrimitiveType();
        switch (targetType) {
            case Type.DATE_TIME:
                return dt;
            case Type.DATE:
                return (DateValue)dt.convert(Type.DATE, context);
            case Type.TIME:
                return (TimeValue)dt.convert(Type.TIME, context);
            case Type.DAY_TIME_DURATION:
            case Type.DURATION:
                return dt.getComponent(Component.TIMEZONE);
View Full Code Here

            case Type.DATE_TIME:
                return dt;
            case Type.DATE:
                return (DateValue)dt.convert(Type.DATE, context);
            case Type.TIME:
                return (TimeValue)dt.convert(Type.TIME, context);
            case Type.DAY_TIME_DURATION:
            case Type.DURATION:
                return dt.getComponent(Component.TIMEZONE);
            default:
                throw new IllegalArgumentException("Wrong target type for current date/time");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.