Year.now

Obtains the current year from the specified clock. !(p) This will query the specified clock to obtain the current year. Using this method allows the use of an alternate clock for testing. The alternate clock may be introduced using {@link Clock dependency injection}.

@param clock the clock to use, not null @return the current year, not null

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

Meta