Day

opaque type Day

Calendar Date

Day is an opaque Int value, holding day index since start of 1970

 // Find all Fridays the 13th for this century
 (2000 <>> 2100).~.map(_.Year).flatMap(_.days)
    .take(d => d.number == 13 && d.weekDay.isFri)
    .peek(_.tp)
    .count.self_^("Total Count: " + _ tp())

 // Output
 2001-04-13
 2001-07-13
 . . . . .
 2099-11-13
 Total Count: 172
Source
Day.scala

Def

@scala.annotation.targetName("and")
inline def &(l: Time.Length): Time
Source
Day.scala
@scala.annotation.targetName("plus")
inline def +(inline i: Int): Day

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
@scala.annotation.targetName("minus")
inline def -(inline i: Int): Day

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
@scala.annotation.targetName("less")
inline def <(inline v: A): Boolean

Less

Less

Returns true if current value is less than given, false - otherwise

Inherited from
_methods
Source
Ordered.scala
@scala.annotation.targetName("lessOrEqual")
inline def <=(inline v: A): Boolean

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
@scala.annotation.targetName("range")
inline def <>(inline to: Int.G.<>[Day]

Range

Range

Returns Range from current to given value

Note. Range uses base primitive natural ordering

Inherited from
zMethodsBase
Source
Ordered.scala
@scala.annotation.targetName("rangeOfSize")
inline def <>=(inline sz: Int): Int.G.<>[Day]
Inherited from
zMethodsBase
Source
Ordered.scala
@scala.annotation.targetName("rangeX")
inline def <>>(inline to: Int.G.<>[Day]

Exclusive end range

Exclusive end range

Returns Range from current to given value exclusive

Note. Range uses base primitive natural ordering

Inherited from
zMethodsBase
Source
Ordered.scala
@scala.annotation.targetName("greater")
inline def >(inline v: A): Boolean

Greater

Greater

Returns true if current value is greater than given, false - otherwise

Inherited from
_methods
Source
Ordered.scala
@scala.annotation.targetName("greaterOrEqual")
inline def >=(inline v: A): Boolean

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
inline def atLeast(v: Day

Max

Max

Returns maximum of current or given value

Inherited from
zMethodsBase
Source
Ordered.scala
inline def atMost(v: Day

Min

Min

Returns minimun of current or given value

Inherited from
zMethodsBase
Source
Ordered.scala
inline def index: Int

Set sequential index.

Set sequential index.

Day 1970-01-01 has index 0

 Day(1900, 1, 31).index.tp // Prints: -25537
 Day(1970, 1, 31).index.tp // Prints: 30
 Day(2018, 1, 31).index.tp // Prints: 17562
Source
Day.scala
inline def isCurrent: Boolean

Checks if today.

Checks if today.

Returns true if this day is today.

   Day().isCurrent.tp // Prints: true
Source
Day.scala
def month: Month

Day's month.

Day's month.

Returns Month which contains this Day.

Source
Day.scala
inline def next: Day

Next in sequance

Next in sequance

Returns next value in sequance

Inherited from
_methods
Source
Sequential.scala
def number: Int

Day number within the month.

Day number within the month.

Number is from 1 and up to 31

Source
Day.scala
inline def period: Period

Day period

Day period

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

  Day(2018, 1, 1).period.tp // prints: 2018-01-01 0:00:00 to 2018-01-02 0:00:00
Source
Day.scala
inline def prior: Day

Prior in sequance

Prior in sequance

Returns prior value in sequance

Inherited from
_methods
Source
Sequential.scala
inline def real: Int

Real value

Real value

Returns real value standing behind the opaque type

Inherited from
_methods
Source
__.scala
def start: Time

Day start time.

Day start time.

Returns Time for the first moment of the day.

   Day(2018, 1, 1).start.tp // prints: Time{day=2018-01-01,time=0:00}
Source
Day.scala
def week: Week
Source
Day.scala

Sunday to Saturday enumereration value.

Sunday to Saturday enumereration value.

Returns WeekDay value corresponding to this day.

   // Calculate number of each WeakDay in the year 2000
   2000.Year.days.~.map(_.weekDay)
       .countFew(_.isSun, _.isMon, _.isTue, _.isWed, _.isThu, _.isFri, _.isSat).~.tp
   // Output
   ~(53, 52, 52, 52, 52, 52, 53)
Source
Day.scala
def year: Year

Day's year.

Day's year.

Returns Year which contains this Day.

Source
Day.scala

Implicit

implicit inline def implicitRequest(inline v: \/): Day
Source
Day.scala
implicit inline def implicitRequest(inline v: CURRENT): Day
Source
Day.scala