import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
String dateStr = sc.nextLine();
String[] strings = dateStr.split(" ");
dateStr = strings[0]+"/"+strings[1]+"/"+strings[2];
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
java.util.Date startDate = null;
try {
startDate = sdf.parse(dateStr);
} catch (Exception e) {
e.printStackTrace();
}
Calendar startCalendar = Calendar.getInstance();
startCalendar.setTime(startDate);
int index = startCalendar.get(Calendar.DAY_OF_YEAR);
System.out.println(index);
}
}
}
今天是第几天
最新推荐文章于 2023-01-11 21:17:21 发布