public class GregorianCalendarDateTimeUtils extends Object
Constructor and Description |
---|
GregorianCalendarDateTimeUtils() |
Modifier and Type | Method and Description |
---|---|
static GregorianCalendar |
currentDateAndTime(TimeZone tz)
Returns a calendar date, representing the current date and time instance
in the specified time zone.
|
static GregorianCalendar |
currentDateAndTimeUTC()
Returns a calendar date, representing the current date and time instance
in the UTC time zone.
|
static String |
currentDateUTC()
Returns a String representing the current date and time instance.
|
static String |
dateUTCToString(Object millis) |
static String |
formatAsISO8601Date(GregorianCalendar cal)
Returns a representation of a calendar date and time instance,
as an ISO 8601-formatted date.
|
static String |
formatAsISO8601Timestamp(GregorianCalendar cal)
Returns a representation of a calendar date and time instance,
as an ISO 8601-formatted timestamp in the UTC time zone.
|
static String |
formatGregorianCalendarDate(GregorianCalendar gcal,
DateFormat df)
Formats a provided calendar date using a supplied date formatter,
in the default system time zone.
|
static String |
formatGregorianCalendarDate(GregorianCalendar gcal,
TimeZone tz,
DateFormat df)
Formats a provided calendar date using a provided date formatter,
in a provided time zone.
|
static String |
timestampUTC()
Returns a String representing the current date and time instance.
|
public static String timestampUTC()
public static String currentDateUTC()
public static GregorianCalendar currentDateAndTimeUTC()
public static GregorianCalendar currentDateAndTime(TimeZone tz)
public static String formatAsISO8601Timestamp(GregorianCalendar cal)
cal
- a calendar date and time instance.public static String formatAsISO8601Date(GregorianCalendar cal)
cal
- a calendar date and time instance.public static String formatGregorianCalendarDate(GregorianCalendar gcal, DateFormat df)
gcal
- A GregorianCalendar date to format.df
- A date formatter to apply.public static String formatGregorianCalendarDate(GregorianCalendar gcal, TimeZone tz, DateFormat df)
gcal
- A GregorianCalendar date to format.tz
- The time zone qualifier for the calendar date to format.df
- A date formatter to apply.Copyright © 2016. All rights reserved.