Year.now

Obtains the current year from the system clock _in the default time-zone. !(p) This will query the {@link Clock#systemDefaultZone() system clock} _in the default time-zone to obtain the current year. !(p) Using this method will prevent the ability to use an alternate clock for testing because the clock is hard-coded.

@return the current year using the system clock and default time-zone, not null

  1. Year now()
    class Year
    static
    now
    ()
  2. Year now(ZoneId zone)
  3. Year now(Clock clock)

Meta