/// <summary> /// Obtains the current month-day from the system clock in the specified time-zone. /// <para> /// This will query the <seealso cref="Clock#system(ZoneId) system clock"/> to obtain the current month-day. /// Specifying the time-zone avoids dependence on the default time-zone. /// </para> /// <para> /// Using this method will prevent the ability to use an alternate clock for testing /// because the clock is hard-coded. /// /// </para> /// </summary> /// <param name="zone"> the zone ID to use, not null </param> /// <returns> the current month-day using the system clock, not null </returns> public static MonthDay Now(ZoneId zone) { return(Now(Clock.System(zone))); }
//----------------------------------------------------------------------- /// <summary> /// Obtains the current month-day from the system clock in the default time-zone. /// <para> /// This will query the <seealso cref="Clock#systemDefaultZone() system clock"/> in the default /// time-zone to obtain the current month-day. /// </para> /// <para> /// Using this method will prevent the ability to use an alternate clock for testing /// because the clock is hard-coded. /// /// </para> /// </summary> /// <returns> the current month-day using the system clock and default time-zone, not null </returns> public static MonthDay Now() { return(Now(Clock.SystemDefaultZone())); }