判断软件是否过期

@bingoogolapple 2014-10-22 09:07:18发表于 bingoogolapple/bingoogolapple.github.io Android

public static boolean isOverdue() {
    // 过期时间
    String overdue = "2014-11-23 00:00:01";
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
    Date overdueDate = new Date();
    try {
        overdueDate = sdf.parse(overdue);
    } catch (ParseException e) {
        e.printStackTrace();
    }
    Date currentDate = new Date();
    return currentDate.after(overdueDate);
}