Time
- Source
- __.scala
Member
DayTime is an opaque Long value holding nanoseconds since midnigth
Time within Day
DayTime is an opaque Long value holding nanoseconds since midnigth
- Source
- DayTime.scala
DayTime is an opaque Long value holding nanoseconds since midnigth
Time within Day
DayTime is an opaque Long value holding nanoseconds since midnigth
- Source
- DayTime.scala
Greenwich Mean Time
Time.Gmt is an opaque Long value same as Time, but not localized for printing
val time = Time()
val gmt = Time.Gmt()
time.dayTime.toBrief.tp // Prints: 13:34
gmt.dayTime.toBrief.tp // Prints: 17:34
// Nevertheless they are data equal
(time.real == gmt.real).tp // Prints: true
- Source
- Gmt.scala
Greenwich Mean Time
Time.Gmt is an opaque Long value same as Time, but not localized for printing
val time = Time()
val gmt = Time.Gmt()
time.dayTime.toBrief.tp // Prints: 13:34
gmt.dayTime.toBrief.tp // Prints: 17:34
// Nevertheless they are data equal
(time.real == gmt.real).tp // Prints: true
- Source
- Gmt.scala
Time.Instant is an opaque Long value, holding nanoseconds since start of 1970
Time.Instant is an opaque Long value, holding nanoseconds since start of 1970
General timing in scalqa
is done with millisecond precision and it is sufficient for most scenarios.
Occasionally, however, nanosecond precision is required, and Time.Instant fills the gap:
val t : Time = CURRRENT
val i : Instant = CURRRENT
t.tp // Printed: 2021-01-21 09:36:31.761
i.tp // Printed: 2021-01-21 09:36:31.766.000.000
Note. Time.Instant is limited to range of years from 1677 to 2260
- Source
- Instant.scala
Time.Instant is an opaque Long value, holding nanoseconds since start of 1970
Time.Instant is an opaque Long value, holding nanoseconds since start of 1970
General timing in scalqa
is done with millisecond precision and it is sufficient for most scenarios.
Occasionally, however, nanosecond precision is required, and Time.Instant fills the gap:
val t : Time = CURRRENT
val i : Instant = CURRRENT
t.tp // Printed: 2021-01-21 09:36:31.761
i.tp // Printed: 2021-01-21 09:36:31.766.000.000
Note. Time.Instant is limited to range of years from 1677 to 2260
- Source
- Instant.scala
Time.Length is an opaque Long value, holding total nanoseconds
Time.Length is an opaque Long value, holding total nanoseconds
Time.Length constructor methods are attached to primitives:
1.Day.tp // Prints: 1 day
33.Millis.tp // Prints: 0.033 sec
10.Hours.tp // Prints: 10 hours
99999.Nanos.tp // Prints: 0.000099999 sec
Longest Time.Length possible is:
Long.max.Nanos.tp // Prints: 106751 days 23 hours 47 mins 16.854775807 secs
- Source
- Length.scala
Time.Length is an opaque Long value, holding total nanoseconds
Time.Length is an opaque Long value, holding total nanoseconds
Time.Length constructor methods are attached to primitives:
1.Day.tp // Prints: 1 day
33.Millis.tp // Prints: 0.033 sec
10.Hours.tp // Prints: 10 hours
99999.Nanos.tp // Prints: 0.000099999 sec
Longest Time.Length possible is:
Long.max.Nanos.tp // Prints: 106751 days 23 hours 47 mins 16.854775807 secs
- Source
- Length.scala
Def
Format
Format
Formats time with given pattern
See java.text.SimpleDateFormat for details
val t: Time = \/
t.format("hh 'o`clock' a, z z z z") tp // Prints: 07 o'clock PM, Eastern Standard Time
t.format("yyyy.MM.dd G 'at' HH:mm:ss z") tp // Prints: 1969.12.31 AD at 19:00:00 EST
t.format("EEE, MMM d, `yy") tp // Prints: Wed, Dec 31, '69
t.format("h:mm a") tp // Prints: 7:00 PM
- Source
- __.scala
Skip to next
Skip to next
Finds next greater instance of time with given DayTime
Note: The result may skip to next day
val time = 2018.Year.start
time tp // Prints: 2018-01-01 0:00:00
time.skipTo(16.Hours) tp // Prints: 2018-01-01 16:00:00
time.skipTo(16.Hours).skipTo(10.Hours) tp // Prints: 2018-01-02 10:00:00
- Source
- __.scala
Inherited
Less
Less
Returns true
if current value is less than given, false
- otherwise
- Inherited from
- Ordered
- Source
- Ordered.scala
Less or equal
Less or equal
Returns true
if current value is less or equal to given, false
- otherwise
- Inherited from
- Ordered
- 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
- Ordered
- Source
- Ordered.scala
Greater
Greater
Returns true
if current value is greater than given, false
- otherwise
- Inherited from
- Ordered
- Source
- Ordered.scala
Greater or equal
Greater or equal
Returns true
if current value is greater or equal to given, false
- otherwise
- Inherited from
- Ordered
- Source
- Ordered.scala
Day count
Day count
Total days (24.Hours) which fit in this
time unit
- Inherited from
- Millis
- Source
- Millis.scala
Hours remainder
Hours remainder
Hours remainder when rounded by whole day (24 hours)
Value range is from 0 to 23
- Inherited from
- Millis
- Source
- Millis.scala
Hours count
Hours count
Total hours which fit in this
time unit
- Inherited from
- Millis
- Source
- Millis.scala
Type to Info
Type to Info
Override this method to provide type standard Info implementation
- Inherited from
- Type
- Source
- Type.scala
Check if in future.
Check if in future.
Returns true
if this time is greater than current.
- Inherited from
- Base
- Source
- Base.scala
Check if in past.
Check if in past.
Returns true
if this time is less or equal to current.
- Inherited from
- Base
- Source
- Base.scala
Range duration
Range duration
Returns Length between this
and that
.
- Inherited from
- Base
- Source
- Base.scala
Microseconds remainder
Microseconds remainder
Microseconds remainder when rounded by whole millisecond
Value range is from 0 to 999
- Inherited from
- Millis
- Source
- Millis.scala
Microseconds count
Microseconds count
Total microseconds which fit in this
time unit
- Inherited from
- Millis
- Source
- Millis.scala
Milliseconds remainder
Milliseconds remainder
Milliseconds remainder when rounded by whole second
Value range is from 0 to 999
- Inherited from
- Millis
- Source
- Millis.scala
Minutes remainder
Minutes remainder
Minutes remainder when rounded by whole hour
Value range is from 0 to 59
- Inherited from
- Millis
- Source
- Millis.scala
Minutes count
Minutes count
Total minutes which fit in this
time unit
- Inherited from
- Millis
- Source
- Millis.scala
Month.
Month.
Month, which includes this
time instance.
- Inherited from
- Base
- Source
- Base.scala
Nanoseconds remainder
Nanoseconds remainder
Nanoseconds remainder when rounded by whole microsecond
Value range is from 0 to 999
- Inherited from
- Millis
- Source
- Millis.scala
Nanoseconds count
Nanoseconds count
Total nanoseconds which fit in this
time unit
Note: Maximum duration expressed in nanoseconds is "7331 days, 10 hours, 50 mins, 44.854775807 secs". Unboxed over will cause problems
- Inherited from
- Millis
- Source
- Millis.scala
Seconds remainder
Seconds remainder
Seconds remainder when rounded by whole minute
Value range is from 0 to 59
- Inherited from
- Millis
- Source
- Millis.scala
Seconds count
Seconds count
Total seconds which fit in this
time unit
- Inherited from
- Millis
- Source
- Millis.scala
Short String.
Short String.
Time is rounded to 1.Second.
For current Day, day portion is ommited.
- Inherited from
- Base
- Source
- Base.scala
Year.
Year.
Year, which includes this
time instance.
- Inherited from
- Base
- Source
- Base.scala