TimeFormatpublic class TimeFormat extends Object
| Modifier and Type | Field and Description |
|---|---|
static TimeFormat |
DEFAULT
Deprecated.
Use
TimeFormat.DEFAULT |
static TimeFormat |
GMT
Deprecated.
Use
TimeFormat.GMT |
| Constructor and Description |
|---|
TimeFormat(TimeZone timezone)
Deprecated.
Use
TimeFormat.getInstance(TimeZone) |
| Modifier and Type | Method and Description |
|---|---|
String |
formatDateTime(Date time)
Deprecated.
Use
TimeFormat methods
withTimeZone().format(time) |
String |
formatDateTimeWithMillis(Date time)
Deprecated.
Use
TimeFormat methods
withTimeZone().withMillis().format(time) |
String |
formatDateTimeWithMillisWithoutTimeZone(Date time)
Deprecated.
Use
TimeFormat methods
withMillis().format(time) |
String |
formatDateTimeWithoutTimeZone(Date time)
Deprecated.
Use
TimeFormat method
format(time) |
TimeZone |
getTimeZone()
Deprecated.
Returns default timezone of current TimeFormat.
|
Date |
parseDateTime(String value)
Deprecated.
Use
TimeFormat.parse(String) |
public static final TimeFormat DEFAULT
TimeFormat.DEFAULTpublic static final TimeFormat GMT
TimeFormat.GMTpublic TimeFormat(TimeZone timezone)
TimeFormat.getInstance(TimeZone)timezone - default timezone for this TimeFormat.NullPointerException - if timezone is null.public Date parseDateTime(String value) throws InvalidFormatException, NullPointerException
TimeFormat.parse(String)value - String value to parse.InvalidFormatException - if value has wrong format.NullPointerException - if value == null.SimpleDateFormatpublic String formatDateTime(Date time) throws NullPointerException
TimeFormat methods
withTimeZone().format(time)time - Date to format.NullPointerException - if time is null.public String formatDateTimeWithoutTimeZone(Date time) throws NullPointerException
TimeFormat method
format(time)formatDateTime(java.util.Date), it doesn't declare time zone and
formats time in current time zone.time - Date to format.NullPointerException - if time is null.public String formatDateTimeWithMillis(Date time) throws NullPointerException
TimeFormat methods
withTimeZone().withMillis().format(time)time - Date to format.NullPointerException - if time is null.public String formatDateTimeWithMillisWithoutTimeZone(Date time) throws NullPointerException
TimeFormat methods
withMillis().format(time)formatDateTime(java.util.Date), it doesn't declare time zone and
formats time in current time zone.time - Date to format.NullPointerException - if time is null.public TimeZone getTimeZone()
Copyright © 2002–2025 Devexperts LLC. All rights reserved.