Object

play.api.data.format

Formats

Related Doc: package format

Permalink

object Formats

This object defines several default formatters.

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

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def bigDecimalFormat(precision: Option[(Int, Int)]): Formatter[BigDecimal]

    Permalink

    Default formatter for the BigDecimal type.

  6. implicit val bigDecimalFormat: Formatter[BigDecimal]

    Permalink

    Default formatter for the BigDecimal type with no precision

  7. implicit def booleanFormat: Formatter[Boolean]

    Permalink

    Default formatter for the Boolean type.

  8. implicit def byteFormat: Formatter[Byte]

    Permalink

    Default formatter for the Byte type.

  9. implicit def charFormat: Formatter[Char]

    Permalink

    Default formatter for the Char type.

  10. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. def dateFormat(pattern: String, timeZone: TimeZone = TimeZone.getDefault): Formatter[Date]

    Permalink

    Formatter for the java.util.Date type.

    Formatter for the java.util.Date type.

    pattern

    a date pattern, as specified in java.time.format.DateTimeFormatter.

    timeZone

    the java.util.TimeZone to use for parsing and formatting

  12. implicit val dateFormat: Formatter[Date]

    Permalink

    Default formatter for the java.util.Date type with pattern yyyy-MM-dd.

  13. implicit def doubleFormat: Formatter[Double]

    Permalink

    Default formatter for the Double type.

  14. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  16. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. implicit def floatFormat: Formatter[Float]

    Permalink

    Default formatter for the Float type.

  18. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  19. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  20. def ignoredFormat[A](value: A): Formatter[A]

    Permalink

    Formatter for ignored values.

    Formatter for ignored values.

    value

    As we ignore this parameter in binding/unbinding we have to provide a default value.

  21. implicit def intFormat: Formatter[Int]

    Permalink

    Default formatter for the Int type.

  22. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  23. def localDateFormat(pattern: String): Formatter[LocalDate]

    Permalink

    Formatter for the java.time.LocalDate type.

    Formatter for the java.time.LocalDate type.

    pattern

    a date pattern as specified in java.time.format.DateTimeFormatter.

  24. implicit val localDateFormat: Formatter[LocalDate]

    Permalink

    Default formatter for java.time.LocalDate type with pattern yyyy-MM-dd.

  25. def localDateTimeFormat(pattern: String, zoneId: ZoneId = java.time.ZoneId.systemDefault()): Formatter[LocalDateTime]

    Permalink

    Formatter for the java.time.LocalDateTime type.

    Formatter for the java.time.LocalDateTime type.

    pattern

    a date pattern as specified in java.time.format.DateTimeFormatter.

    zoneId

    the java.time.ZoneId to use for parsing and formatting

  26. implicit val localDateTimeFormat: Formatter[LocalDateTime]

    Permalink

    Default formatter for java.time.LocalDateTime type with pattern yyyy-MM-dd.

  27. def localTimeFormat(pattern: String): Formatter[LocalTime]

    Permalink

    Formatter for the java.time.LocalTime type.

    Formatter for the java.time.LocalTime type.

    pattern

    a date pattern as specified in java.time.format.DateTimeFormatter.

  28. implicit val localTimeFormat: Formatter[LocalTime]

    Permalink

    Default formatter for java.time.LocalTime type with pattern HH:mm:ss.

  29. implicit def longFormat: Formatter[Long]

    Permalink

    Default formatter for the Long type.

  30. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  31. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  32. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  33. def parsing[T](parse: (String) ⇒ T, errMsg: String, errArgs: Seq[Any])(key: String, data: Map[String, String]): Either[Seq[FormError], T]

    Permalink

    Helper for formatters binders

    Helper for formatters binders

    parse

    Function parsing a String value into a T value, throwing an exception in case of failure

    errArgs

    Error to set in case of parsing failure

    key

    Key name of the field to parse

    data

    Field data

  34. implicit def shortFormat: Formatter[Short]

    Permalink

    Default formatter for the Short type.

  35. def sqlDateFormat(pattern: String): Formatter[Date]

    Permalink

    Formatter for the java.sql.Date type.

    Formatter for the java.sql.Date type.

    pattern

    a date pattern as specified in java.time.DateTimeFormatter.

  36. implicit val sqlDateFormat: Formatter[Date]

    Permalink

    Default formatter for java.sql.Date type with pattern yyyy-MM-dd.

  37. def sqlTimestampFormat(pattern: String, timeZone: TimeZone = TimeZone.getDefault): Formatter[Timestamp]

    Permalink

    Formatter for the java.sql.Timestamp type.

    Formatter for the java.sql.Timestamp type.

    pattern

    a date pattern as specified in java.time.DateTimeFormatter.

    timeZone

    the java.util.TimeZone to use for parsing and formatting

  38. implicit val sqlTimestampFormat: Formatter[Timestamp]

    Permalink

    Default formatter for java.sql.Timestamp type with pattern yyyy-MM-dd HH:mm:ss.

  39. implicit def stringFormat: Formatter[String]

    Permalink

    Default formatter for the String type.

  40. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  41. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  42. implicit def uuidFormat: Formatter[UUID]

    Permalink

    Default formatter for the java.util.UUID type.

  43. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  45. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def sqlDateFormat(pattern: String, timeZone: TimeZone): Formatter[Date]

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.2) Use sqlDateFormat(pattern). SQL dates do not have time zones.

Inherited from AnyRef

Inherited from Any

Ungrouped