1
獲得
Interval
與
Joda-Time什麼是最佳方式?
例如:
Interval interval = new Interval(new LocalDate(2015, 01, 01).toDate().getTime(), new LocalDate(2015, 01, 05).toDate().getTime()); //Maybe not the best way to create an Interval...
List<LocalDate> listLocalDate = getListLocalDateFromInterval(interval);
for (LocalDate localDate : listLocalDate) {
System.out.println(localDate);
}
預期結果:
2015-01-01
2015-01-02
2015-01-03
2015-01-04
2015-01-05
你嘗試過什麼?發佈您的任何試驗性代碼。發佈在教程中的代碼(如果有的話)。給一些背景:爲什麼你想要這個? –