We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DateFormat.addMonth(date, 1); DateFormat.addMonth(date, -1); 加月份时,如果当前日期为8月31号,返回的时间为10月1号 减月份时,日期为7月31号,返回7月1号
DateFormat.addMonth(date, 1); DateFormat.addMonth(date, -1);
The text was updated successfully, but these errors were encountered:
这个问题我也遇到了 假设date = Thu May 31 2018 09:56:22 GMT+0800 (中国标准时间) addMonth(date, -1) 返回的是Tue May 01 2018 09:56:22 GMT+0800 (中国标准时间) addMonth(date, -2) 返回的是Sat Mar 31 2018 09:56:22 GMT+0800 (中国标准时间) 符合预期 addMonth(date, 1) 返回的是Sun Jul 01 2018 09:56:22 GMT+0800 (中国标准时间) 符合预期 addMonth(date, 2) 返回的是Tue Jul 31 2018 09:56:22 GMT+0800 (中国标准时间)
Sorry, something went wrong.
No branches or pull requests
DateFormat.addMonth(date, 1); DateFormat.addMonth(date, -1);
加月份时,如果当前日期为8月31号,返回的时间为10月1号
减月份时,日期为7月31号,返回7月1号
The text was updated successfully, but these errors were encountered: