YearMonth.now

Obtains the current year-month from the specified clock. !(p) This will query the specified clock to obtain the current year-month. 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-month, not null

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

Meta