All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.rometools.utils.Dates Maven / Gradle / Ivy

There is a newer version: 2.1.0
Show newest version
package com.rometools.utils;

import java.util.Date;

public final class Dates {

    private Dates() {
    }

    /**
     * Creates a copy on a Date.
     *
     * @param d The Date to copy, can be null
     * @return null when the input Date was null, a copy of the Date otherwise
     */
    public static Date copy(final Date d) {
        if (d == null) {
            return null;
        } else {
            return new Date(d.getTime());
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy