object Format
- Source
- Format.scala
- Alphabetic
- By Inheritance
- Format
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply(fmt: => DateTimeFormatter): Format
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- val defaultInstantFormat: Format
Default
Instant
format.Default
Instant
format.scala> import java.time._ scala> import kantan.codecs.strings._ scala> Format.defaultInstantFormat | .format(Instant.parse("2000-01-01T12:00:00.000Z")) res1: String = 2000-01-01T12:00:00Z scala> Format.defaultInstantFormat | .parseInstant("2000-01-01T12:00:00.000Z") res2: StringResult[Instant] = Right(2000-01-01T12:00:00Z)
Example: - val defaultLocalDateFormat: Format
Default
LocalDate
format.Default
LocalDate
format.scala> import java.time._ scala> import kantan.codecs.strings._ scala> Format.defaultLocalDateFormat | .format(LocalDate.of(2000, 1, 1)) res1: String = 2000-01-01 scala> Format.defaultLocalDateFormat | .parseLocalDate("2000-01-01") res2: StringResult[LocalDate] = Right(2000-01-01)
Example: - val defaultLocalDateTimeFormat: Format
Default
LocalDateTime
format.Default
LocalDateTime
format.scala> import java.time._ scala> import kantan.codecs.strings._ scala> Format.defaultLocalDateTimeFormat | .format(LocalDateTime.of(2000, 1, 1, 12, 0, 0)) res1: String = 2000-01-01T12:00:00 scala> Format.defaultLocalDateTimeFormat | .parseLocalDateTime("2000-01-01T12:00:00.000") res2: StringResult[LocalDateTime] = Right(2000-01-01T12:00)
Example: - val defaultLocalTimeFormat: Format
Default
LocalTime
format.Default
LocalTime
format.scala> import java.time._ scala> import kantan.codecs.strings._ scala> Format.defaultLocalTimeFormat | .format(LocalTime.of(12, 0, 0)) res1: String = 12:00:00 scala> Format.defaultLocalTimeFormat | .parseLocalTime("12:00:00.000") res2: StringResult[LocalTime] = Right(12:00)
Example: - val defaultOffsetDateTimeFormat: Format
Default
OffsetDateTime
format.Default
OffsetDateTime
format.scala> import java.time._ scala> import kantan.codecs.strings._ scala> Format.defaultOffsetDateTimeFormat | .format(OffsetDateTime.of(2000, 1, 1, 12, 0, 0, 0, ZoneOffset.UTC)) res1: String = 2000-01-01T12:00:00Z scala> Format.defaultOffsetDateTimeFormat | .parseOffsetDateTime("2000-01-01T12:00:00.000Z") res2: StringResult[OffsetDateTime] = Right(2000-01-01T12:00Z)
Example: - val defaultZonedDateTimeFormat: Format
Default
ZonedDateTime
format.Default
ZonedDateTime
format.scala> import java.time._ scala> import kantan.codecs.strings._ scala> Format.defaultZonedDateTimeFormat | .format(ZonedDateTime.of(2000, 1, 1, 12, 0, 0, 0, ZoneOffset.UTC)) res1: String = 2000-01-01T12:00:00Z scala> Format.defaultZonedDateTimeFormat | .parseZonedDateTime("2000-01-01T12:00:00.000Z") res2: StringResult[ZonedDateTime] = Right(2000-01-01T12:00Z)
Example: - final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def from(pattern: String): Either[String, Format]
Attempts to create a new Format from the given pattern.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()