本文整理匯總了Java中java.time.temporal.ChronoField.EPOCH_DAY屬性的典型用法代碼示例。如果您正苦於以下問題:Java ChronoField.EPOCH_DAY屬性的具體用法?Java ChronoField.EPOCH_DAY怎麽用?Java ChronoField.EPOCH_DAY使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類java.time.temporal.ChronoField
的用法示例。
在下文中一共展示了ChronoField.EPOCH_DAY屬性的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: data_samples
@DataProvider(name="samples")
Object[][] data_samples() {
return new Object[][] {
{ChronoField.EPOCH_DAY, JAN01_1970, 0L},
{JulianFields.JULIAN_DAY, JAN01_1970, 2400001L + 40587L},
{JulianFields.MODIFIED_JULIAN_DAY, JAN01_1970, 40587L},
{JulianFields.RATA_DIE, JAN01_1970, 710347L + (40587L - 31771L)},
{ChronoField.EPOCH_DAY, DEC31_1969, -1L},
{JulianFields.JULIAN_DAY, DEC31_1969, 2400001L + 40586L},
{JulianFields.MODIFIED_JULIAN_DAY, DEC31_1969, 40586L},
{JulianFields.RATA_DIE, DEC31_1969, 710347L + (40586L - 31771L)},
{ChronoField.EPOCH_DAY, NOV12_1945, (-24 * 365 - 6) - 31 - 30 + 11},
{JulianFields.JULIAN_DAY, NOV12_1945, 2431772L},
{JulianFields.MODIFIED_JULIAN_DAY, NOV12_1945, 31771L},
{JulianFields.RATA_DIE, NOV12_1945, 710347L},
{ChronoField.EPOCH_DAY, JAN01_0001, (-24 * 365 - 6) - 31 - 30 + 11 - 710346L},
{JulianFields.JULIAN_DAY, JAN01_0001, 2431772L - 710346L},
{JulianFields.MODIFIED_JULIAN_DAY, JAN01_0001, 31771L - 710346L},
{JulianFields.RATA_DIE, JAN01_0001, 1},
};
}