添加java8测试代码

This commit is contained in:
micyo202 2018-04-22 00:34:04 +08:00
parent e424472876
commit e9b8231093
1 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,25 @@
package com.yan.junit;
import org.junit.Test;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
/**
* 描述TODO<br>
*
* @author Yanzheng 严正<br>
* 时间<br>
* 2018/2/5 下午3:41<br>
* 版权<br>
* Copyright 2017 <a href="https://github.com/micyo202" target="_blank">https://github.com/micyo202</a>. All rights reserved.
*/
public class Java8Test {
@Test
public void test() {
String aa = DateTimeFormatter.ofPattern("yyyy-MM").format(LocalDate.now());
System.out.println(aa);
}
}