基本的 LocalDates

给定的年 - 月 - 日:

LocalDate oneJanuaryNineteenSixty = new LocalDate(1960,1,1);

今天的日期:

LocalDate today = LocalDate.now()

明天:

LocalDate tomorrow = LocalDate.now().plusDays(1);

昨天:

LocalDate yesterday = LocalDate.now().minusDays(1);

两周前:

LocalDate twoWeeksAgo = LocalDate.now().minusWeeks(2);

1960-01-01 之前九个月:

LocalDate conception = new LocalDate(1960-01-01).minusMonths(9);

本周六:

LocalDate saturday = LocalDate.now().withDayOfWeek(DateTimeConstants.SATURDAY);