[java]代码库
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
public class Main{
public static void main(String[] args )throws ParseException {
Scanner scan = new Scanner(System.in);
String date1 = scan.next();
String date2 = scan.next();
DateFormat format = new SimpleDateFormat("MM,dd,yyyy");
Date d1 = format.parse(date1);
Date d2 = format.parse(date2);
int a;
if(d1.getTime() > d2.getTime()) {
System.out.println(">");
a = (int)((d1.getTime()-d2.getTime())/(1000*3600*24));
}
else if(d1.getTime() < d2.getTime()) {
System.out.println("<");
a = (int)((d2.getTime()-d1.getTime())/(1000*3600*24));
}
else {
System.out.println("=");
a = 0;
}
System.out.println(a);
scan.close();
}
}