/*
 * Copyright 2017 Peer to Park.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.peertopark.java.dates;

import java.util.Date;
import org.joda.time.Duration;

/**
 *
 * @author hector
 */
public class Dates {
    
    
    /**
     * New Date
     *
     * @return
     */
    public static Date now() {
        return new Date();
    }
    
    
    /**
     * Get seconds from milliseconds
     *
     * @param milliseconds Milliseconds value
     * @return long Seconds
     */
    public static long getSecondsFromMillis(long milliseconds) {
        return Duration.millis(milliseconds).getStandardSeconds();
    }
    
}

@@ -627,16 +627,70 @@
 dates;%0A%0A
+import com.peertopark.java.commons.utilities.Objects;%0A
 import j
@@ -787,24 +787,708 @@
 ates %7B%0A    %0A
+    public static final int SECONDS_IN_MONTH = 2592000;%0A    public static final int SECONDS_IN_WEEK = 604800;%0A    public static final int SECONDS_IN_DAY = 86400;%0A    public static final int SECONDS_IN_TWO_DAY = 172800;%0A%0A    public static final int MINUTES_IN_HOUR = 60;%0A    public static final int SECONDS_IN_HOUR = 3600;%0A%0A    public static final int SECONDS_IN_THREE_HOURS = 10800;%0A%0A    public static final int DAYS_IN_MONTH = 30;%0A    %0A    public static final int FIVE_MIN_IN_MILLIS = 300000;%0A    public static final int THIRTY_MIN_IN_MILLIS = 1800000;%0A    public static final int THIRTY_MIN_IN_SECONDS = 1800;%0A    %0A    public static final int THIRTY_DAYS_IN_SECONDS = 2592000;%0A    %0A
     %0A    /**
@@ -1885,10 +1885,357 @@
  %7D%0A    %0A
+    %0A    /**%0A     * Transforma un Date en un String con el valor Long del Date.%0A     *%0A     * @param fecha%0A     * @return%0A     */%0A    public static String transformDateToLongString(Date fecha) %7B%0A        if (Objects.isNull(fecha)) %7B%0A            return null;%0A        %7D else %7B%0A            return String.valueOf(fecha.getTime());%0A        %7D%0A    %7D%0A    %0A
 %7D%0A

Add funtion in dates