We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 681c5ae + 3741cfc commit bad509aCopy full SHA for bad509a
docs/java/new-features/java8-common-new-features.md
@@ -766,8 +766,8 @@ LocalTime.class //时间 format: HH:mm:ss
766
767
```java
768
public void oldFormat(){
769
- Date now = new Date();
770
- //format yyyy-MM-dd HH:mm:ss
+ Date now = new Date();
+ //format yyyy-MM-dd
771
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
772
String date = sdf.format(now);
773
System.out.println(String.format("date format : %s", date));
0 commit comments