【发布时间】:2017-11-25 17:49:24
【问题描述】:
我正在设计一个程序,我想在我的 recylerview 中显示日期比当前日期少或多 4 天的项目列表。
【问题讨论】:
我正在设计一个程序,我想在我的 recylerview 中显示日期比当前日期少或多 4 天的项目列表。
【问题讨论】:
这将工作一个月:
Calendar cal = Calendar.getInstance();
cal.add(Calendar.MONTH, 1);
这将工作 -4 天:
Calendar cal = Calendar.getInstance();
cal.add(Calendar.DAY_OF_MONTH, -4);
【讨论】: