Examples of DayTimeDurationValue


Examples of client.net.sf.saxon.ce.value.DayTimeDurationValue

            return null;
        }
        CalendarValue in = (CalendarValue)av1;

        int nargs = argument.length;
        DayTimeDurationValue tz;
        if (nargs==1) {
            return in.adjustTimezone(context.getImplicitTimezone());
        } else {
            AtomicValue av2 = (AtomicValue)argument[1].evaluateItem(context);
            if (av2==null) {
                return in.removeTimezone();
            }
            tz = (DayTimeDurationValue)av2;
            long microseconds = tz.getLengthInMicroseconds();
            if (microseconds%60000000 != 0) {
                dynamicError("Timezone is not an integral number of minutes", "FODT0003", context);
            }
            int tzminutes = (int)(microseconds / 60000000);
            if (Math.abs(tzminutes) > 14*60) {
View Full Code Here

Examples of net.sf.saxon.value.DayTimeDurationValue

            return null;
        }
        CalendarValue in = (CalendarValue)av1;

        int nargs = argument.length;
        DayTimeDurationValue tz;
        if (nargs==1) {
            return in.adjustTimezone(context.getImplicitTimezone());
        } else {
            AtomicValue av2 = (AtomicValue)argument[1].evaluateItem(context);
            if (av2==null) {
                return in.removeTimezone();
            }
            tz = (DayTimeDurationValue)av2;
            long microseconds = tz.getLengthInMicroseconds();
            if (microseconds%60000000 != 0) {
                XPathException err = new XPathException("Timezone is not an integral number of minutes");
                err.setErrorCode("FODT0003");
                err.setLocator(this);
                err.setXPathContext(context);
View Full Code Here

Examples of org.exist.xquery.value.DayTimeDurationValue

            final AbstractDateTimeValue time = (AbstractDateTimeValue) args[0].itemAt(0);
            if (getSignature().getArgumentCount() == 2) {
                if (args[1].isEmpty()) {
                    result = time.withoutTimezone();
                } else {
                    final DayTimeDurationValue offset = (DayTimeDurationValue) args[1].itemAt(0);
                    result = time.adjustedToTimezone(offset);
                }
            } else {
                result = time.adjustedToTimezone(null);
            }
View Full Code Here

Examples of org.exist.xquery.value.DayTimeDurationValue

            if (contextSequence != null)
                {context.getProfiler().message(this, Profiler.START_SEQUENCES, "CONTEXT SEQUENCE", contextSequence);}
            if (contextItem != null)
                {context.getProfiler().message(this, Profiler.START_SEQUENCES, "CONTEXT ITEM", contextItem.toSequence());}
        }
        final Sequence result = new DayTimeDurationValue(context.getImplicitTimeZone().getRawOffset());
       
        if (context.getProfiler().isEnabled())
            {context.getProfiler().end(this, "", result);}
       
        return result;        
View Full Code Here

Examples of org.exist.xquery.value.DayTimeDurationValue

        final Calendar startupTime = context.getBroker().getBrokerPool().getStartupTime();

        final XMLGregorianCalendar xmlNow = context.getCalendar();
        final Calendar now = xmlNow.toGregorianCalendar();
        final long duration = now.getTimeInMillis() - startupTime.getTimeInMillis();
        return new DayTimeDurationValue(duration);

    }
View Full Code Here

Examples of org.pdf4j.saxon.value.DayTimeDurationValue

            return null;
        }
        CalendarValue in = (CalendarValue)av1;

        int nargs = argument.length;
        DayTimeDurationValue tz;
        if (nargs==1) {
            return in.adjustTimezone(context.getImplicitTimezone());
        } else {
            AtomicValue av2 = (AtomicValue)argument[1].evaluateItem(context);
            if (av2==null) {
                return in.removeTimezone();
            }
            tz = (DayTimeDurationValue)av2;
            long microseconds = tz.getLengthInMicroseconds();
            if (microseconds%60000000 != 0) {
                XPathException err = new XPathException("Timezone is not an integral number of minutes");
                err.setErrorCode("FODT0003");
                err.setLocator(this);
                err.setXPathContext(context);
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.