The TimeNum
class is used to represent and operate on date-time numbers. Internally, a date-time number is represented as an Instant
.
Value parameters
- inst
-
the underlying
Instant
of time
Attributes
- Companion
- object
- Graph
-
- Supertypes
Members list
Value members
Constructors
Construct a TimeNum
object from the given date-time by taking a ZonedDateTime
and converting it to the corresponding Instant
, the underlying type of TimeNum
class.
Construct a TimeNum
object from the given date-time by taking a ZonedDateTime
and converting it to the corresponding Instant
, the underlying type of TimeNum
class.
Value parameters
- dt
-
the given date-time
Attributes
Construct a TimeNum
object from the given date-time by creating a ZonedDateTime
from the string and converting it to the corresponding Instant
, the underlying type of TimeNum
class. Format it using dtPattern.
Construct a TimeNum
object from the given date-time by creating a ZonedDateTime
from the string and converting it to the corresponding Instant
, the underlying type of TimeNum
class. Format it using dtPattern.
Value parameters
- dt
-
the given date-time as a string
- dtPattern
-
the given date-time pattern/format
Attributes
Concrete methods
Return whether two TimeNum
numbers not are nearly equal.
Return whether two TimeNum
numbers not are nearly equal.
Value parameters
- t
-
compare this with t
Attributes
Return whether two TimeNum
numbers are nearly equal.
Return whether two TimeNum
numbers are nearly equal.
Value parameters
- t
-
the TimeNum to compare with this
Attributes
Compare two TimeNum
numbers (negative for <, zero for ==, positive for >).
Compare two TimeNum
numbers (negative for <, zero for ==, positive for >).
Value parameters
- t
-
the TimeNum number to compare with this
Attributes
Compare two TimeNum
numbers (negative for <, zero for ==, positive for >).
Compare two TimeNum
numbers (negative for <, zero for ==, positive for >).
Value parameters
- s
-
the first TimeNum number
- t
-
the second TimeNum number
Attributes
Divide this TimeNum
by TimeNum
t.
Divide this TimeNum
by TimeNum
t.
Value parameters
- t
-
the TimeNum that divides this
Attributes
Override equals to determine whether this date-time number equals date-time t.
Override equals to determine whether this date-time number equals date-time t.
Value parameters
- t
-
the date-time number to compare with this
Attributes
- Definition Classes
-
Comparator -> Any
Get a temporal aspect (e.g., month, week, day, hour, ...).
Get a temporal aspect (e.g., month, week, day, hour, ...).
Value parameters
- chrono
-
the enumeration type specifying the aspect to return
Attributes
- See also
-
https://docs.oracle.com/en/java/javase/17/docs/api//java.base/java/time/ZonedDateTime.html Currently only four (INSTANT_SECONDS, MICRO_OF_SECOND, MILLI_OF_SECOND, NANO_OF_SECOND) of the enumeration values are implemented, but ScalaTion adds seven more (see below).
Must also override hashCode to be compatible with equals.
Must also override hashCode to be compatible with equals.
Attributes
- Definition Classes
-
Any
Determine whether this is within the given bounds
Determine whether this is within the given bounds
Value parameters
- lim
-
the given (lower, upper) bounds
Attributes
Determine whether this is in the given set.
Determine whether this is in the given set.
Value parameters
- lim
-
the given set of values
Attributes
Return the maximum of this and t TimeNum
numbers.
Return the maximum of this and t TimeNum
numbers.
Value parameters
- t
-
the TimeNum number to compare with this
Attributes
Return the minimum of this and t TimeNum
numbers.
Return the minimum of this and t TimeNum
numbers.
Value parameters
- t
-
the TimeNum number to compare with this
Attributes
Subtract TimeNumt from this
TimeNum`.
Subtract TimeNumt from this
TimeNum`.
Value parameters
- t
-
the TimeNum to subtract from this
Attributes
Compute the unary minus (-).
Compute the unary minus (-).
Attributes
Determine whether this is not within the given bounds
Determine whether this is not within the given bounds
Value parameters
- lim
-
the given (lower, upper) bounds
Attributes
Determine whether this is not in the given set.
Determine whether this is not in the given set.
Value parameters
- lim
-
the given set of values
Attributes
Parse the string to create a time number.
Parse the string to create a time number.
Attributes
Add this TimeNum
and TimeNum
t. The seconds and nanoseconds are added separately, with carry from nanoseconds handled.
Add this TimeNum
and TimeNum
t. The seconds and nanoseconds are added separately, with carry from nanoseconds handled.
Value parameters
- t
-
the TimeNum to add to this
Attributes
Multiply this TimeNum
and TimeNum
t.
Multiply this TimeNum
and TimeNum
t.
Value parameters
- t
-
the TimeNum that multiplies this
Attributes
Convert the given TimeNum
number to a Double
.
Convert the given TimeNum
number to a Double
.
Value parameters
- t
-
that date-time number to convert
Attributes
Convert this TimeNum
number to a Float
.
Convert this TimeNum
number to a Float
.
Value parameters
- t
-
that date-time number to convert
Attributes
Convert this TimeNum
number to an Int
.
Convert this TimeNum
number to an Int
.
Value parameters
- t
-
that date-time number to convert
Attributes
Convert this TimeNum
number to a Long
.
Convert this TimeNum
number to a Long
.
Value parameters
- t
-
that date-time number to convert
Attributes
Convert this date-time number to a String.
Convert this date-time number to a String.
Attributes
- Definition Classes
-
Any
Convert this date time number to a String in the format specified by the user, use DEFAULT_DATETIME_FORMAT if user does not specify any format.
Convert this date time number to a String in the format specified by the user, use DEFAULT_DATETIME_FORMAT if user does not specify any format.
Value parameters
- format
-
the format to be used
Attributes
Convert this date-time number to a TimeNum
.
Convert this date-time number to a TimeNum
.
Attributes
Raise this TimeNum
to power TimeNum
t.
Raise this TimeNum
to power TimeNum
t.
Value parameters
- t
-
the TimeNum that raises this
Attributes
Compare this TimeNum
number with that date-time number t for inequality.
Compare this TimeNum
number with that date-time number t for inequality.
Value parameters
- t
-
that TimeNum number
Attributes
Compare this TimeNum
number with that date-time number t for less than or equal to.
Compare this TimeNum
number with that date-time number t for less than or equal to.
Value parameters
- t
-
that TimeNum number
Attributes
Inherited methods
Attributes
- Definition Classes
-
Ordering -> PartialOrdering -> Equiv
- Inherited from:
- Ordering
Attributes
- Definition Classes
-
Ordering -> PartialOrdering
- Inherited from:
- Ordering
Attributes
- Definition Classes
-
Ordering -> PartialOrdering
- Inherited from:
- Ordering
Attributes
- Inherited from:
- Ordering
Attributes
- Definition Classes
-
Ordering -> PartialOrdering
- Inherited from:
- Ordering
Attributes
- Definition Classes
-
Ordering -> PartialOrdering
- Inherited from:
- Ordering
Attributes
- Inherited from:
- Ordering
Attributes
- Definition Classes
-
Ordering -> PartialOrdering
- Inherited from:
- Ordering
Attributes
- Inherited from:
- Comparator
Attributes
- Inherited from:
- Comparator
Attributes
- Inherited from:
- Comparator
Attributes
- Inherited from:
- Comparator
Attributes
- Inherited from:
- Comparator
Attributes
- Inherited from:
- Comparator
Attributes
- Inherited from:
- Ordering
Concrete fields
Implicits
Inherited implicits
Attributes
- Inherited from:
- Numeric
Attributes
- Inherited from:
- Ordering