Hi cả nhà . Làm thế nào để so sánh 2 đối tượng Date trong android ạ .
Làm thế nào để so sánh 2 đối tượng Date trong android
Sử dụng Date.before(), Date.after() and Date.equals()
if(date1.after(date2)){
System.out.println(“Date1 is after Date2”);
}
if(date1.before(date2)){
System.out.println(“Date1 is before Date2”);
}
if(date1.equals(date2)){
System.out.println(“Date1 is equal Date2”);
}
nhiều cách lắm. bạn toMillisSeconds nó để so sách chẳng hạn
83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?