Package client.net.sf.saxon.ce.value

Examples of client.net.sf.saxon.ce.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).asAtomic();
            case StandardNames.XS_TIME:
                return dt.convert(BuiltInAtomicType.TIME, true).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).asAtomic();
            case StandardNames.XS_TIME:
                return dt.convert(BuiltInAtomicType.TIME, true).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

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.