Examples of toLocalizedPattern()


Examples of java.text.SimpleDateFormat.toLocalizedPattern()

            _script.execute(cycle, body, symbols);

            writer.beginEmpty("input");
            writer.attribute("type", "text");
            writer.attribute("name", name);
            writer.attribute("title", formatter.toLocalizedPattern());

            if (value != null)
                writer.attribute("value", formatter.format(value));

            if (disabled)
View Full Code Here

Examples of java.text.SimpleDateFormat.toLocalizedPattern()

        // date formats need to be run through the Localized
        // SimpleDateFormat and pulled back out as localized patterns.
        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd", locale)
        sdf.setTimeZone( (TimeZone)ctx.get("timezone") );   
        ctx.put("plainFormat",     sdf.toLocalizedPattern());
       
        sdf.applyPattern("EEEE MMMM dd, yyyy");
        ctx.put("toStringFormat",  sdf.toLocalizedPattern());
       
        sdf.applyPattern("MMM dd yyyy, hh:mm:ss a z");
View Full Code Here

Examples of java.text.SimpleDateFormat.toLocalizedPattern()

        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd", locale)
        sdf.setTimeZone( (TimeZone)ctx.get("timezone") );   
        ctx.put("plainFormat",     sdf.toLocalizedPattern());
       
        sdf.applyPattern("EEEE MMMM dd, yyyy");
        ctx.put("toStringFormat",  sdf.toLocalizedPattern());
       
        sdf.applyPattern("MMM dd yyyy, hh:mm:ss a z");
        ctx.put("timestampFormat", sdf.toLocalizedPattern());
       
        ctx.put("dateFormatter", sdf );
View Full Code Here

Examples of java.text.SimpleDateFormat.toLocalizedPattern()

       
        sdf.applyPattern("EEEE MMMM dd, yyyy");
        ctx.put("toStringFormat",  sdf.toLocalizedPattern());
       
        sdf.applyPattern("MMM dd yyyy, hh:mm:ss a z");
        ctx.put("timestampFormat", sdf.toLocalizedPattern());
       
        ctx.put("dateFormatter", sdf );
    }
    /**
     * Create a PageHelper.  Note that will have no values
View Full Code Here

Examples of java.text.SimpleDateFormat.toLocalizedPattern()

        {
            return formatter.parse( date );
        }
        catch ( ParseException e )
        {
            throw new MojoExecutionException( "Please use this date pattern: " + formatter.toLocalizedPattern(), e );
        }
    }

    public ScmRepository getScmRepository()
        throws ScmException
View Full Code Here

Examples of java.text.SimpleDateFormat.toLocalizedPattern()

                                LOG.error("Unparsable date: {}", prop.getValue(), e);
                            }
                        }

                        field = new DateTimeFieldPanel("value", label.getDefaultModelObjectAsString(),
                                new Model(parsedDate), df.toLocalizedPattern());
                        break;

                    case Enum:
                        MapChoiceRenderer<String, String> enumCR =
                                new MapChoiceRenderer<String, String>(prop.getEnumValues());
View Full Code Here

Examples of java.text.SimpleDateFormat.toLocalizedPattern()

                                LOG.error("Unparsable date: {}", prop.getValue(), e);
                            }
                        }

                        field = new DateTimeFieldPanel("value", label.getDefaultModelObjectAsString(),
                                new Model(parsedDate), df.toLocalizedPattern());
                        break;

                    case Enum:
                        MapChoiceRenderer<String, String> enumCR =
                                new MapChoiceRenderer<String, String>(prop.getEnumValues());
View Full Code Here

Examples of java.text.SimpleDateFormat.toLocalizedPattern()

      ((time == null) ? "" : (" "+time.toString()));
  DateFormat df = DateFormat.getDateInstance(
      DateFormat.SHORT, GuiUtil.getLocale());
  if ((time != null) && (df instanceof SimpleDateFormat)) {
      SimpleDateFormat fmt = (SimpleDateFormat)df;
      String formatPrefix = fmt.toLocalizedPattern();
      try {
    // Try w/ HH:mm:ss.SSS
    date = parseDateString(
        fmt, formatPrefix+TIME_FORMAT, dateTime);
      } catch (ParseException ex) {
View Full Code Here

Examples of java.text.SimpleDateFormat.toLocalizedPattern()

    public static String formatDateForDisplay(Locale locale, Date date) {
  DateFormat dateFormat = DateFormat.getDateInstance(
      DateFormat.MEDIUM, locale);
  if (dateFormat instanceof SimpleDateFormat) {
      SimpleDateFormat fmt = (SimpleDateFormat)dateFormat;
      fmt.applyLocalizedPattern(fmt.toLocalizedPattern()+TIME_FORMAT);
      return fmt.format(date);
  } else {
      dateFormat = DateFormat.getDateTimeInstance(
    DateFormat.MEDIUM, DateFormat.LONG, locale);
      return dateFormat.format(date);
View Full Code Here

Examples of java.text.SimpleDateFormat.toLocalizedPattern()

                + ((time == null) ? "" : (" " + time.toString()));
        DateFormat df = DateFormat.getDateInstance(
                DateFormat.SHORT, GuiUtil.getLocale());
        if ((time != null) && (df instanceof SimpleDateFormat)) {
            SimpleDateFormat fmt = (SimpleDateFormat) df;
            String formatPrefix = fmt.toLocalizedPattern();
            try {
                // Try w/ HH:mm:ss.SSS
                date = parseDateString(
                        fmt, formatPrefix + TIME_FORMAT, dateTime);
            } catch (ParseException ex) {
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.