Calendar Year
Year is an opaque Int value, holding literally the year number
- Source
- Year.scala
Def
Get further in sequance
Get further in sequance
Returns value, which is given number of position further in sequence
- Inherited from
- _methods
- Source
- Sequential.scala
Get before in sequance
Get before in sequance
Returns value, which is given number of position before in sequence
- Inherited from
- _methods
- Source
- Sequential.scala
Less
Less
Returns true
if current value is less than given, false
- otherwise
- Inherited from
- _methods
- Source
- Ordered.scala
Less or equal
Less or equal
Returns true
if current value is less or equal to given, false
- otherwise
- Inherited from
- _methods
- Source
- Ordered.scala
Range
Range
Returns Range from current to given value
Note. Range uses base primitive natural ordering
- Inherited from
- z_MethodsBase
- Source
- Ordered.scala
Range by size
Range by size
Returns Range from current value to current plus given size exclusive
Note. Range uses base primitive natural ordering
- Inherited from
- z_MethodsBase
- Source
- Ordered.scala
Exclusive end range
Exclusive end range
Returns Range from current to given value exclusive
Note. Range uses base primitive natural ordering
- Inherited from
- z_MethodsBase
- Source
- Ordered.scala
Greater
Greater
Returns true
if current value is greater than given, false
- otherwise
- Inherited from
- _methods
- Source
- Ordered.scala
Greater or equal
Greater or equal
Returns true
if current value is greater or equal to given, false
- otherwise
- Inherited from
- _methods
- Source
- Ordered.scala
To option
To option
Returns Int specialized option
- Inherited from
- _methods
- Source
- Base.scala
Index of days.
Index of days.
Index of all Days for the year.
Size is 366 for leap and 365 for regular years.
2018.Year.days.stream.range.tp
// Output
2018-01-01 <> 2018-12-31
- Source
- Year.scala
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).stream.map(_.Year).take(_.number % 4 == 0).remove(_.isLeap).tp
// Output
Stream(100, 200, 300, 500, 600, 700, 900, 1000, 1100, 1300, 1400, 1500, 1700, 1800, 1900)
- Source
- Year.scala
Max value
Max value
Returns maximum of current or given value
- Inherited from
- z_MethodsBase
- Source
- Ordered.scala
Min value
Min value
Returns minimun of current or given value
- Inherited from
- z_MethodsBase
- Source
- Ordered.scala
Index of months.
Index of months.
Index of all Months for the year.
Size is always 12.
2018.Year.months.stream.tp
// Output
Stream(2018-01, 2018-02, 2018-03, 2018-04, 2018-05, 2018-06, 2018-07, 2018-08, 2018-09, 2018-10, 2018-11, 2018-12)
- Source
- Year.scala
Next in sequance
Next in sequance
Returns next value in sequance
- Inherited from
- _methods
- Source
- Sequential.scala
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.tp // prints: 2018-01-01 0:00:00 to 2019-01-01 0:00:00
- Source
- Year.scala
Prior in sequance
Prior in sequance
Returns prior value in sequance
- Inherited from
- _methods
- Source
- Sequential.scala
Real value
Real value
Returns Int value standing behind the opaque type.
This is a zero cost call.
- Inherited from
- _methods
- Source
- Base.scala
Year start time
Year start time
Returns Time for the first moment of the year
2018.Year.start.tp // prints: Time{day=2018-01-01,time=0:00}
- Source
- Year.scala