Created
October 23, 2018 07:35
-
-
Save WayneCui/940764ee1a0043495d6f55e40b56b103 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.time.LocalDate; | |
public class WhichDayOfYear { | |
public static void main(String[] args) { | |
//获取系统时间 | |
LocalDate today = LocalDate.of(2018, 8, 13); | |
//%tj表示一年中的第几天 | |
String strDate =String.format("今天是今年的第%tj天!!",today); | |
//输出时间 | |
System.out.println(strDate); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment