Now

public final class Now

The current time.

An instance of Now always obtains the current time in different formats. The time zone is fixed for a given instance.

Functions

Link copied to clipboard
Obtains the current day of week.
Link copied to clipboard
Obtains the current time as a LocalDate.
Link copied to clipboard
Obtains the current time as a LocalDateTime.
Link copied to clipboard
Obtains the current time as a LocalTime.
Link copied to clipboard
public Month asMonth()
Obtains the current month.
Link copied to clipboard
Obtains the current time as an OffsetDateTime.
Link copied to clipboard
Obtains the current time as an OffsetTime.
Link copied to clipboard
Obtains the current year and month.
Link copied to clipboard
Obtains the current time as an ZonedDateTime.
Link copied to clipboard
public static Now get()
Obtains the Now in the current time zone provided by currentTimeZone.
public static Now get(ZoneId timeZone)
public static Now get(ZoneId timeZone)
Obtains the Now in the given time zone.
public static Now get(ZoneOffset offset)
Obtains the Now with the given zone offset.