final case class YearOps(underlying: Year) extends AnyVal with Product with Serializable
- Alphabetic
- By Inheritance
- YearOps
- Serializable
- Product
- Equals
- AnyVal
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
- new YearOps(underlying: Year)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- Any
- final def ##(): Int
- Definition Classes
- Any
- def +(years: Int): Year
Obtains a year with the specified number of years added.
- def -(years: Int): Year
Obtains a year with the specified number of years subtracted.
- def ->[B](y: B): (YearOps, B)
- def /(monthDay: MonthDay): LocalDate
Obtains a LocalDate by combining this year with the specified MonthDay.
- def /(month: Int): YearMonth
Obtains a YearMonth by combining this year with the specified month, from 1 (January) to 12 (December).
Obtains a YearMonth by combining this year with the specified month, from 1 (January) to 12 (December).
- Exceptions thrown
DateTimeException
if the month is invalid.
- def /(month: Month): YearMonth
Obtains a YearMonth by combining this year with the specified java.time.Month.
- def <(other: Year): Boolean
Returns
true
if this year is before the specified one. - def <=(other: Year): Boolean
Returns
true
if this year is equal to or before the specified one. - final def ==(arg0: Any): Boolean
- Definition Classes
- Any
- def >(other: Year): Boolean
Returns
true
if this year is after the specified one. - def >=(other: Year): Boolean
Returns
true
if this year is equal to or after the specified one. - final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def ensuring(cond: (YearOps) => Boolean, msg: => Any): YearOps
- def ensuring(cond: (YearOps) => Boolean): YearOps
- def ensuring(cond: Boolean, msg: => Any): YearOps
- def ensuring(cond: Boolean): YearOps
- def formatted(fmtstr: String): String
- def getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- val underlying: Year
- def |>(formatter: DateTimeFormatter): String
Formats this year using the specified formatter.
Formats this year using the specified formatter.
- Exceptions thrown
DateTimeException
- if an error occurs during printing
- def ▹(formatter: DateTimeFormatter): String
Shadowed Implicit Value Members
- def +(other: String): String
- Implicit
- This member is added by an implicit conversion from YearOps toany2stringadd[YearOps] performed by method any2stringadd in scala.Predef.
- Shadowing
- This implicitly inherited member is shadowed by one or more members in this class.
To access this member you can use a type ascription:(yearOps: any2stringadd[YearOps]).+(other)
- Definition Classes
- any2stringadd
Deprecated Value Members
- def →[B](y: B): (YearOps, B)
- Implicit
- This member is added by an implicit conversion from YearOps toArrowAssoc[YearOps] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use
->
instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.
Scala Time
scala-time is a simple Scala wrapper for easier use JDK 1.8.0 (Java 8) time APIs
Overview
The library is contained in the scalatime package which includes extension methods provided via implicit conversion methods to Scala value classes.
For usage examples see below: