本文整理匯總了Java中java.time.LocalDate.toEpochDay方法的典型用法代碼示例。如果您正苦於以下問題:Java LocalDate.toEpochDay方法的具體用法?Java LocalDate.toEpochDay怎麽用?Java LocalDate.toEpochDay使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類java.time.LocalDate
的用法示例。
在下文中一共展示了LocalDate.toEpochDay方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setUp
import java.time.LocalDate; //導入方法依賴的package包/類
@BeforeMethod
public void setUp() {
TEST_2007_07_15 = LocalDate.of(2007, 7, 15);
LocalDate max = LocalDate.MAX;
LocalDate min = LocalDate.MIN;
MAX_VALID_EPOCHDAYS = max.toEpochDay();
MIN_VALID_EPOCHDAYS = min.toEpochDay();
MAX_DATE = max;
MIN_DATE = min;
MAX_INSTANT = max.atStartOfDay(ZoneOffset.UTC).toInstant();
MIN_INSTANT = min.atStartOfDay(ZoneOffset.UTC).toInstant();
}
示例2: encodeInternal
import java.time.LocalDate; //導入方法依賴的package包/類
@Override
ByteBuffer encodeInternal(LocalDate input) {
int unsigned = (int) input.toEpochDay() - Integer.MIN_VALUE;
return cint.encode(unsigned);
}
示例3: setTradeDate
import java.time.LocalDate; //導入方法依賴的package包/類
@Override
public void setTradeDate(LocalDate tradeDate) {
long millis = tradeDate.toEpochDay();
writeWord(millis, 8);
}
示例4: setSettlementDate
import java.time.LocalDate; //導入方法依賴的package包/類
@Override
public void setSettlementDate(LocalDate settlementDate) {
long millis = settlementDate.toEpochDay();
writeWord(millis, 37);
}
示例5: getCode
import java.time.LocalDate; //導入方法依賴的package包/類
@Override
public final long getCode(LocalDate value) {
return value == null ? Long.MIN_VALUE : value.toEpochDay();
}