当前位置: 代码迷 >> Web前端 >> 设立日期
  详细解决方案

设立日期

热度:207   发布时间:2012-08-30 09:55:54.0
设置日期
public static Date getTime(Integer day, Integer hour, Integer minute, Integer second) {
		Calendar c = Calendar.getInstance();
		if (day != null)
			c.add(Calendar.DAY_OF_MONTH, day);
		if (hour != null)
			c.set(Calendar.HOUR_OF_DAY, hour);
		if (minute != null)
			c.set(Calendar.MINUTE, minute);
		if (second != null)
			c.set(Calendar.SECOND, second);
		return c.getTime();
	}

//随手记录
  相关解决方案