The TimeNum
companion object is used to represent and operate on date-time values. It contains an implicit class definition for TimeNum
, which extends Instant
with Numeric
operations that can be used in VectorT
. The java.time.Instant
class stores nano-seconds since the UNIX Epoch using a long
for seconds and int
for nano-seconds (12 bytes or 96 bits). The java.time.ZonedDateTime
class is used with it to handle various date-time formats.
Attributes
Members list
Value members
Concrete methods
Return the absolute value of that date-time number.
Return the absolute value of that date-time number.
Value parameters
- t
-
that date-time number
Attributes
Create a TimeNum
object from Number of seconds that have elapsed since January 1, 1970 UTC.
Create a TimeNum
object from Number of seconds that have elapsed since January 1, 1970 UTC.
Value parameters
- ns
-
the number of nano-seconds
- sec
-
the number of seconds
Attributes
Create a TimeNum
object by adding default time values.
Create a TimeNum
object by adding default time values.
Value parameters
- dt
-
the date-time in string format
- dtPattern
-
the pattern/format for the date-time
Attributes
Create a TimeNum
object by adding some default time values, this version does not accept date pattern from user, it makes a best guess.
Create a TimeNum
object by adding some default time values, this version does not accept date pattern from user, it makes a best guess.
Value parameters
- dt_
-
the date-time in string format
Attributes
Convert from Double
to TimeNum
.
Convert from Double
to TimeNum
.
Value parameters
- d
-
the Double parameter to convert
Attributes
Create a TimeNum
number from a Double
, where the seconds are extracted from the whole number part and the nanoseconds from the fractional part.
Create a TimeNum
number from a Double
, where the seconds are extracted from the whole number part and the nanoseconds from the fractional part.
Value parameters
- d
-
the source double
Attributes
Create a TimeNum
number from an Int
, where the seconds are given by n and the default (0) is used for the nanoseconds.
Create a TimeNum
number from an Int
, where the seconds are given by n and the default (0) is used for the nanoseconds.
Value parameters
- n
-
the source integer
Attributes
Create a TimeNum
number from a ValueType
holding a TimeNum
.
Create a TimeNum
number from a ValueType
holding a TimeNum
.
Value parameters
- dt
-
the date-time as a
ValueType
Attributes
Return the maximum of two date-time number, s and t.
Return the maximum of two date-time number, s and t.
Value parameters
- s
-
the first date-time number to compare
- t
-
the second date-time number to compare
Attributes
Return the minimum of two date-time numbers, s and t.
Return the minimum of two date-time numbers, s and t.
Value parameters
- s
-
the first date-time number to compare
- t
-
the second date-time number to compare
Attributes
Set the threshold to value more suitable to the current application.
Set the threshold to value more suitable to the current application.
Value parameters
- thres
-
the new value for the threshold
Attributes
Return the signum (sgn) of a TimeNum
.
Return the signum (sgn) of a TimeNum
.
Value parameters
- t
-
the date-time to obtain the signum of
Attributes
Concrete fields
Default date-time format month, day, year, hour (24), minute, second, nano-seconds zone
Default date-time format month, day, year, hour (24), minute, second, nano-seconds zone
Attributes
Define the default time zone to be Coordinated Universal Time (UTC). UTC is the successor to Greenwich Mean Time (GMT) that was developed at Royal Observatory in Greenwich, UK (0° longitude). UTC does not observe Daylight Savings Time and serves as universal time across regions/time zones.
Define the default time zone to be Coordinated Universal Time (UTC). UTC is the successor to Greenwich Mean Time (GMT) that was developed at Royal Observatory in Greenwich, UK (0° longitude). UTC does not observe Daylight Savings Time and serves as universal time across regions/time zones.
Attributes
- See also
-
en.wikipedia.org/wiki/Coordinated_Universal_Time
TimeNum (0) as a date-time corresponding to 01-01-1970 00:00:00 UTC, the UNIX Epoch (00:00:00 UTC on Thursday, 1 January 1970)
TimeNum (0) as a date-time corresponding to 01-01-1970 00:00:00 UTC, the UNIX Epoch (00:00:00 UTC on Thursday, 1 January 1970)
Attributes
TimeNum (1) as a date-time corresponding to 01-02-1970 00:00:00 UTC NoteL: _1 was arbitrarily chosen as one day rather than another time unit
TimeNum (1) as a date-time corresponding to 01-02-1970 00:00:00 UTC NoteL: _1 was arbitrarily chosen as one day rather than another time unit
Attributes
Nano-seconds must be strictly than this limit (billion nanoseconds = 1 second)
Nano-seconds must be strictly than this limit (billion nanoseconds = 1 second)