Package java.text

Examples of java.text.DateFormatSymbols


     * This method is called at class initialization time to define the
     * value for constant member DEFAULT_PATTERN_CHARS. All other methods needing
     * this data should just read that constant.
     */
    private static String initDefaultChars() {
        DateFormatSymbols defaultSymbols = new DateFormatSymbols(Locale.US);
        return defaultSymbols.getLocalPatternChars();
    }
View Full Code Here


            writer.writeAttribute(HTML.READONLY_ATTR, Boolean.TRUE, null);
        }

        int selectedMonth = userData.getMonth() == null ? -1 : Integer.parseInt(userData.getMonth())-1;

        String[] months = HtmlCalendarRenderer.mapMonths(new DateFormatSymbols(currentLocale));
        encodeEmptyInputMonthSelection(uiComponent, writer, selectedMonth);
        for (int i = 0; i < months.length; i++) {
            String monthName = months[i];
            String monthNumber = Integer.toString(i+1);
View Full Code Here

        }
        if (readonly) {
            writer.writeAttribute(HTML.READONLY_ATTR, Boolean.TRUE, null);
        }

        DateFormatSymbols symbols = new DateFormatSymbols(currentLocale);

        int selectedAmpm = userData.getAmpm() == null ? -1 : Integer.parseInt(userData.getAmpm());
        encodeEmtypAmpmChoice(uiComponent, writer, selectedAmpm);
        encodeAmpmChoice(symbols, uiComponent, writer, Calendar.AM, selectedAmpm);
        encodeAmpmChoice(symbols, uiComponent, writer, Calendar.PM, selectedAmpm);
View Full Code Here

         writer.endElement(HTML.OPTION_ELEM);
    }

    protected void encodePopupCalendarButton(FacesContext facesContext, UIComponent uiComponent, ResponseWriter writer, String clientId, Locale currentLocale) throws IOException{

        DateFormatSymbols symbols = new DateFormatSymbols(currentLocale);

        HtmlCalendarRenderer.addScriptAndCSSResources(facesContext,uiComponent);

        String calendarVar = JavascriptUtils.getValidJavascriptName(
                uiComponent.getClientId(facesContext)+"CalendarVar",false);
View Full Code Here


        Calendar timeKeeper = Calendar.getInstance(currentLocale);
        timeKeeper.setTime(value!=null?value:new Date());

        DateFormatSymbols symbols = new DateFormatSymbols(currentLocale);

        String[] weekdays = mapShortWeekdays(symbols);
        String[] months = mapMonths(symbols);

        if(inputCalendar.isRenderAsPopup())
View Full Code Here

  String[] shortMonths;

  public
  DateTimeDateFormat() {
    super();
    shortMonths = new DateFormatSymbols().getShortMonths();
  }
View Full Code Here

     * has been supplied via the config, set that into all date formats that have
     * been configured. 
     * </p>
     */
    public void configure(FTPClientConfig config) {
        DateFormatSymbols dfs = null;
       
        String languageCode = config.getServerLanguageCode();
        String shortmonths = config.getShortMonthNames();
        if (shortmonths != null) {
            dfs = FTPClientConfig.getDateFormatSymbols(shortmonths);
View Full Code Here

            // do nothing, proceed to dateFormat parsing
        }

        // try with Date.toString() date format first
        try {
            DateFormatSymbols dateFormatSymbols = DateFormatSymbols.getInstance(Locale.US);
            SimpleDateFormat dateFormat = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", dateFormatSymbols);
            return dateFormat.parse(value);
        } catch (ParseException e) {
            // do noting
        }
View Full Code Here

    public static DateFormatSymbols lookupDateFormatSymbols(String languageCode)
    {
        Object lang = LANGUAGE_CODE_MAP.get(languageCode);
        if (lang != null) {
            if (lang instanceof Locale) {
                return new DateFormatSymbols((Locale) lang);
            } else if (lang instanceof String){
                return getDateFormatSymbols((String) lang);
            }
        }
        return new DateFormatSymbols(Locale.US);
    }
View Full Code Here

     * as in the supplied string
     */
    public static DateFormatSymbols getDateFormatSymbols(String shortmonths)
    {
        String[] months = splitShortMonthString(shortmonths);
        DateFormatSymbols dfs = new DateFormatSymbols(Locale.US);
        dfs.setShortMonths(months);
        return dfs;
    }
View Full Code Here

TOP

Related Classes of java.text.DateFormatSymbols

Copyright © 2018 www.massapicom. 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.