Esempio n. 1
0
    }
    /** @var TemporalQuery */
    private static $LOCAL_DATE;
    /**
     * A query for {@code LocalTime} returning null if not found.
     * <p>
     * This returns a {@code TemporalQuery} that can be used to query a temporal
     * object for the local time. The query will return null if the temporal
     * object cannot supply a local time.
     * <p>
     * The query implementation examines the {@link ChronoField#NANO_OF_DAY NANO_OF_DAY}
     * field and uses it to create a {@code LocalTime}.
     * <p>
     * The method {@link ZoneOffset#from(TemporalAccessor)} can be used as a
     * {@code TemporalQuery} via a method reference, {@code LocalTime::from}.
     * This query and {@code LocalTime::from} will return the same result if the
     * temporal object contains a time. If the temporal object does not contain
     * a time, then the method reference will throw an exception, whereas this
     * query will return null.
     *
     * @return TemporalQuery a query that can obtain the time of a temporal, not null
     */
    public static function localTime()
    {
        return self::$LOCAL_TIME;
    }
    /** @var TemporalQuery */
    private static $LOCAL_TIME;
}
TemporalQueries::init();