final class Year extends AnyVal with Any.Datum.Int.Sequential[Util.Calendar.Year]

Calendar Year

Ordering
  1. Alphabetic
Inherited
  1. Year
  2. Any.Datum.Int.Sequential
  3. Any.Datum.Int.Ordered
  4. Any.Datum.Z.Ordered
  5. Any.Datum.Int
  6. Custom.Number.Like
  7. Any.Datum
  8. Any.Wrap
  9. scala.AnyVal
  10. scala.Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Constant

  1. val real: Int
    Attributes
    protected
    Definition Classes
    Year_Trait_Trait

Method

  1. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  2. def days: Idx[Util.Calendar.Day]

    Idx of days.

    Idx of days.

    Idx of all Days for the year.

    Size is 366 for leap and 365 for regular years.

    2018.Year.days.all.range.lp
    // Output
     2018-01-01 <> 2018-12-31
    Definition Classes
    Year
  3. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  4. def isLeap: Boolean

    Leap year indicator.

    Leap year indicator.

    Leap years have an extra day - Feb 29th.

    Leap years usually happen every 4 years. But, let's check:

    // Find every 4th year, which is not leap
    (0 <> 2050).all.map(_.Year).let(_.number % 4 == 0).drop(_.isLeap).lp
    // Output
    ~(100, 200, 300, 500, 600, 700, 900, 1000, 1100, 1300, 1400, 1500, 1700, 1800, 1900)
    Definition Classes
    Year
  5. def make(v: Int): Year
    Attributes
    protected
    Definition Classes
    _Trait_Trait
  6. def max(v: Year): Year

    Maximum value

    Maximum value

    Returns maximum of this and provided value

    Definition Classes
    _Trait → Ordered
  7. def min(v: Year): Year

    Minimum value

    Minimum value

    Returns minimum of this and provided value

    Definition Classes
    _Trait → Ordered
  8. def months: Idx[Util.Calendar.Month]

    Idx of months.

    Idx of months.

    Idx of all Months for the year.

    Size is always 12.

    2018.Year.months.all.lp
    // Output
    ~(2018-01, 2018-02, 2018-03, 2018-04, 2018-05, 2018-06, 2018-07, 2018-08, 2018-09, 2018-10, 2018-11, 2018-12)
    Definition Classes
    Year
  9. def next: Year
    Definition Classes
    _Trait
  10. def number: Int

    Year number.

    Year number.

    2018.Year.number.lp // Prints: 2018
    Definition Classes
    Year
  11. def period: Util.Time.Period

    Year period

    Year period

    Returns Period from the first moment of the year and the first moment of the next year exclusive.

    2018.Year.period.lp // prints: 2018-01-01 0:00:00 to 2019-01-01 0:00:00
    Definition Classes
    Year
  12. def prior: Year
    Definition Classes
    _Trait
  13. def realNumber: Integer
    Attributes
    protected
    Definition Classes
    _TraitLike
  14. def setup: Year.type
    Attributes
    protected
    Definition Classes
    Year_Trait_Trait_Trait
  15. def start: Time

    Year start time

    Year start time

    Returns Time for the first moment of the year

    2018.Year.start.lp // prints: Time{day=2018-01-01,time=0:00}
    Definition Classes
    Year
  16. def toString(): String
    Definition Classes
    Year → Any

Operator

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##(): Int
    Definition Classes
    Any
  3. def +(i: Int): Year
    Definition Classes
    _Trait
  4. def -(i: Int): Year
    Definition Classes
    _Trait
  5. def <(v: Year): Boolean

    Is less test

    Is less test

    Returns true if this is less than v, false otherwise

    Definition Classes
    _Trait → Ordered
  6. def <=(v: Year): Boolean

    Is less or equal test

    Is less or equal test

    Returns true if this is less or equal to v, false otherwise

    Definition Classes
    _Trait → Ordered
  7. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  8. def >(v: Year): Boolean

    Is greater test

    Is greater test

    Returns true if this is greater than v, false otherwise

    Definition Classes
    _Trait → Ordered
  9. def >=(v: Year): Boolean

    Is greater or equal test

    Is greater or equal test

    Returns true if this is greater or equal to v, false otherwise

    Definition Classes
    _Trait → Ordered