Examples of withLocale()


Examples of com.facebook.presto.jdbc.internal.jackson.databind.util.StdDateFormat.withLocale()

                        // one shortcut: with our custom format, can simplify handling a bit
                        if (df.getClass() == StdDateFormat.class) {
                            final Locale loc = format.hasLocale() ? format.getLocale() : ctxt.getLocale();
                            StdDateFormat std = (StdDateFormat) df;
                            std = std.withTimeZone(tz);
                            std = std.withLocale(loc);
                            df = std;
                        } else {
                            // otherwise need to clone, re-set timezone:
                            df = (DateFormat) df.clone();
                            df.setTimeZone(tz);
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.joda.time.format.DateTimeFormatter.withLocale()

            formatter = DateTimeFormat.forStyle(format);
        } else {
            formatter = DateTimeFormat.forPattern(format);
        }
        if (_locale != null) {
            formatter = formatter.withLocale(_locale);
        }
        formatter = formatter.withZone(_formatter.getZone());
        return new JacksonJodaFormat(this, formatter);
    }
   
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.joda.time.format.DateTimeFormatter.withLocale()

        DateTimeFormatter formatter = _formatter;
       
        if (!_explicitLocale) {
            Locale loc = provider.getLocale();
            if (loc != null && !loc.equals(_locale)) {
                formatter = formatter.withLocale(loc);
            }
        }
        if (!_explicitTimezone) {
            TimeZone tz = provider.getTimeZone();
            if (tz != null && !tz.equals(_jdkTimezone)) {
View Full Code Here

Examples of com.xebialabs.overthere.cifs.winrm.soap.HeaderBuilder.withLocale()

            throws URISyntaxException {
        HeaderBuilder header = envelope.header();
        header.to(targetURL.toURI()).replyTo(new URI("http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"));
        header.maxEnvelopeSize(winRmEnvelopSize);
        header.withId(getUUID());
        header.withLocale(winRmLocale);
        header.withTimeout(winRmTimeout);
        header.withAction(action.getUri());
        if (shellId != null) {
            header.withShellId(shellId);
        }
View Full Code Here

Examples of org.joda.time.format.DateTimeFormatter.withLocale()

            if (model.getUnit() == DateTime.class) {
                DateTime d = new DateTime(new Date((long) v));
                if (d != null) {

                    DateTimeFormatter fmt = DateTimeFormat.forPattern("dd/MM/yyyy HH:mm:ss");
                    str = fmt.withLocale(LOCALE).print(d);
                    strw = (int) (settings.tip.fontMetrics.getStringBounds(str, null)).getWidth() + 4;
                }
            } else {
                str = new Double(v).toString();
                strw = (int) (settings.tip.fontMetrics.getStringBounds(str, null)).getWidth() + 4;
View Full Code Here

Examples of org.joda.time.format.DateTimeFormatter.withLocale()

            formatter = DateTimeFormat.forStyle(format);
        } else {
            formatter = DateTimeFormat.forPattern(format);
        }
        if (_locale != null) {
            formatter = formatter.withLocale(_locale);
        }
        formatter = formatter.withZone(_formatter.getZone());
        return new JacksonJodaFormat(this, formatter);
    }
   
View Full Code Here

Examples of org.joda.time.format.DateTimeFormatter.withLocale()

        DateTimeFormatter formatter = _formatter;
       
        if (!_explicitLocale) {
            Locale loc = provider.getLocale();
            if (loc != null && !loc.equals(_locale)) {
                formatter = formatter.withLocale(loc);
            }
        }
        if (!_explicitTimezone) {
            TimeZone tz = provider.getTimeZone();
            if (tz != null && !tz.equals(_jdkTimezone)) {
View Full Code Here

Examples of org.joda.time.format.DateTimeFormatter.withLocale()

        if (!(val instanceof DateTime)) return null;
        DateTimeFormatter fmt;
        if (null != pattern) fmt = DateTimeFormat.forPattern(pattern);
        else fmt = DateTimeFormat.fullDateTime();

        fmt = fmt.withLocale(locale);
        if (null != timezone) {
            DateTimeZone dtz = DateTimeZone.forID(timezone);
            fmt = fmt.withZone(dtz);
        }
        return fmt.print((DateTime)val);
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.