Object

com.mediative.amadou

Year

Related Doc: package amadou

Permalink

object Year extends DateIntervalType

Source
DateInterval.scala
Linear Supertypes
DateIntervalType, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Year
  2. DateIntervalType
  3. AnyRef
  4. 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. def apply(year: Int): DateInterval

    Permalink
  5. def apply(timestamp: Long): DateInterval

    Permalink

    Represent the interval for a given timestamp using the specified interval type.

    Represent the interval for a given timestamp using the specified interval type.

    This will truncate lower resolution date fields to their initial value, for example for months the day of month field is set to 1.

    Example:

    scala> Day(1431000000000L).format("yyyy-MM-dd HH:mm ZZ")
    res1: String = 2015-05-07 00:00 +0000
    scala> Month(1431000000000L).format("yyyy-MM-dd HH:mm ZZ")
    res2: String = 2015-05-01 00:00 +0000
    scala> Year(1431000000000L).format("yyyy-MM-dd HH:mm ZZ")
    res3: String = 2015-01-01 00:00 +0000
    Definition Classes
    DateIntervalType
  6. def apply(date: DateInterval): DateInterval

    Permalink

    Create a date interval with a different type and truncate lower resolution date fields accordingly.

    Create a date interval with a different type and truncate lower resolution date fields accordingly.

    Example:

    scala> Day(1431000000000L)
    res1: DateInterval = 2015-05-07
    scala> Week(Day(1431000000000L))
    res2: DateInterval = 2015-W19
    scala> Month(Day(1431000000000L))
    res3: DateInterval = 2015-05
    scala> Quarter(1431000000000L)
    res4: DateInterval = 2015-Q2
    scala> Year(Day(1431000000000L))
    res5: DateInterval = 2015
    scala> Year(Day(1431000000000L)).format("yyyy-MM-dd HH:mm ZZ")
    res6: String = 2015-01-01 00:00 +0000
    Definition Classes
    DateIntervalType
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. val calendarField: Int

    Permalink
    Definition Classes
    DateIntervalType
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. val dateFormat: String

    Permalink
    Definition Classes
    DateIntervalType
  11. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    AnyRef → Any
  16. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  20. def parse(input: String): Option[DateInterval]

    Permalink

    Parse a timestamp into a date interval.

    Parse a timestamp into a date interval.

    Example:

    scala> Day.parse("2015-05-07")
    res1: Option[DateInterval] = Some(2015-05-07)
    scala> Day.parse("2015-05-07").get.format("yyyy-MM-dd HH:mm ZZ")
    res2: String = 2015-05-07 00:00 +0000
    Definition Classes
    DateIntervalType
  21. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    AnyRef → Any
  23. def today: DateInterval

    Permalink

    Represent the interval for today using the specified interval type.

    Represent the interval for today using the specified interval type.

    This will truncate lower resolution date fields to their initial value, for example for months the day of month field is set to 1.

    Definition Classes
    DateIntervalType
  24. final def wait(): Unit

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

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

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

Inherited from DateIntervalType

Inherited from AnyRef

Inherited from Any

Ungrouped