Android Utililty Methods Date Clone

List of utility methods to do Date Clone

Description

The list of methods to do Date Clone are organized into topic(s).

Method

Dateclone(final Date date)
Clone date if non-null
if (date == null)
    return null;
return new Date(date.getTime());
DatecopyTime(Date originalDate, Date appliedDate)
Saves date in originalDate, but applies time from appliedDate.
Date date = new Date(originalDate.getTime());
date.setHours(appliedDate.getHours());
date.setMinutes(appliedDate.getMinutes());
date.setSeconds(appliedDate.getSeconds());
return date;