com.plenigo.sdk.internal.util.DateUtils Maven / Gradle / Ivy
package com.plenigo.sdk.internal.util;
import java.util.Date;
/**
*
* Utils for working with dates.
*
*
* Thread safety: This class is thread safe and can be injected.
*
*/
public final class DateUtils {
/**
* Private constructor because it is a utility class.
*/
private DateUtils() {
}
/**
* Create a deep copy of a given date.
*
* @param date date to get deep copy for
*
* @return deep copy
*/
public static Date copy(Date date) {
if (date == null) {
return null;
}
return (Date) date.clone();
}
}