| Package | Description |
|---|---|
| java.time |
The main API for dates, times, instants, and durations.
|
| java.time.chrono |
Generic API for calendar systems other than the default ISO.
|
| Modifier and Type | Method and Description |
|---|---|
static Clock |
Clock.fixed(Instant
Obtains a clock that always returns the same instant.
|
static Clock |
Clock.offset(Clock
Obtains a clock that returns instants from the specified clock with the specified duration added
|
static Clock |
Clock.system(ZoneId
Obtains a clock that returns the current instant using best available system clock.
|
static Clock |
Clock.systemDefaultZone()
Obtains a clock that returns the current instant using the best available system clock, converting to date and time using the default time-zone.
|
static Clock |
Clock.systemUTC()
Obtains a clock that returns the current instant using the best available system clock, converting to date and time using the UTC time-zone.
|
static Clock |
Clock.tick(Clock
Obtains a clock that returns instants from the specified clock truncated to the nearest occurrence of the specified duration.
|
static Clock |
Clock.tickMinutes(ZoneId
Obtains a clock that returns the current instant ticking in whole minutes using best available system clock.
|
static Clock |
Clock.tickSeconds(ZoneId
Obtains a clock that returns the current instant ticking in whole seconds using best available system clock.
|
abstract Clock |
Clock.withZone(ZoneId
Returns a copy of this clock with a different time-zone.
|
| Modifier and Type | Method and Description |
|---|---|
static LocalTime |
LocalTime.now(Clock
Obtains the current time from the specified clock.
|
static YearMonth |
YearMonth.now(Clock
Obtains the current year-month from the specified clock.
|
static LocalDate |
LocalDate.now(Clock
Obtains the current date from the specified clock.
|
static OffsetTime |
OffsetTime.now(Clock
Obtains the current time from the specified clock.
|
static Year |
Year.now(Clock
Obtains the current year from the specified clock.
|
static ZonedDateTime |
ZonedDateTime.now(Clock
Obtains the current date-time from the specified clock.
|
static OffsetDateTime |
OffsetDateTime.now(Clock
Obtains the current date-time from the specified clock.
|
static LocalDateTime |
LocalDateTime.now(Clock
Obtains the current date-time from the specified clock.
|
static MonthDay |
MonthDay.now(Clock
Obtains the current month-day from the specified clock.
|
static Instant |
Instant.now(Clock
Obtains the current instant from the specified clock.
|
static Clock |
Clock.offset(Clock
Obtains a clock that returns instants from the specified clock with the specified duration added
|
static Clock |
Clock.tick(Clock
Obtains a clock that returns instants from the specified clock truncated to the nearest occurrence of the specified duration.
|
| Modifier and Type | Method and Description |
|---|---|
HijrahDate |
HijrahChronology.dateNow(Clock
|
ThaiBuddhistDate |
ThaiBuddhistChronology.dateNow(Clock
|
default ChronoLocalDate |
Chronology.dateNow(Clock
Obtains the current local date in this chronology from the specified clock.
|
LocalDate |
IsoChronology.dateNow(Clock
Obtains the current ISO local date from the specified clock.
|
MinguoDate |
MinguoChronology.dateNow(Clock
|
JapaneseDate |
JapaneseChronology.dateNow(Clock
|
static JapaneseDate |
JapaneseDate.now(Clock
Obtains the current
JapaneseDate from the specified clock.
|
static HijrahDate |
HijrahDate.now(Clock
Obtains the current
HijrahDate of the Islamic Umm Al-Qura calendar from the specified clock.
|
static ThaiBuddhistDate |
ThaiBuddhistDate.now(Clock
Obtains the current
ThaiBuddhistDate from the specified clock.
|
static MinguoDate |
MinguoDate.now(Clock
Obtains the current
MinguoDate from the specified clock.
|