软件包 | 描述 |
---|---|
java.time |
日期、时间、时刻主要的API,和持续时间。
|
java.time.chrono |
除了默认的标准以外的日历系统的通用的。
|
java.util |
包含集合框架、遗留的集合类、事件模型、日期和时间的设施、国际化和各种实用工具类(一个字符串标记,一个随机数发生器,和一位阵列)。
|
Modifier and Type | Method and Description |
---|---|
ZonedDateTime |
LocalDate.atStartOfDay(ZoneId zone)
根据时区的规则,在最早的有效时间内返回一个分区的时间。
|
ZonedDateTime |
Instant.atZone(ZoneId zone)
结合即时时区创建
ZonedDateTime 。
|
ZonedDateTime |
LocalDateTime.atZone(ZoneId zone)
结合时间与时区来创建一个
ZonedDateTime 。
|
ZonedDateTime |
OffsetDateTime.atZoneSameInstant(ZoneId zone)
结合时间与时区来创建一个
ZonedDateTime 确保结果具有相同的瞬间。
|
ZonedDateTime |
OffsetDateTime.atZoneSimilarLocal(ZoneId zone)
结合时间与时区来创建一个
ZonedDateTime 一直保持相同的本地日期和时间。
|
static ZonedDateTime |
ZonedDateTime.from(TemporalAccessor temporal)
获得
ZonedDateTime 实例从一个时空对象。
|
ZonedDateTime |
ZonedDateTime.minus(long amountToSubtract, TemporalUnit unit)
返回此日期时间的副本,用指定的金额减去。
|
ZonedDateTime |
ZonedDateTime.minus(TemporalAmount amountToSubtract)
返回此日期时间的副本,用指定的金额减去。
|
ZonedDateTime |
ZonedDateTime.minusDays(long days)
返回一份本
ZonedDateTime 与指定的期间天数减去。
|
ZonedDateTime |
ZonedDateTime.minusHours(long hours)
返回一份本
ZonedDateTime 减去指定的时间在小时。
|
ZonedDateTime |
ZonedDateTime.minusMinutes(long minutes)
返回一份本
ZonedDateTime 在几分钟之内减去指定的时间。
|
ZonedDateTime |
ZonedDateTime.minusMonths(long months)
返回一份本
ZonedDateTime 与指定期个月减去。
|
ZonedDateTime |
ZonedDateTime.minusNanos(long nanos)
返回一份本
ZonedDateTime 减去指定的时间在纳秒。
|
ZonedDateTime |
ZonedDateTime.minusSeconds(long seconds)
返回一份本
ZonedDateTime 与指定期秒减去。
|
ZonedDateTime |
ZonedDateTime.minusWeeks(long weeks)
返回一份本
ZonedDateTime 在周中减去指定的时间。
|
ZonedDateTime |
ZonedDateTime.minusYears(long years)
返回一份本
ZonedDateTime 与指定期在年中减去。
|
static ZonedDateTime |
ZonedDateTime.now()
从默认时区中的系统时钟中获取当前日期时间。
|
static ZonedDateTime |
ZonedDateTime.now(Clock clock)
从指定的时钟中获取当前日期时间。
|
static ZonedDateTime |
ZonedDateTime.now(ZoneId zone)
从指定时区中的系统时钟中获得当前日期时间。
|
static ZonedDateTime |
ZonedDateTime.of(int year, int month, int dayOfMonth, int hour, int minute, int second, int nanoOfSecond, ZoneId zone)
获得
ZonedDateTime 实例从年,月,日,小时,分钟,秒,纳秒和时区。
|
static ZonedDateTime |
ZonedDateTime.of(LocalDate date, LocalTime time, ZoneId zone)
获得
ZonedDateTime 实例从本地日期和时间。
|
static ZonedDateTime |
ZonedDateTime.of(LocalDateTime localDateTime, ZoneId zone)
获得
ZonedDateTime 实例从本地日期时间。
|
static ZonedDateTime |
ZonedDateTime.ofInstant(Instant instant, ZoneId zone)
获得
ZonedDateTime 实例从一个
Instant 。
|
static ZonedDateTime |
ZonedDateTime.ofInstant(LocalDateTime localDateTime, ZoneOffset offset, ZoneId zone)
获得
ZonedDateTime 实例从结合当地的日期时间和偏移形成的瞬间。
|
static ZonedDateTime |
ZonedDateTime.ofLocal(LocalDateTime localDateTime, ZoneId zone, ZoneOffset preferredOffset)
获得
ZonedDateTime 实例从使用首选本地日期时间如果可能抵消。
|
static ZonedDateTime |
ZonedDateTime.ofStrict(LocalDateTime localDateTime, ZoneOffset offset, ZoneId zone)
获得
ZonedDateTime 严格验证本地日期时间结合的实例,偏移和区域ID。
|
static ZonedDateTime |
ZonedDateTime.parse(CharSequence text)
获得
ZonedDateTime 实例从一个文本字符串,如
2007-12-03T10:15:30+01:00[Europe/Paris] 。
|
static ZonedDateTime |
ZonedDateTime.parse(CharSequence text, DateTimeFormatter formatter)
获得
ZonedDateTime 实例从使用特定格式的文本字符串。
|
ZonedDateTime |
ZonedDateTime.plus(long amountToAdd, TemporalUnit unit)
返回此日期时间的副本,添加指定的金额。
|
ZonedDateTime |
ZonedDateTime.plus(TemporalAmount amountToAdd)
返回此日期时间的副本,添加指定的金额。
|
ZonedDateTime |
ZonedDateTime.plusDays(long days)
返回一份本
ZonedDateTime 在天期间添加指定的。
|
ZonedDateTime |
ZonedDateTime.plusHours(long hours)
返回一份本
ZonedDateTime 在指定时间内添加时间。
|
ZonedDateTime |
ZonedDateTime.plusMinutes(long minutes)
返回一份本
ZonedDateTime 在几分钟之内指定期间补充。
|
ZonedDateTime |
ZonedDateTime.plusMonths(long months)
返回一份本
ZonedDateTime 在月期添加指定的。
|
ZonedDateTime |
ZonedDateTime.plusNanos(long nanos)
返回一份本
ZonedDateTime 在纳秒指定期间补充。
|
ZonedDateTime |
ZonedDateTime.plusSeconds(long seconds)
返回一份本
ZonedDateTime 在指定时间内增加秒。
|
ZonedDateTime |
ZonedDateTime.plusWeeks(long weeks)
返回一份本
ZonedDateTime 在周指定期间补充。
|
ZonedDateTime |
ZonedDateTime.plusYears(long years)
返回一份本
ZonedDateTime 年指定期间补充。
|
ZonedDateTime |
OffsetDateTime.toZonedDateTime()
将这一日期时间
ZonedDateTime 使用偏移的区域ID。
|
ZonedDateTime |
ZonedDateTime.truncatedTo(TemporalUnit unit)
返回一份本
ZonedDateTime 与定时。
|
ZonedDateTime |
ZonedDateTime.with(TemporalAdjuster adjuster)
返回此日期时间的调整副本。
|
ZonedDateTime |
ZonedDateTime.with(TemporalField field, long newValue)
将此日期时间的副本与指定的字段设置为一个新值。
|
ZonedDateTime |
ZonedDateTime.withDayOfMonth(int dayOfMonth)
返回一份本
ZonedDateTime 与天月值改变。
|
ZonedDateTime |
ZonedDateTime.withDayOfYear(int dayOfYear)
返回一份本
ZonedDateTime 与天的年变化。
|
ZonedDateTime |
ZonedDateTime.withEarlierOffsetAtOverlap()
返回此日期时间更改区域的副本,以在本地时间线重叠时对两个有效偏移量的较早的偏移量偏移。
|
ZonedDateTime |
ZonedDateTime.withFixedOffsetZone()
将此日期时间的副本与区域标识设置为偏移量,返回一个。
|
ZonedDateTime |
ZonedDateTime.withHour(int hour)
返回一份本
ZonedDateTime 与一个值改变。
|
ZonedDateTime |
ZonedDateTime.withLaterOffsetAtOverlap()
返回此日期时间更改区域的副本,以在本地时间线重叠中的两个有效偏移量的后面偏移。
|
ZonedDateTime |
ZonedDateTime.withMinute(int minute)
返回一份本
ZonedDateTime 与分钟小时值改变。
|
ZonedDateTime |
ZonedDateTime.withMonth(int month)
返回一份本
ZonedDateTime 以月年值改变。
|
ZonedDateTime |
ZonedDateTime.withNano(int nanoOfSecond)
返回一份本
ZonedDateTime 与纳米二值改变。
|
ZonedDateTime |
ZonedDateTime.withSecond(int second)
返回一份本
ZonedDateTime 第二分钟值改变。
|
ZonedDateTime |
ZonedDateTime.withYear(int year)
返回一份本
ZonedDateTime 与年值改变。
|
ZonedDateTime |
ZonedDateTime.withZoneSameInstant(ZoneId zone)
返回此日期时间的副本,以不同的时区,保留即时。
|
ZonedDateTime |
ZonedDateTime.withZoneSameLocal(ZoneId zone)
返回此日期时间的副本,以不同的时区,如果可能的话,保留本地日期时间。
|
Modifier and Type | Method and Description |
---|---|
ZonedDateTime |
IsoChronology.zonedDateTime(Instant instant, ZoneId zone)
获得ISO划从
Instant 本年表日期时间。
|
ZonedDateTime |
IsoChronology.zonedDateTime(TemporalAccessor temporal)
从另一个日期时间对象中获得一个异划日期时间。
|
Modifier and Type | Method and Description |
---|---|
ZonedDateTime |
GregorianCalendar.toZonedDateTime()
将该对象到
ZonedDateTime 表示时间轴上的同一点为这
GregorianCalendar 。
|
Modifier and Type | Method and Description |
---|---|
static GregorianCalendar |
GregorianCalendar.from(ZonedDateTime zdt)
从
ZonedDateTime 得到对象的默认区域
GregorianCalendar 实例。
|
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.