Skip to content

Instantly share code, notes, and snippets.

@WayneCui
Created October 23, 2018 07:35
Show Gist options
  • Save WayneCui/940764ee1a0043495d6f55e40b56b103 to your computer and use it in GitHub Desktop.
Save WayneCui/940764ee1a0043495d6f55e40b56b103 to your computer and use it in GitHub Desktop.
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