import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author Administrator
*/
public class Demo {
public static void main(String[] args) {
System.out.println("please input your birthday yyyyMMdd");
InputStreamReader isr=new InputStreamReader(System.in);
BufferedReader br=new BufferedReader(isr);
try {
String inStr=br.readLine();
SimpleDateFormat sdf=new SimpleDateFormat("yyyyMMdd");
Date birthday=new Date();
birthday= sdf.parse(inStr);
long birLong= birthday.getTime();
long nowLong=System.currentTimeMillis();
long lifeTime=nowLong-birLong;
int lifeTime_days=(int) (lifeTime/(3600*24*1000));
System.out.println("你已经活了多少秒"+lifeTime/1000);
System.out.println("你已经活了多少天"+lifeTime_days);
System.out.println("人生不过30000天 好好珍惜余下的人生吧");
} catch (IOException ex) {
System.out.println("读取错误");
Logger.getLogger(Demo.class.getName()).log(Level.SEVERE, null, ex);
} catch (ParseException ex) {
System.out.println("输入格式错误");
Logger.getLogger(Demo.class.getName()).log(Level.SEVERE, null, ex);
}
}
}