25 lines
755 B
Java
Executable File
25 lines
755 B
Java
Executable File
//Main.java
|
|
package task1;
|
|
|
|
import java.util.Date;
|
|
import java.util.Scanner;
|
|
import java.text.ParseException;
|
|
import java.text.SimpleDateFormat;
|
|
import java.util.Locale;
|
|
|
|
public class Main {
|
|
public static void main(String[] args) {
|
|
Scanner input = new Scanner(System.in);
|
|
SimpleDateFormat in = new SimpleDateFormat("yyyy M dd");
|
|
Date d = new Date();
|
|
try {
|
|
d = in.parse(input.nextLine());
|
|
} catch (ParseException e) {
|
|
e.printStackTrace();
|
|
}
|
|
SimpleDateFormat out = new SimpleDateFormat("yyyy MMMM dd EEEE", Locale.ENGLISH);
|
|
String formattedDate = out.format(d);
|
|
System.out.println("今天是" + out.format(d).toUpperCase());
|
|
|
|
}
|
|
} |