2019-12-07 20:13:04
i need if this date is in today my buton visibility is visible.
try {
String dtStart = sales.getDate();
SimpleDateFormat format = new SimpleDateFormat("yyyy-mm-dd HH:mm:ss");
Date date = format.parse(dtStart);
Calendar now = Calendar.getInstance();
Date today = now.getTime();
if (date == today){
holder.delete.setVisibility(View.VISIBLE);
}else {
holder.delete.setVisibility(View.INVISIBLE);
}
} catch (ParseException e) {
e.printStackTrace();
}