Java Code Examples for java.time.chrono.IsoEra#CE
The following examples show how to use
java.time.chrono.IsoEra#CE .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TCKIsoChronology.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
@DataProvider(name = "era_epochSecond_dataProvider") Object[][] data_era_epochSecond() { return new Object[][] { {IsoEra.CE, 2008, 3, 3, 1, 2, 2, OFFSET_P0100}, {IsoEra.CE, 2008, 3, 3, 1, 2, 2, OFFSET_M0100}, {IsoEra.CE, 2008, 2, 28, 1, 2, 2, OFFSET_P0100}, {IsoEra.CE, 2009, 3, 3, 1, 2, 2, OFFSET_P0100}, {IsoEra.CE, 2009, 3, 3, 1, 2, 2, OFFSET_M0100}, {IsoEra.CE, 2009, 2, 28, 1, 2, 2, OFFSET_P0100}, {IsoEra.CE, 1968, 3, 3, 1, 2, 2, OFFSET_P0100}, {IsoEra.CE, 1968, 3, 3, 1, 2, 2, OFFSET_M0100}, {IsoEra.CE, 1968, 2, 28, 1, 2, 2, OFFSET_P0100}, {IsoEra.CE, 1969, 3, 3 , 1, 2, 2, OFFSET_P0100}, {IsoEra.CE, 1969, 3, 3, 1, 2, 2, OFFSET_M0100}, {IsoEra.CE, 1969, 2, 28, 1, 2, 2, OFFSET_P0100}, {IsoEra.CE, 1970, 1, 1, 1, 2, 2, OFFSET_P0100}, {IsoEra.CE, 1970, 1, 1, 1, 2, 2, OFFSET_M0100}, {IsoEra.BCE, 5, 3, 3 , 1, 2, 2, OFFSET_P0100}, {IsoEra.BCE, 2, 3, 3 , 1, 2, 2, OFFSET_P0100}, }; }
Example 2
Source File: DatePicker.java From LGoodDatePicker with MIT License | 6 votes |
/** * zGetStandardTextFieldDateString, This returns a string for the supplied date (or null), in * the standard format which could be used for displaying that date in the text field. */ private String zGetStandardTextFieldDateString(LocalDate date) { if (settings == null) { return ""; } String standardDateString = ""; if (date == null) { return standardDateString; } if (date.getEra() == IsoEra.CE) { standardDateString = date.format(settings.getFormatForDatesCommonEra()); } else { standardDateString = date.format(settings.getFormatForDatesBeforeCommonEra()); } return standardDateString; }
Example 3
Source File: TCKChronology.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
@DataProvider(name = "era_epochSecond_dataProvider") Object[][] data_era_epochSecond() { return new Object[][] { {JapaneseChronology.INSTANCE, JapaneseEra.MEIJI, 1873 - YDIFF_MEIJI, 9, 7, 1, 2, 2, OFFSET_P0100}, {JapaneseChronology.INSTANCE, JapaneseEra.SHOWA, 1928 - YDIFF_SHOWA, 2, 28, 1, 2, 2, OFFSET_M0100}, {JapaneseChronology.INSTANCE, JapaneseEra.HEISEI, 1989 - YDIFF_HEISEI, 1, 8, 1, 2, 2, OFFSET_P0100}, {HijrahChronology.INSTANCE, HijrahEra.AH, 1434, 9, 7, 1, 2, 2, OFFSET_P0100}, {MinguoChronology.INSTANCE, MinguoEra.BEFORE_ROC, 1873 - YDIFF_MINGUO, 9, 7, 1, 2, 2, OFFSET_P0100}, {MinguoChronology.INSTANCE, MinguoEra.ROC, 1928 - YDIFF_MINGUO, 2, 28, 1, 2, 2, OFFSET_M0100}, {MinguoChronology.INSTANCE, MinguoEra.ROC, 1989 - YDIFF_MINGUO, 1, 8, 1, 2, 2, OFFSET_P0100}, {ThaiBuddhistChronology.INSTANCE, ThaiBuddhistEra.BE, 1873 + YDIFF_THAIBUDDHIST, 9, 7, 1, 2, 2, OFFSET_P0100}, {ThaiBuddhistChronology.INSTANCE, ThaiBuddhistEra.BE, 1928 + YDIFF_THAIBUDDHIST, 2, 28, 1, 2, 2, OFFSET_M0100}, {ThaiBuddhistChronology.INSTANCE, ThaiBuddhistEra.BE, 1989 + YDIFF_THAIBUDDHIST, 1, 8, 1, 2, 2, OFFSET_P0100}, {IsoChronology.INSTANCE, IsoEra.CE, 1873, 9, 7, 1, 2, 2, OFFSET_P0100}, {IsoChronology.INSTANCE, IsoEra.CE, 1928, 2, 28, 1, 2, 2, OFFSET_M0100}, {IsoChronology.INSTANCE, IsoEra.CE, 1989, 1, 8, 1, 2, 2, OFFSET_P0100}, }; }
Example 4
Source File: TCKIsoEra.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
@DataProvider(name = "IsoEras") Object[][] data_of_eras() { return new Object[][] { {IsoEra.BCE, "BCE", 0}, {IsoEra.CE, "CE", 1}, }; }
Example 5
Source File: TCKEraSerialization.java From hottub with GNU General Public License v2.0 | 5 votes |
@DataProvider(name = "Eras") Era[][] data_of_calendars() { return new Era[][] { {HijrahEra.AH}, {IsoEra.BCE}, {IsoEra.CE}, {MinguoEra.BEFORE_ROC}, {MinguoEra.ROC}, {ThaiBuddhistEra.BEFORE_BE}, {ThaiBuddhistEra.BE}, }; }
Example 6
Source File: TCKIsoEra.java From hottub with GNU General Public License v2.0 | 5 votes |
@DataProvider(name = "IsoEras") Object[][] data_of_eras() { return new Object[][] { {IsoEra.BCE, "BCE", 0}, {IsoEra.CE, "CE", 1}, }; }
Example 7
Source File: TCKEraSerialization.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
@DataProvider(name = "Eras") Era[][] data_of_calendars() { return new Era[][] { {HijrahEra.AH}, {IsoEra.BCE}, {IsoEra.CE}, {MinguoEra.BEFORE_ROC}, {MinguoEra.ROC}, {ThaiBuddhistEra.BEFORE_BE}, {ThaiBuddhistEra.BE}, }; }
Example 8
Source File: TCKIsoEra.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
@DataProvider(name = "IsoEras") Object[][] data_of_eras() { return new Object[][] { {IsoEra.BCE, "BCE", 0}, {IsoEra.CE, "CE", 1}, }; }
Example 9
Source File: TCKIsoEra.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@DataProvider(name = "IsoEras") Object[][] data_of_eras() { return new Object[][] { {IsoEra.BCE, "BCE", 0}, {IsoEra.CE, "CE", 1}, }; }
Example 10
Source File: TCKEraSerialization.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
@DataProvider(name = "Eras") Era[][] data_of_calendars() { return new Era[][] { {HijrahEra.AH}, {IsoEra.BCE}, {IsoEra.CE}, {MinguoEra.BEFORE_ROC}, {MinguoEra.ROC}, {ThaiBuddhistEra.BEFORE_BE}, {ThaiBuddhistEra.BE}, }; }
Example 11
Source File: TCKIsoEra.java From j2objc with Apache License 2.0 | 5 votes |
@DataProvider public static Object[][] data_of_eras() { return new Object[][] { {IsoEra.BCE, "BCE", 0}, {IsoEra.CE, "CE", 1}, }; }
Example 12
Source File: TCKIsoEra.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@DataProvider(name = "IsoEras") Object[][] data_of_eras() { return new Object[][] { {IsoEra.BCE, "BCE", 0}, {IsoEra.CE, "CE", 1}, }; }
Example 13
Source File: TCKEraSerialization.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
@DataProvider(name = "Eras") Era[][] data_of_calendars() { return new Era[][] { {HijrahEra.AH}, {IsoEra.BCE}, {IsoEra.CE}, {MinguoEra.BEFORE_ROC}, {MinguoEra.ROC}, {ThaiBuddhistEra.BEFORE_BE}, {ThaiBuddhistEra.BE}, }; }
Example 14
Source File: TCKIsoEra.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
@DataProvider(name = "IsoEras") Object[][] data_of_eras() { return new Object[][] { {IsoEra.BCE, "BCE", 0}, {IsoEra.CE, "CE", 1}, }; }
Example 15
Source File: TCKEraSerialization.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
@DataProvider(name = "Eras") Era[][] data_of_calendars() { return new Era[][] { {HijrahEra.AH}, {IsoEra.BCE}, {IsoEra.CE}, {MinguoEra.BEFORE_ROC}, {MinguoEra.ROC}, {ThaiBuddhistEra.BEFORE_BE}, {ThaiBuddhistEra.BE}, }; }
Example 16
Source File: TCKIsoEra.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
@DataProvider(name = "IsoEras") Object[][] data_of_eras() { return new Object[][] { {IsoEra.BCE, "BCE", 0}, {IsoEra.CE, "CE", 1}, }; }
Example 17
Source File: TCKEraSerialization.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
@DataProvider(name = "Eras") Era[][] data_of_calendars() { return new Era[][] { {HijrahEra.AH}, {IsoEra.BCE}, {IsoEra.CE}, {MinguoEra.BEFORE_ROC}, {MinguoEra.ROC}, {ThaiBuddhistEra.BEFORE_BE}, {ThaiBuddhistEra.BE}, }; }
Example 18
Source File: TCKEraSerialization.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
@DataProvider(name = "Eras") Era[][] data_of_calendars() { return new Era[][] { {HijrahEra.AH}, {IsoEra.BCE}, {IsoEra.CE}, {MinguoEra.BEFORE_ROC}, {MinguoEra.ROC}, {ThaiBuddhistEra.BEFORE_BE}, {ThaiBuddhistEra.BE}, }; }
Example 19
Source File: TCKEraSerialization.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
@DataProvider(name = "Eras") Era[][] data_of_calendars() { return new Era[][] { {HijrahEra.AH}, {IsoEra.BCE}, {IsoEra.CE}, {MinguoEra.BEFORE_ROC}, {MinguoEra.ROC}, {ThaiBuddhistEra.BEFORE_BE}, {ThaiBuddhistEra.BE}, }; }
Example 20
Source File: LocalDate.java From openjdk-jdk9 with GNU General Public License v2.0 | 2 votes |
/** * Gets the era applicable at this date. * <p> * The official ISO-8601 standard does not define eras, however {@code IsoChronology} does. * It defines two eras, 'CE' from year one onwards and 'BCE' from year zero backwards. * Since dates before the Julian-Gregorian cutover are not in line with history, * the cutover between 'BCE' and 'CE' is also not aligned with the commonly used * eras, often referred to using 'BC' and 'AD'. * <p> * Users of this class should typically ignore this method as it exists primarily * to fulfill the {@link ChronoLocalDate} contract where it is necessary to support * the Japanese calendar system. * * @return the IsoEra applicable at this date, not null */ @Override // override for Javadoc public IsoEra getEra() { return (getYear() >= 1 ? IsoEra.CE : IsoEra.BCE); }