序號 |
方法和描述 |
1 |
Temporal adjustInto(Temporal temporal)
調整指定的 temporal 物件,使其與該物件的日期相同。 |
2 |
LocalDateTime atStartOfDay()
將此日期與午夜時間組合,以建立此日期開始時的 LocalDateTime。 |
3 |
ZonedDateTime atStartOfDay(ZoneId zone)
根據時區規則,從此日期的有效最早時間返回一個帶時區的日期時間。 |
4 |
LocalDateTime atTime(int hour, int minute)
將此日期與時間組合以建立 LocalDateTime。 |
5 |
LocalDateTime atTime(int hour, int minute, int second)
將此日期與時間組合以建立 LocalDateTime。 |
6 |
LocalDateTime atTime(int hour, int minute, int second, int nanoOfSecond)
將此日期與時間組合以建立 LocalDateTime。 |
7 |
LocalDateTime atTime(LocalTime time)
將此日期與時間組合以建立 LocalDateTime。 |
8 |
OffsetDateTime atTime(OffsetTime time)
將此日期與偏移時間組合以建立 OffsetDateTime。 |
9 |
int compareTo(ChronoLocalDate other)
將此日期與另一個日期進行比較。 |
10 |
boolean equals(Object obj)
檢查此日期是否等於另一個日期。 |
11 |
String format(DateTimeFormatter formatter)
使用指定的格式化程式格式化此日期。 |
12 |
static LocalDate from(TemporalAccessor temporal)
從 temporal 物件獲取 LocalDate 例項。 |
13 |
int get(TemporalField field)
將此日期中指定欄位的值作為 int 獲取。 |
14 |
IsoChronology getChronology()
獲取此日期的紀元,即 ISO 日曆系統。 |
15 |
int getDayOfMonth()
獲取月份中的日期欄位。 |
16 |
DayOfWeek getDayOfWeek()
獲取星期幾欄位,這是一個 DayOfWeek 列舉。 |
17 |
int getDayOfYear()
獲取一年中的日期欄位。 |
18 |
Era getEra()
獲取此日期適用的紀元。 |
19 |
long getLong(TemporalField field)
將此日期中指定欄位的值作為 long 獲取。 |
20 |
Month getMonth()
使用 Month 列舉獲取月份欄位。 |
21 |
int getMonthValue()
獲取 1 到 12 的月份欄位。 |
22 |
int getYear()
獲取年份欄位。 |
23 |
int hashCode()
此日期的雜湊碼。 |
24 |
boolean isAfter(ChronoLocalDate other)
檢查此日期是否在指定日期之後。 |
25 |
boolean isBefore(ChronoLocalDate other)
檢查此日期是否在指定日期之前。 |
26 |
boolean isEqual(ChronoLocalDate other)
檢查此日期是否等於指定日期。 |
27 |
boolean isLeapYear()
根據 ISO 曆法規則檢查年份是否是閏年。 |
28 |
boolean isSupported(TemporalField field)
檢查是否支援指定的欄位。 |
29 |
boolean isSupported(TemporalUnit unit)
檢查是否支援指定的單位。 |
30 |
int lengthOfMonth()
返回此日期表示的月份的長度。 |
31 |
int lengthOfYear()
返回此日期表示的年份的長度。 |
32 |
LocalDate minus(long amountToSubtract, TemporalUnit unit)
返回此日期的副本,其中減去了指定數量。 |
33 |
LocalDate minus(TemporalAmount amountToSubtract)
返回此日期的副本,其中減去了指定數量。 |
34 |
LocalDate minusDays(long daysToSubtract)
返回此 LocalDate 的副本,其中減去了指定的天數。 |
35 |
LocalDate minusMonths(long monthsToSubtract)
返回此 LocalDate 的副本,其中減去了指定的月份數。 |
36 |
LocalDate minusWeeks(long weeksToSubtract)
返回此 LocalDate 的副本,其中減去了指定的週數。 |
37 |
LocalDate minusYears(long yearsToSubtract)
返回此 LocalDate 的副本,其中減去了指定的年數。 |
38 |
static LocalDate now()
從系統時鐘的預設時區獲取當前日期。 |
39 |
static LocalDate now(Clock clock)
從指定的時鐘獲取當前日期。 |
40 |
static LocalDate now(ZoneId zone)
從指定時區的系統時鐘獲取當前日期。 |
41 |
static LocalDate of(int year, int month, int dayOfMonth)
從年、月和日獲取 LocalDate 例項。 |
42 |
static LocalDate of(int year, Month month, int dayOfMonth)
從年、月和日獲取 LocalDate 例項。 |
43 |
static LocalDate ofEpochDay(long epochDay)
從紀元日數獲取 LocalDate 例項。 |
44 |
static LocalDate ofYearDay(int year, int dayOfYear)
從年份和一年中的日期獲取 LocalDate 例項。 |
45 |
static LocalDate parse(CharSequence text)
從文字字串(例如 2007-12-03)獲取 LocalDate 例項。 |
46 |
static LocalDate parse(CharSequence text, DateTimeFormatter formatter)
使用特定格式化程式從文字字串獲取 LocalDate 例項。 |
47 |
LocalDate plus(long amountToAdd, TemporalUnit unit)
返回此日期的副本,其中添加了指定數量。 |
48 |
LocalDate plus(TemporalAmount amountToAdd)
返回此日期的副本,其中添加了指定數量。 |
49 |
LocalDate plusDays(long daysToAdd)
返回此 LocalDate 的副本,其中添加了指定的天數。 |
50 |
LocalDate plusMonths(long monthsToAdd)
返回此 LocalDate 的副本,其中添加了指定的月份數。 |
51 |
LocalDate plusWeeks(long weeksToAdd)
返回此 LocalDate 的副本,其中添加了指定的週數。 |
52 |
LocalDate plusYears(long yearsToAdd)
返回此 LocalDate 的副本,其中添加了指定的年數。 |
53 |
<R> R query(TemporalQuery<R> query)
使用指定的查詢查詢此日期。 |
54 |
ValueRange range(TemporalField field)
獲取指定欄位的有效值範圍。 |
55 |
long toEpochDay()
將此日期轉換為紀元日。 |
56 |
String toString()
將此日期輸出為字串,例如 2007-12-03。 |
57 |
Period until(ChronoLocalDate endDateExclusive)
計算此日期與另一個日期之間的期間作為 Period。 |
58 |
long until(Temporal endExclusive, TemporalUnit unit)
計算以指定單位表示的到另一個日期的時間量。 |
59 |
LocalDate with(TemporalAdjuster adjuster)
返回此日期的調整後的副本。 |
60 |
LocalDate with(TemporalField field, long newValue)
返回此日期的副本,其中指定欄位設定為新值。 |
61 |
LocalDate withDayOfMonth(int dayOfMonth)
返回此 LocalDate 的副本,其中更改了月份中的日期。 |
62 |
LocalDate withDayOfYear(int dayOfYear)
返回此 LocalDate 的副本,其中更改了一年中的日期。 |
63 |
LocalDate withMonth(int month)
返回此 LocalDate 的副本,其中更改了一年中的月份。 |
64 |
LocalDate withYear(int year)
返回此 LocalDate 的副本,其中更改了年份。 |