public static YearWeek now(Clock clock) {
        final LocalDate now = LocalDate.now(clock);  // called once
        return YearWeek.of(now.get(WEEK_BASED_YEAR), now.get(WEEK_OF_WEEK_BASED_YEAR));
    }
public static YearWeek now ( Clock clock ) { final LocalDate now = LocalDate . now ( clock ) ; return YearWeek . of ( now . get ( WEEK_BASED_YEAR ) , now . get ( WEEK_OF_WEEK_BASED_YEAR ) ) ; }
Obtains the current year-week from the specified clock.
<p>
This will query the specified clock to obtain the current year-week.
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-week, not null