Examples of MonthDay


Examples of org.joda.time.MonthDay

        return this.start.toDateTime(instant).toDateMidnight();
    }

    @Override
    public DateMidnight getEndDateMidnight(ReadableInstant instant) {
        final MonthDay instantMonthDay = new MonthDay(instant);
       
        //If the quarter wraps a year boundary AND
        //   the end is NOT after the instant MonthDay AND
        //   the instant MonthDay is NOT before the start
        // then shift the end year forward by one to deal with the year boundary
        if (this.end.isBefore(this.start) && !this.end.isAfter(instantMonthDay) && !instantMonthDay.isBefore(this.start)) {
            return this.end.toDateTime(new DateTime(instant).plusYears(1)).toDateMidnight();
        }
       
        return this.end.toDateTime(instant).toDateMidnight();
    }
View Full Code Here

Examples of org.threeten.bp.MonthDay

    //-----------------------------------------------------------------------
    // now()
    //-----------------------------------------------------------------------
    @Test
    public void now() {
        MonthDay expected = MonthDay.now(Clock.systemDefaultZone());
        MonthDay test = MonthDay.now();
        for (int i = 0; i < 100; i++) {
            if (expected.equals(test)) {
                return;
            }
            expected = MonthDay.now(Clock.systemDefaultZone());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.