1
0
mirror of https://github.com/Snailclimb/JavaGuide synced 2025-06-16 18:10:13 +08:00

Merge pull request #1229 from rain7fine11/patch-5

修正示例代码
This commit is contained in:
Guide哥 2021-06-07 10:44:26 +08:00 committed by GitHub
commit 02fdc54c52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -899,7 +899,6 @@ public void getDay() {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
//获取当前月第一天:
Calendar c = Calendar.getInstance();
c.add(Calendar.MONTH, 0);
c.set(Calendar.DAY_OF_MONTH, 1);
String first = format.format(c.getTime());
System.out.println("first day:" + first);