struct

Crysda::TimestampCol

Inherits Crysda::DataCol / Struct / Value / Object

=========================================================================== TimestampCol - nanosecond precision time column Stores Unix epoch nanoseconds as Int128

Constants

NANO_FORMATS = ["%Y-%m-%d %H:%M:%S.%N", "%Y-%m-%dT%H:%M:%S.%N", "%Y-%m-%dT%H:%M:%S.%NZ", "%d/%m/%Y %H:%M:%S.%N", "%m/%d/%Y %H:%M:%S.%N"]

Nanosecond-level formats for parsing

Constructors

from_epoch_ns(name : String, epochs : Array(Int128 | Nil)) : TimestampCol

Create from array of epoch nanoseconds

Source
new(name : String, val : Array(Time | Nil))
Source
parse(name : String, strings : Array(String | Nil), format : String | Nil = nil) : TimestampCol

Parse strings with nanosecond formats

Source

Instance methods

<(val : Time)
Source
<=(val : Time)
Source
==(val : Time)
Source
>(val : Time)
Source
>=(val : Time)
Source
compare(left : Int32, right : Int32, null_last = true) : Int32
Source
day_of_week
Source
day_of_year
Source
each
Source
each_non_null
Source
each_with_index
Source
has_nulls?
Source
hour
Source
max(remove_na = false) : Time

Get max timestamp

Source
microsecond
Source
millisecond
Source
min(remove_na = false) : Time

Get min timestamp

Source
minute
Source
month
Source
nanosecond
Source
second
Source
strftime(format : String) : StringCol

Format as strings

Source
to_datetime(name : String = @name) : DateTimeCol
Source
unsafe_fetch(index : Int32) : Time | Nil
Source
values
Source
year

Extract year component

Source