public class DateUtils extends Object
| Constructor and Description |
|---|
DateUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
dateToString(Date date)
Returns
yyyy-MM-dd HH:mm:ss String representation of a
date. |
static Date |
stringToDate(String strDate)
Returns date that is represented by a string.
|
static String |
toFullLocalDateFormat(Date date)
Returns ISO-8601 (RFC3339) compatible representation of local date and time and time offset.
|
static String |
toUTCDateFormat(Date date)
Returns UTC String representation of a date.
|
static String |
toUTCDateFormatWithMilliseconds(Date date)
Returns UTC String representation of a date with milliseconds.
|
public static String dateToString(Date date)
yyyy-MM-dd HH:mm:ss String representation of a
date.date - Date object.public static String toUTCDateFormat(Date date)
date - Date object.public static String toUTCDateFormatWithMilliseconds(Date date)
date - Date object.public static String toFullLocalDateFormat(Date date)
date - Date object.public static Date stringToDate(String strDate) throws ParseException
strDate - String representation of date.ParseException - if strDate is in an invalid format.Copyright © 2010–2023 Open Identity Platform Community. All rights reserved.