public class DateTool extends Object
| 构造器和说明 |
|---|
DateTool() |
| 限定符和类型 | 方法和说明 |
|---|---|
static Date |
addDay(Date date,
int day)
时间增加 day 天
|
static Date |
addHour(Date date,
int hour)
时间增加 hour 小时
|
static Date |
addMinute(Date date,
int minute)
时间增加 minute 分钟
|
static Date |
addMonth(Date date,
int month)
时间增加 month 月
|
static Date |
addSecond(Date date,
int second)
时间增加 second 秒
|
static Date |
addSecond(Date date,
long second)
时间增加 second 秒(long类型)
|
static Date |
addYear(Date date,
int year)
时间增加 year 年
|
static void |
main(String[] args) |
static Date |
parse(int year,
int month,
int day) |
static Date |
parse(int year,
int month,
int day,
int hour,
int minute,
int second) |
static Date |
parse(LocalDateTime dateTime) |
static Date |
parse(String s) |
static Date |
parse(String s,
DateTimeFormatPattern pattern) |
static Date |
parse(String s,
String format) |
public static Date parse(LocalDateTime dateTime)
public static Date parse(String s, DateTimeFormatPattern pattern)
public static Date parse(int year, int month, int day)
public static Date parse(int year, int month, int day, int hour, int minute, int second)
public static Date addSecond(Date date, int second)
date - 参数second - 参数public static Date addSecond(Date date, long second)
date - 参数second - 参数public static Date addMinute(Date date, int minute)
date - 参数minute - 参数public static Date addMonth(Date date, int month)
date - 参数month - 参数public static void main(String[] args)
Copyright © 2022. All rights reserved.