YearMonth.now

Obtains the current year-month 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-month. !(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-month using the system clock and default time-zone, not null

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

Meta