< prev index next >

test/java/util/Calendar/NarrowNamesTest.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 19,28 **** --- 19,29 ---- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ + import java.time.LocalDateTime; import java.util.*; import static java.util.GregorianCalendar.*; public class NarrowNamesTest { private static final Locale US = Locale.US;
*** 43,53 **** YEAR, 2012, MONTH, DECEMBER, DAY_OF_MONTH, 23); test(US, AM_PM, "a", HOUR_OF_DAY, 10); test(US, AM_PM, "p", HOUR_OF_DAY, 23); ! test(JAJPJP, DAY_OF_WEEK, "\u65e5", YEAR, 24, MONTH, DECEMBER, DAY_OF_MONTH, 23); test(THTH, MONTH, NARROW_STANDALONE, "\u0e18.\u0e04.", YEAR, 2555, MONTH, DECEMBER, DAY_OF_MONTH, 5); test(THTH, DAY_OF_WEEK, "\u0e1e", YEAR, 2555, MONTH, DECEMBER, DAY_OF_MONTH, 5); --- 44,56 ---- YEAR, 2012, MONTH, DECEMBER, DAY_OF_MONTH, 23); test(US, AM_PM, "a", HOUR_OF_DAY, 10); test(US, AM_PM, "p", HOUR_OF_DAY, 23); ! test(JAJPJP, DAY_OF_WEEK, ! LocalDateTime.now().isBefore(LocalDateTime.of(2019, 5, 1, 0, 0)) ? ! "\u65e5" : "\u706b", // "Sun" for HEISEI, "Tue" for NEWERA YEAR, 24, MONTH, DECEMBER, DAY_OF_MONTH, 23); test(THTH, MONTH, NARROW_STANDALONE, "\u0e18.\u0e04.", YEAR, 2555, MONTH, DECEMBER, DAY_OF_MONTH, 5); test(THTH, DAY_OF_WEEK, "\u0e1e", YEAR, 2555, MONTH, DECEMBER, DAY_OF_MONTH, 5);
< prev index next >