c

# Util.Time.Period 

#### class Period extends Range[Time]

Ordering
1. Alphabetic
Inherited
1. Period
2. Range
3. Util.Range.Z.Base
4. scala.AnyRef
5. scala.Any
1. Hide All
2. Show All
Visibility
1. Public
2. All

### Type

1. type Period.this_type
Attributes
protected
Definition Classes
Period → Base

### Constant

1. val end: Time
Definition Classes
Period_Trait
2. val start: Time
Definition Classes
Period_Trait

### Method

1. def all(implicit n: Numeric[Time]): ~[Time]

Stream of elements

Stream of elements

Elements are produced from `start` to `end` using implicit math.Numeric with value 1

math.Numeric is universally available for:

```('A' <> 'K').all.lp
(2018.Year.start.day <>+ 5).all.tp

// Output
~(A, B, C, D, E, F, G, H, I, J, K)
----------
?
----------
2018-01-01
2018-01-02
2018-01-03
2018-01-04
2018-01-05
2018-01-06
----------```
Definition Classes
_Trait
2. def allStep(step: Time)(implicit n: Numeric[Time]): ~[Time]

Stream of elements with step

Stream of elements with step

Elements are produced from `start` to `end` using implicit math.Numeric with provided `step` value

If `step` is negative, elements piped from `end` to `start`

math.Numeric is universally available for:

```('A' <> 'Z').allStep(4).lp  // Prints: ~(A, E, I, M, Q, U, Y)

(1 <> 20).allStep(-3).lp    // Prints: ~(20, 17, 14, 11, 8, 5, 2)```
Definition Classes
_Trait
3. def allStep(step: (Time) ⇒ Time): ~[Time]

Stream of elements with step

Stream of elements with step

Elements are produced from `start` to `end` using specified `step` function

```val dt = DayTime.make(9, 30)
(dt <>> dt + 2.Hours).allStep(_ + 10.Minutes).lp

// Output
~(9:30, 9:40, 9:50, 10:00, 10:10, 10:20, 10:30, 10:40, 10:50, 11:00, 11:10, 11:20)```

Note: The result depends on implicit Ordering

Definition Classes
_Trait
4. final def asInstanceOf[T0]: T0
Definition Classes
Any
5. def clone(): AnyRef
Attributes
protected[java.lang]
Definition Classes
AnyRef
Annotations
@throws( ... )
6. def contains(a: Time): Boolean

Check if within

Check if within

Returns true if `this` range contains specified value

`1 <> 9 contains 3 lp // Prints: true`
Definition Classes
_Trait
7. def contains(that: Range[Time]): Boolean

Check if within

Check if within

Returns true if `this` range contains `that` range

```1 <> 9 contains 3 <> 7 lp // Prints: true

1 <> 5 contains 3 <> 7 lp // Prints: false```
Definition Classes
_Trait
8. def days: Idx[Day]
Definition Classes
Period
9. def duration
Definition Classes
Period
10. def endContains(v: Time, x: Boolean = false): Boolean
Attributes
protected
Definition Classes
Base
11. def endExclusive: Boolean

Exclusive check

Exclusive check

If true, the `end` value is exclusive

```10 <>> 15 contains 15 lp  // Prints: false

// Exclusive 15 does not contain 15```
Definition Classes
Period_Trait
12. final def eq(arg0: AnyRef): Boolean
Definition Classes
AnyRef
13. def equals(that: Any): Boolean
Definition Classes
Period → AnyRef → Any
14. def extendTo(a: Time)

Expand

Expand

`This` range is extended to contain the specified value

```'A' <> 'C' extendTo 'G' lp // Prints: A <> G

'A' <> 'C' extendTo 'B' lp // Prints: A <> C```
Definition Classes
_Trait
15. def finalize(): Unit
Attributes
protected[java.lang]
Definition Classes
AnyRef
Annotations
@throws( classOf[java.lang.Throwable] )
16. def format(fullSize: Boolean): String
Definition Classes
Period
17. def fullDay
Definition Classes
Period
18. def fullMonth
Definition Classes
Period
19. def fullYear
Definition Classes
Period
20. def hashCode(): Int
Definition Classes
AnyRef → Any
21. def ilk
Attributes
protected
Definition Classes
Period
22. def isFullDay: Boolean
Definition Classes
Period
23. def isFullMonth: Boolean
Definition Classes
Period
24. def isFullYear: Boolean
Definition Classes
Period
25. final def isInstanceOf[T0]: Boolean
Definition Classes
Any
26. def isSameDay: Boolean
Definition Classes
Period
27. def isSameMonth: Boolean
Definition Classes
Period
28. def isSameYear: Boolean
Definition Classes
Period
29. def join(that: Range[Time])

Union

Union

Returns range with out-most reaches of `this` and `that`

`'A' <> 'C' join 'X' <> 'Z'.lp  // Prints: A <> Z`
Definition Classes
_Trait
30. def lastDay
Definition Classes
Period
31. def make(start: Time, startExcl: Boolean, end: Time, endExcl: Boolean)
Attributes
protected
Definition Classes
Period → Base
32. def map[B](m: (Time) ⇒ B)(implicit s: Ordering[B]): Range[B]

Mapped Range

Mapped Range

Creates range with mapped values

`(1 <>> 5) map (_ * 100) lp  // Prints: 100 <>> 500`
Definition Classes
_Trait
33. final def ne(arg0: AnyRef): Boolean
Definition Classes
AnyRef
34. final def notify(): Unit
Definition Classes
AnyRef
35. final def notifyAll(): Unit
Definition Classes
AnyRef
36. def ordering: Ordering[Time]

Ordering

Ordering

Ordering defining range

Without Ordering cannot be defined

Definition Classes
Period_Trait
37. def overlapOpt(that: Range[Time])

Optional intersection

Optional intersection

Optionally returns common intersection of `this` and `that`

```1 <> 6 overlapOpt 3 <> 9 lp  // Prints: Opt(3 <>> 7)

1 <> 3 overlapOpt 6 <> 9 lp  // Prints: Opt.Void```
Definition Classes
_Trait
38. def startContains(v: Time, x: Boolean = false): Boolean
Attributes
protected
Definition Classes
Base
39. def startExclusive: Boolean

Exclusive check

Exclusive check

If true, the `start` value is exclusive

```10 <<> 15 contains 10 lp  // Prints: false

// Exclusive 10 does not contain 10```
Definition Classes
Period_Trait
40. final def synchronized[T0](arg0: ⇒ T0): T0
Definition Classes
AnyRef
41. def thisClass: Class[_]
Attributes
protected
Definition Classes
Period → Base
42. def toBrief: String
Definition Classes
Period
43. def toString(): String

String presentation

String presentation

`("AA" <> "BB").toString.lp  // Prints AA <> BB`
Definition Classes
Period_Trait → AnyRef → Any
44. final def wait(): Unit
Definition Classes
AnyRef
Annotations
@throws( ... )
45. final def wait(arg0: Long, arg1: Int): Unit
Definition Classes
AnyRef
Annotations
@throws( ... )
46. final def wait(arg0: Long): Unit
Definition Classes
AnyRef
Annotations
@throws( ... )

### Operator

1. final def !=(arg0: Any): Boolean
Definition Classes
AnyRef → Any
2. final def ##(): Int
Definition Classes
AnyRef → Any
3. final def ==(arg0: Any): Boolean
Definition Classes
AnyRef → Any
Linear Supertypes
Range[Time], Base[Time], AnyRef, Any
Source: Period.scala