Duration - 無創(chuàng)建接口,會在Integer類型數據調用日期/時間類型數據時返回
定義Duration:<Integer>.years;
<Integer>.months;
<Integer>.days;
<Integer>.hours;
<Integer>.minutes;
例:
Date date = "2019-01-01" date = date + 1.months //返回:2019-02-01