Package com.ibm.icu.text

Examples of com.ibm.icu.text.DateFormat.format()


        logln("\nswitchover in 1582");
        cal.set(1582, 9, 4);
        logln(fmt.format(cal));
        cal.add(Calendar.DATE, 1);
        logln(fmt.format(cal));
        cal.set(Calendar.JULIAN_DAY, 1721426);
        logln(fmt.format(cal));

        logln("\nlate switchover - proleptic Julian");
        cal.set(1582, 9, 4);
View Full Code Here


        cal.set(1582, 9, 4);
        logln(fmt.format(cal));
        cal.add(Calendar.DATE, 1);
        logln(fmt.format(cal));
        cal.set(Calendar.JULIAN_DAY, 1721426);
        logln(fmt.format(cal));

        logln("\nlate switchover - proleptic Julian");
        cal.set(1582, 9, 4);
        cal.setGregorianChange(new Date(Long.MAX_VALUE));
        logln(fmt.format(cal));
View Full Code Here

        logln(fmt.format(cal));

        logln("\nlate switchover - proleptic Julian");
        cal.set(1582, 9, 4);
        cal.setGregorianChange(new Date(Long.MAX_VALUE));
        logln(fmt.format(cal));
        cal.add(Calendar.DATE, 1);
        logln(fmt.format(cal));
        cal.set(Calendar.JULIAN_DAY, 1721426);
        logln(fmt.format(cal));
View Full Code Here

        logln("\nlate switchover - proleptic Julian");
        cal.set(1582, 9, 4);
        cal.setGregorianChange(new Date(Long.MAX_VALUE));
        logln(fmt.format(cal));
        cal.add(Calendar.DATE, 1);
        logln(fmt.format(cal));
        cal.set(Calendar.JULIAN_DAY, 1721426);
        logln(fmt.format(cal));

        logln("\nearly switchover - proleptic Gregorian");
        cal.set(1582, 9, 4);
View Full Code Here

        cal.setGregorianChange(new Date(Long.MAX_VALUE));
        logln(fmt.format(cal));
        cal.add(Calendar.DATE, 1);
        logln(fmt.format(cal));
        cal.set(Calendar.JULIAN_DAY, 1721426);
        logln(fmt.format(cal));

        logln("\nearly switchover - proleptic Gregorian");
        cal.set(1582, 9, 4);
        cal.setGregorianChange(new Date(Long.MIN_VALUE));
        logln(fmt.format(cal));
View Full Code Here

        logln(fmt.format(cal));

        logln("\nearly switchover - proleptic Gregorian");
        cal.set(1582, 9, 4);
        cal.setGregorianChange(new Date(Long.MIN_VALUE));
        logln(fmt.format(cal));
        cal.add(Calendar.DATE, 1);
        logln(fmt.format(cal));
        cal.set(Calendar.JULIAN_DAY, 1721426);
        logln(fmt.format(cal));
    }
View Full Code Here

        logln("\nearly switchover - proleptic Gregorian");
        cal.set(1582, 9, 4);
        cal.setGregorianChange(new Date(Long.MIN_VALUE));
        logln(fmt.format(cal));
        cal.add(Calendar.DATE, 1);
        logln(fmt.format(cal));
        cal.set(Calendar.JULIAN_DAY, 1721426);
        logln(fmt.format(cal));
    }
}
View Full Code Here

        cal.setGregorianChange(new Date(Long.MIN_VALUE));
        logln(fmt.format(cal));
        cal.add(Calendar.DATE, 1);
        logln(fmt.format(cal));
        cal.set(Calendar.JULIAN_DAY, 1721426);
        logln(fmt.format(cal));
    }
}

//eof
View Full Code Here

                for (int j = 0; j < formatLocales.length; ++j) {
                    String locName = formatLocales[j];
                    Locale formatLocale = LocaleUtility.getLocaleFromName(locName);
                    DateFormat format = DateFormat.getDateTimeInstance(cal, DateFormat.FULL, DateFormat.FULL, formatLocale);
                    logln(calLocName + "/" + locName + " --> " + format.format(time));
                }
            }
        }
    }
   
View Full Code Here

     */
    public void testGetDateTimeFormatIntIntLocale() {
        Calendar cal = Calendar.getInstance();
        cal.set(1990, 8, 16, 20, 3);
        DateFormat df = cal.getDateTimeFormat(DateFormat.LONG, DateFormat.SHORT, Locale.US);
        assertEquals("September 16, 1990 8:03 PM", df.format(cal));
    }

    /*
     * Test method for 'com.ibm.icu.util.Calendar.getDateTimeFormat(int, int, ULocale)'
     */
 
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.