Here you can find the source of addTime(java.sql.Timestamp start, int year, int month, int day)
Parameter | Description |
---|---|
start | the start |
year | the year |
month | the month |
day | the day |
public static java.sql.Timestamp addTime(java.sql.Timestamp start, int year, int month, int day)
//package com.java2s; //License from project: Apache License public class Main { /**/* ww w . j a va 2s .c om*/ * Adds the time. * * @param start the start * @param year the year * @param month the month * @param day the day * @return the java.sql. timestamp */ public static java.sql.Timestamp addTime(java.sql.Timestamp start, int year, int month, int day) { return new java.sql.Timestamp(start.getTime() + year * 365 * 24 * 60 * 60 * 1000 + month * 30 * 24 * 60 * 60 * 1000 + day * 24 * 60 * 60 * 1000); } }