Class 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.FastDateFormat
    A fast date format based on the ISO-8601 standard.
    Since:
    4.1.0
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.text.Format

        java.text.Format.Field
    • Field Summary

      • Fields inherited from class org.apache.commons.lang3.time.FastDateFormat

        FULL, LONG, MEDIUM, SHORT
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String format​(java.time.Instant dt)
      Format the datetime given.
      java.lang.String format​(java.time.ZonedDateTime dt)
      Format the datetime given.
      java.lang.String getCurrentDateAndTime()
      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
      • Methods inherited from class java.text.Format

        clone, format, formatToCharacterIterator, parseObject
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.apache.commons.lang3.time.DateParser

        parseObject
    • Constructor Detail

      • ISOStandardDateFormat

        public ISOStandardDateFormat()
        Instantiates a new ISO standard date format based on the format DATE_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