Package com.ibm.icu.text

Examples of com.ibm.icu.text.DateFormatSymbols


    /*
     * Test method for 'com.ibm.icu.text.DateFormatSymbols.getLocalPatternChars()'
     */
    public void testGetLocalPatternChars() {
        DateFormatSymbols dfs = new DateFormatSymbols(Locale.US);
        assertNotNull(dfs.getLocalPatternChars());
    }
View Full Code Here


    /*
     * Test method for 'com.ibm.icu.text.DateFormatSymbols.setLocalPatternChars(String)'
     */
    public void testSetLocalPatternChars() {
        DateFormatSymbols dfs = new DateFormatSymbols(Locale.US);
        String pat = dfs.getLocalPatternChars();
        StringBuffer buf = new StringBuffer(pat);
        buf.setCharAt(0, (char)(pat.charAt(0) + 1));
        String pat2 = buf.toString();
        dfs.setLocalPatternChars(pat2);
        String pat3 = dfs.getLocalPatternChars();
        assertNotEqual(pat, pat2);
        assertEquals(pat2, pat3);
    }
View Full Code Here

    /*
     * Test method for 'com.ibm.icu.text.DateFormatSymbols.toString()'
     */
    public void testToString() {
        DateFormatSymbols dfs = new DateFormatSymbols(Locale.US);
        assertNotNull(dfs.toString());
    }
View Full Code Here

    /*
     * Test method for 'com.ibm.icu.text.SimpleDateFormat.SimpleDateFormat(String, DateFormatSymbols)'
     */
    public void testSimpleDateFormatStringDateFormatSymbols() {
        Locale l = Locale.US;
        DateFormatSymbols dfs = new DateFormatSymbols(l);
        java.text.DateFormatSymbols jdfs = new java.text.DateFormatSymbols(l);
        SimpleDateFormat sdf = new SimpleDateFormat(mdy, dfs);
        java.text.SimpleDateFormat jsdf = new java.text.SimpleDateFormat(mdy, jdfs);
        assertEquals(jsdf.format(date), sdf.format(date));
    }
View Full Code Here

    /*
     * Test method for 'com.ibm.icu.text.SimpleDateFormat.getDateFormatSymbols()'
     */
    public void testGetDateFormatSymbols() {
        DateFormatSymbols dfs = new DateFormatSymbols(Locale.US);
        SimpleDateFormat sdf = new SimpleDateFormat(mdy, dfs);
        assertEquals(dfs, sdf.getDateFormatSymbols());
    }
View Full Code Here

    /*
     * Test method for 'com.ibm.icu.text.SimpleDateFormat.setDateFormatSymbols(DateFormatSymbols)'
     */
    public void testSetDateFormatSymbols() {
        DateFormatSymbols dfs = new DateFormatSymbols(Locale.JAPAN);
        SimpleDateFormat sdf = new SimpleDateFormat(hmzmdy);
        sdf.setDateFormatSymbols(dfs);
        // assumes Japanese symbols do not have gregorian month names
        assertEquals(-1, sdf.format(date).indexOf("Jan"));
    }
View Full Code Here

  @SuppressWarnings("deprecation")
  protected DateFormat handleGetDateFormat(final String pattern, final String override, final ULocale locale) {
    FormatConfiguration fmtConfig = new FormatConfiguration();
    fmtConfig.pattern = pattern;
    fmtConfig.override = override;
    fmtConfig.formatData = new DateFormatSymbols(this, locale);
    fmtConfig.loc = locale;
    fmtConfig.cal = this;

    return SimpleDateFormat.getInstance(fmtConfig);
  }
View Full Code Here

     */
    protected DateFormat handleGetDateFormat(String pattern, String override, ULocale locale) {
        FormatConfiguration fmtConfig = new FormatConfiguration();
        fmtConfig.pattern = pattern;
        fmtConfig.override = override;
        fmtConfig.formatData = new DateFormatSymbols(this, locale);
        fmtConfig.loc = locale;
        fmtConfig.cal = this;

        return SimpleDateFormat.getInstance(fmtConfig);
    }
View Full Code Here

     * @provisional This API might change or be removed in a future release.
     */
    protected DateFormat handleGetDateFormat(String pattern, ULocale locale) {
        FormatConfiguration fmtConfig = new FormatConfiguration();
        fmtConfig.pattern = pattern;
        fmtConfig.formatData = new DateFormatSymbols(this, locale);
        fmtConfig.loc = locale;
        fmtConfig.cal = this;

        return SimpleDateFormat.getInstance(fmtConfig);
    }
View Full Code Here

     * @provisional This API might change or be removed in a future release.
     */
    protected DateFormat handleGetDateFormat(String pattern, ULocale locale) {
        FormatConfiguration fmtConfig = new FormatConfiguration();
        fmtConfig.pattern = pattern;
        fmtConfig.formatData = new DateFormatSymbols(this, locale);
        fmtConfig.loc = locale;
        fmtConfig.cal = this;

        return SimpleDateFormat.getInstance(fmtConfig);
    }
View Full Code Here

TOP

Related Classes of com.ibm.icu.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.