软件包 | 描述 |
---|---|
java.time |
日期、时间、时刻主要的API,和持续时间。
|
java.time.chrono |
除了默认的标准以外的日历系统的通用的。
|
java.time.temporal |
访问日期和时间的应用领域和单位,时间和日期的调节。
|
Modifier and Type | Class and Description |
---|---|
class |
DayOfWeek
一周的一天,如“星期二”。
|
class |
Instant
时间线上的一个瞬时点。
|
class |
LocalDate
一个没有在ISO-8601日历系统时区的日期,如
2007-12-03 。
|
class |
LocalDateTime
一个没有在ISO-8601日历系统时区的日期时间,如
2007-12-03T10:15:30 。
|
class |
LocalTime
一时间没有时间带在ISO-8601日历系统,如
10:15:30 。
|
class |
Month
一年一个月,如“七月”。
|
class |
MonthDay
在ISO-8601日历系统月日,如
--12-03 。
|
class |
OffsetDateTime
一个UTC偏移量/格林尼治在ISO-8601日历系统日期时间,如
2007-12-03T10:15:30+01:00 。
|
class |
OffsetTime
与UTC偏移量/格林尼治在ISO-8601日历系统的时间,如
10:15:30+01:00 。
|
class |
Year
在ISO-8601日历系统一年,如
2007 。
|
class |
YearMonth
一年中的ISO-8601日历系统月,如
2007-12 。
|
class |
ZoneOffset
一个时区偏移量从格林尼治/ UTC,如
+02:00 。
|
Modifier and Type | Method and Description |
---|---|
Instant |
Instant.with(TemporalAdjuster adjuster)
返回此即时的调整后的副本。
|
OffsetTime |
OffsetTime.with(TemporalAdjuster adjuster)
返回此时间的调整副本。
|
OffsetDateTime |
OffsetDateTime.with(TemporalAdjuster adjuster)
返回此日期时间的调整副本。
|
LocalTime |
LocalTime.with(TemporalAdjuster adjuster)
返回此时间的调整副本。
|
LocalDate |
LocalDate.with(TemporalAdjuster adjuster)
返回此日期的调整副本。
|
YearMonth |
YearMonth.with(TemporalAdjuster adjuster)
返回本月调整后的副本。
|
LocalDateTime |
LocalDateTime.with(TemporalAdjuster adjuster)
返回此日期时间的调整副本。
|
ZonedDateTime |
ZonedDateTime.with(TemporalAdjuster adjuster)
返回此日期时间的调整副本。
|
Year |
Year.with(TemporalAdjuster adjuster)
返回今年调整后的副本。
|
Modifier and Type | Interface and Description |
---|---|
interface |
ChronoLocalDate
一个没有时间的天或时间区的日期,在一个任意的年代,用于先进的全球化用例。
|
interface |
ChronoLocalDateTime<D extends ChronoLocalDate>
一个没有时间区的日期时间,在一个任意的年代,用于先进的全球化用例。
|
interface |
Era
一个时间线的时代。
|
Modifier and Type | Class and Description |
---|---|
class |
HijrahDate
在迁徙的日历系统日期。
|
class |
HijrahEra
在迁徙的日历系统时代。
|
class |
IsoEra
在国际标准体系中的一个时代。
|
class |
JapaneseDate
日本帝国日历系统中的日期。
|
class |
JapaneseEra
日本帝国日历系统的一个时代。
|
class |
MinguoDate
在民国历法日期。
|
class |
MinguoEra
在民国时代的日历系统。
|
class |
ThaiBuddhistDate
泰国佛教日历系统中的日期。
|
class |
ThaiBuddhistEra
泰国佛教日历系统的一个时代。
|
Modifier and Type | Method and Description |
---|---|
HijrahDate |
HijrahDate.with(TemporalAdjuster adjuster)
返回与此对象调整的相同类型的调整对象。
|
default ChronoLocalDate |
ChronoLocalDate.with(TemporalAdjuster adjuster)
返回与此对象调整的相同类型的调整对象。
|
default ChronoLocalDateTime<D> |
ChronoLocalDateTime.with(TemporalAdjuster adjuster)
返回与此对象调整的相同类型的调整对象。
|
MinguoDate |
MinguoDate.with(TemporalAdjuster adjuster)
返回与此对象调整的相同类型的调整对象。
|
JapaneseDate |
JapaneseDate.with(TemporalAdjuster adjuster)
返回与此对象调整的相同类型的调整对象。
|
ThaiBuddhistDate |
ThaiBuddhistDate.with(TemporalAdjuster adjuster)
返回与此对象调整的相同类型的调整对象。
|
default ChronoZonedDateTime<D> |
ChronoZonedDateTime.with(TemporalAdjuster adjuster)
返回与此对象调整的相同类型的调整对象。
|
Modifier and Type | Method and Description |
---|---|
static TemporalAdjuster |
TemporalAdjusters.dayOfWeekInMonth(int ordinal, DayOfWeek dayOfWeek)
返回一周的一天的调节器,它返回一个新的日期在同一个月内的序数日的一周。
|
static TemporalAdjuster |
TemporalAdjusters.firstDayOfMonth()
返回“月的第一天”调节器,该调节器将返回一个新的日期设置为本月的第一天。
|
static TemporalAdjuster |
TemporalAdjusters.firstDayOfNextMonth()
返回下个月的“第一天”调节器,它将返回一个新的日期设置为下个月的第一天。
|
static TemporalAdjuster |
TemporalAdjusters.firstDayOfNextYear()
返回“下一年的第一天”调节器,它将返回一个新的日期设置为下一年的第一天。
|
static TemporalAdjuster |
TemporalAdjusters.firstDayOfYear()
返回“年的第一天”调节器,该调节器将返回一个新的日期设置为当前年的第一天。
|
static TemporalAdjuster |
TemporalAdjusters.firstInMonth(DayOfWeek dayOfWeek)
返回第一个月的调节器,它返回一个新的日期在同一个月内的第一个匹配的一天。
|
static TemporalAdjuster |
TemporalAdjusters.lastDayOfMonth()
返回“每月最后一天”调节器,该调节器将返回一个新的日期设置为当前月份的最后一天。
|
static TemporalAdjuster |
TemporalAdjusters.lastDayOfYear()
返回“年的最后一天”调节器,该调节器返回一个新的日期设置为当前年的最后一天。
|
static TemporalAdjuster |
TemporalAdjusters.lastInMonth(DayOfWeek dayOfWeek)
返回最后一个月的调节器,它返回一个新的日期在同一个月内的最后一个匹配的一周。
|
static TemporalAdjuster |
TemporalAdjusters.next(DayOfWeek dayOfWeek)
返回第二天的周调节器,该调节器调整日期为调整后的第一周指定日期的第一次发生。
|
static TemporalAdjuster |
TemporalAdjusters.nextOrSame(DayOfWeek dayOfWeek)
返回下一个或同一天的周调节器,该调节器调整日期到第一次发生的指定日期的一周后,日期被调整,除非它已经在该情况下,相同的对象被返回。
|
static TemporalAdjuster |
TemporalAdjusters.ofDateAdjuster(UnaryOperator<LocalDate> dateBasedAdjuster)
获得
TemporalAdjuster 包装日期调整。
|
static TemporalAdjuster |
TemporalAdjusters.previous(DayOfWeek dayOfWeek)
返回前一天的周调节器,该调节器调整日期到第一次发生的指定日期前一周的日期调整。
|
static TemporalAdjuster |
TemporalAdjusters.previousOrSame(DayOfWeek dayOfWeek)
返回前一个或同一天的周调节器,该调节器调整日期到第一次发生的指定日期前一周的日期被调整,除非它已经在这个情况下,相同的对象被返回。
|
Modifier and Type | Method and Description |
---|---|
default Temporal |
Temporal.with(TemporalAdjuster adjuster)
返回与此对象调整的相同类型的调整对象。
|
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.