Calendar

object Calendar
class java.lang.Object
trait scala.Matchable
class Any

Member

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).stream.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
opaque type Month

Calendar Month

Month is an opaque Int value, holding month index since start of 1970

Source
Month.scala
opaque type Week

Calendar Week

Week is an opaque Int value, holding week index since start of 1970

Source
Week.scala
opaque type Year

Calendar Year

Year is an opaque Int value, holding literally the year number

Source
Year.scala