public class TestDateTime extends Object
| Modifier and Type | Field and Description |
|---|---|
private static String |
STANDARD_FORMAT
Constant for standard date time format.
|
| Constructor and Description |
|---|
TestDateTime() |
| Modifier and Type | Method and Description |
|---|---|
static String |
format(Date date)
Convenient way to invoke standard date time formatter.
|
static Date |
parse(String value)
Create a new date instance form given standard date time value.
|
private static final String STANDARD_FORMAT
public static Date parse(String value) throws ParseException
value - standard date time value, null or empty not accepted.IllegalArgumentException - if value argument is null or empty.ParseException - if value argument is not a valid date time format.public static String format(Date date)
date - date value, null not accepted.IllegalArgumentException - if date argument is null.Copyright © 2018. All rights reserved.