Package org.joda.time

Examples of org.joda.time.DateTime.withMonthOfYear()


        assertFunction("date_trunc('month', " + DATE_LITERAL + ")", toDate(result));

        result = result.withMonthOfYear(7);
        assertFunction("date_trunc('quarter', " + DATE_LITERAL + ")", toDate(result));

        result = result.withMonthOfYear(1);
        assertFunction("date_trunc('year', " + DATE_LITERAL + ")", toDate(result));
    }

    @Test
    public void testAddFieldToTimestamp()
View Full Code Here


          if (delMonth < expire.getMonthOfYear()) {
            // Year rollover, advance a year before setting month
            delivery = delivery.plusYears(1);
          }

          delivery = delivery.withMonthOfYear(delMonth);
          cal.add(new DefaultEvent(Event.Type.LAST_DELIVERY_DATE, delivery));

        }

      }
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.