标签:java获取时间反转
public static void main(String[] args) throws Exception {
SimpleDateFormat sdf=new SimpleDateFormat("yyyyMMdd");
String str = (sdf.format(new Date()));
char[] dist = new char[str.length()];
for(int x = str.length() - 1, p = 0; x >= 0; x--){
dist[p++] = str.charAt(x);
}
BigInteger aa =new BigInteger("99999999");
BigInteger bb= new BigInteger(new String(dist));
BigInteger sub=aa.subtract(bb);
System.out.println(sub.toString());
//System.out.println(new String(dist));
}本文出自 “Android/Linux@HeFei” 博客,请务必保留此出处http://liang3391.blog.51cto.com/178205/1632911
标签:java获取时间反转
原文地址:http://liang3391.blog.51cto.com/178205/1632911