getZone
getZone: (ZonedDateTime) -> ZoneIdThe zone.
ZonedDateTime.now()
ZonedDateTime.ofInstant(…)
Instant.now():atZone(…)| Method | Returns | Description |
|---|---|---|
getZone() | ZoneId | The zone. |
toLocalDate() | LocalDate | The local date there. |
toLocalTime() | LocalTime | The local time there. |
toLocalDateTime() | LocalDateTime | The local date and time there. |
getYear() | number | The year there. |
getMonthValue() | number | The month there, 1 to 12. |
getDayOfMonth() | number | The day of the month there. |
getDayOfYear() | number | The day of the year there. |
getDayOfWeek() | DayOfWeek | The day of the week there. |
getHour() | number | The hour there. |
getMinute() | number | The minute there. |
getSecond() | number | The second there. |
getNano() | number | The nano-of-second. |
withZoneSameInstant(ZoneId) | ZonedDateTime | The same instant in zone. |
format(DateTimeFormatter) | string | formatter's text. |
equals(any) | boolean | Whether other is the same instant in the same zone. |
toString() | string | 2007-12-03T10:15:30+01:00[Europe/Paris]. |
now() | ZonedDateTime | () -> ZonedDateTime: Now in the system zone. |
now(ZoneId) | ZonedDateTime | |
ofInstant(Instant, ZoneId) | ZonedDateTime | instant in zone. |
| Method | Returns | Description |
|---|---|---|
Instant.atZone | ZonedDateTime | This instant in zone. |
LocalDateTime.atZone | ZonedDateTime | This date and time in zone (a time a gap skips moves forward by the gap; an overlap takes the earlier offset). |
ZonedDateTimeClass.now | ZonedDateTime | () -> ZonedDateTime: Now in the system zone. |
ZonedDateTimeClass.ofInstant | ZonedDateTime | instant in zone. |
getZonegetZone: (ZonedDateTime) -> ZoneIdThe zone.
toLocalDatetoLocalDate: (ZonedDateTime) -> LocalDateThe local date there.
toLocalTimetoLocalTime: (ZonedDateTime) -> LocalTimeThe local time there.
toLocalDateTimetoLocalDateTime: (ZonedDateTime) -> LocalDateTimeThe local date and time there.
getYeargetYear: (ZonedDateTime) -> numberThe year there.
getMonthValuegetMonthValue: (ZonedDateTime) -> numberThe month there, 1 to 12.
getDayOfMonthgetDayOfMonth: (ZonedDateTime) -> numberThe day of the month there.
getDayOfYeargetDayOfYear: (ZonedDateTime) -> numberThe day of the year there.
getDayOfWeekgetDayOfWeek: (ZonedDateTime) -> DayOfWeekThe day of the week there.
getHourgetHour: (ZonedDateTime) -> numberThe hour there.
getMinutegetMinute: (ZonedDateTime) -> numberThe minute there.
getSecondgetSecond: (ZonedDateTime) -> numberThe second there.
getNanogetNano: (ZonedDateTime) -> numberThe nano-of-second.
withZoneSameInstantwithZoneSameInstant: (ZonedDateTime, ZoneId) -> ZonedDateTimeThe same instant in zone.
formatformat: (ZonedDateTime, DateTimeFormatter) -> stringformatter's text.
equalsequals: (ZonedDateTime, any) -> booleanWhether other is the same instant in the same zone.
toStringtoString: (ZonedDateTime) -> string2007-12-03T10:15:30+01:00[Europe/Paris].
nownow: (() -> ZonedDateTime) & ((ZoneId) -> ZonedDateTime)() -> ZonedDateTime: Now in the system zone.
(ZoneId) -> ZonedDateTime: Now in zone.
ofInstantofInstant: (Instant, ZoneId) -> ZonedDateTimeinstant in zone.