@Override protected HijrahDate getReferenceValue(Clock reference) { return HijrahDate.now( reference ); }
@Override protected HijrahDate getReferenceValue(Clock reference) { return HijrahDate.now( reference ); }
@Override protected HijrahDate getReferenceValue(Clock reference) { return HijrahDate.now( reference ); }
@Override protected HijrahDate getReferenceValue(Clock reference) { return HijrahDate.now( reference ); }
public static HijrahDate now(Clock clock) { return HijrahDate.now(clock); }
/** * Obtains the current {@code HijrahDate} of the Islamic Umm Al-Qura calendar * in the default time-zone. * <p> * This will query the {@link Clock#systemDefaultZone() system clock} in the default * time-zone to obtain the current date. * <p> * Using this method will prevent the ability to use an alternate clock for testing * because the clock is hard-coded. * * @return the current date using the system clock and default time-zone, not null */ public static HijrahDate now() { return now(Clock.systemDefaultZone()); }
/** * Obtains the current {@code HijrahDate} of the Islamic Umm Al-Qura calendar * in the specified time-zone. * <p> * This will query the {@link Clock#system(ZoneId) system clock} to obtain the current date. * Specifying the time-zone avoids dependence on the default time-zone. * <p> * Using this method will prevent the ability to use an alternate clock for testing * because the clock is hard-coded. * * @param zone the zone ID to use, not null * @return the current date using the system clock, not null */ public static HijrahDate now(ZoneId zone) { return now(Clock.system(zone)); }