mirror of
https://github.com/Snailclimb/JavaGuide
synced 2025-06-16 18:10:13 +08:00
commit
02fdc54c52
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user