Packages

sealed trait Format extends AnyRef

Serializable wrapper around DateTimeFormatter.

The main purpose of this is to make java8 codecs Serializable and thus usable with frameworks like spark.

Source
Format.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Format
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def formatter: DateTimeFormatter

    Internal date/time formatter.

    Internal date/time formatter.

    This is protected to prevent anyone from calling it directly - doing so instantly turns the calling class non-serializable, which rather defeats the purpose of Format.

    Attributes
    protected

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  9. def format(temporal: TemporalAccessor): String

    Formats the specified TemporalAccessor as a string.

    Formats the specified TemporalAccessor as a string.

    Example:
    1. scala> import java.time._
      
      scala> Format.defaultZonedDateTimeFormat
           |   .format(ZonedDateTime.of(2000, 1, 1, 12, 0, 0, 0, ZoneOffset.UTC))
      res1: String = 2000-01-01T12:00:00Z
  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. def parseInstant(str: String): StringResult[Instant]

    Attempts to parse the specified string as an Instant.

    Attempts to parse the specified string as an Instant.

    Example:
    1. scala> import java.time._
      scala> import kantan.codecs.strings._
      
      scala> Format.defaultInstantFormat
           |   .parseInstant("2000-01-01T12:00:00.000Z")
      res1: StringResult[Instant] = Right(2000-01-01T12:00:00Z)
  17. def parseLocalDate(str: String): StringResult[LocalDate]

    Attempts to parse the specified string as a LocalDate.

    Attempts to parse the specified string as a LocalDate.

    Example:
    1. scala> import java.time._
      scala> import kantan.codecs.strings._
      
      scala> Format.defaultLocalDateFormat
           |   .parseLocalDate("2000-01-01")
      res2: StringResult[LocalDate] = Right(2000-01-01)
  18. def parseLocalDateTime(str: String): StringResult[LocalDateTime]

    Attempts to parse the specified string as a LocalDateTime.

    Attempts to parse the specified string as a LocalDateTime.

    Example:
    1. scala> import java.time._
      scala> import kantan.codecs.strings._
      
      scala> Format.defaultLocalDateTimeFormat
           |   .parseLocalDateTime("2000-01-01T12:00:00.000")
      res2: StringResult[LocalDateTime] = Right(2000-01-01T12:00)
  19. def parseLocalTime(str: String): StringResult[LocalTime]

    Attempts to parse the specified string as a LocalDateTime.

    Attempts to parse the specified string as a LocalDateTime.

    Example:
    1. scala> import java.time._
      scala> import kantan.codecs.strings._
      
      scala> Format.defaultLocalTimeFormat
           |   .parseLocalTime("12:00:00.000")
      res1: StringResult[LocalTime] = Right(12:00)
  20. def parseOffsetDateTime(str: String): StringResult[OffsetDateTime]

    Attempts to parse the specified string as a LocalDate.

    Attempts to parse the specified string as a LocalDate.

    Example:
    1. scala> import java.time._
      scala> import kantan.codecs.strings._
      
      scala> Format.defaultOffsetDateTimeFormat
           |   .parseOffsetDateTime("2000-01-01T12:00:00.000Z")
      res1: StringResult[OffsetDateTime] = Right(2000-01-01T12:00Z)
  21. def parseZonedDateTime(str: String): StringResult[ZonedDateTime]

    Attempts to parse the specified string as a ZonedDateTime.

    Attempts to parse the specified string as a ZonedDateTime.

    Example:
    1. scala> import java.time._
      scala> import kantan.codecs.strings._
      
      scala> Format.defaultZonedDateTimeFormat
           |   .parseZonedDateTime("2000-01-01T12:00:00.000Z")
      res1: StringResult[ZonedDateTime] = Right(2000-01-01T12:00Z)
  22. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  23. def toString(): String
    Definition Classes
    AnyRef → Any
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  25. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  26. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped