自定义函数-Duration类型

2020-12-24 09:04:28 587 本站

Duration - 无创建接口,会在Integer类型数据调用日期/时间类型数据时返回

定义Duration:<Integer>.years;

                        <Integer>.months;

                        <Integer>.days;

                       <Integer>.hours;

                       <Integer>.minutes;

例:

Date date = "2019-01-01"

date = date + 1.months //返回:2019-02-01



内容来源于互联网,如有侵权,请联系客服删除处理。
在线咨询 拨打电话