Package org.apereo.cas.util
Class ISOStandardDateFormat
- java.lang.Object
-
- java.text.Format
-
- org.apache.commons.lang3.time.FastDateFormat
-
- org.apereo.cas.util.ISOStandardDateFormat
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,org.apache.commons.lang3.time.DateParser,org.apache.commons.lang3.time.DatePrinter
public class ISOStandardDateFormat extends org.apache.commons.lang3.time.FastDateFormatA fast date format based on the ISO-8601 standard.- Since:
- 4.1.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ISOStandardDateFormat()Instantiates a new ISO standard date format based on the formatDATE_FORMAT.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringformat(java.time.Instant dt)Format the datetime given.java.lang.Stringformat(java.time.ZonedDateTime dt)Format the datetime given.java.lang.StringgetCurrentDateAndTime()Gets the current date and time formatted by the pattern specified.-
Methods inherited from class org.apache.commons.lang3.time.FastDateFormat
applyRules, equals, format, format, format, format, format, format, format, format, format, format, getDateInstance, getDateInstance, getDateInstance, getDateInstance, getDateTimeInstance, getDateTimeInstance, getDateTimeInstance, getDateTimeInstance, getInstance, getInstance, getInstance, getInstance, getInstance, getLocale, getMaxLengthEstimate, getPattern, getTimeInstance, getTimeInstance, getTimeInstance, getTimeInstance, getTimeZone, hashCode, parse, parse, parse, parseObject, toString
-
-
-
-
Constructor Detail
-
ISOStandardDateFormat
public ISOStandardDateFormat()
Instantiates a new ISO standard date format based on the formatDATE_FORMAT.
-
-
Method Detail
-
getCurrentDateAndTime
public java.lang.String getCurrentDateAndTime()
Gets the current date and time formatted by the pattern specified.- Returns:
- the current date and time
-
format
public java.lang.String format(java.time.ZonedDateTime dt)
Format the datetime given.- Parameters:
dt- the datetime- Returns:
- the date and time
-
format
public java.lang.String format(java.time.Instant dt)
Format the datetime given.- Parameters:
dt- the datetime- Returns:
- the date and time
-
-