Package javax.time.period

Examples of javax.time.period.PeriodFields


     * @return a {@code ZonedDateTime} with the duration subtracted, never null
     * @throws ArithmeticException if the calculation exceeds the capacity of {@code Instant}
     * @throws CalendricalException if the calculation exceeds the capacity of {@code ZonedDateTime}
     */
    public ZonedDateTime minusDuration(PeriodProvider periodProvider) {
        PeriodFields period = PeriodFields.from(periodProvider);
        Duration duration = period.toDuration();
        return duration.isZero() ? this : fromInstant(toInstant().minus(duration), zone);
    }
View Full Code Here

TOP

Related Classes of javax.time.period.PeriodFields

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.