Skip to main content

get_time_bar_start

Function get_time_bar_start 

Source
pub fn get_time_bar_start(
    now: Timestamp,
    bar_type: &BarType,
    time_bars_origin: Option<SignedDuration>,
) -> Timestamp
Expand description

Returns the time bar start as a timezone-aware Timestamp.

ยงPanics

Panics if computing the base civil date or datetime from now fails, if step cannot be represented for the calendar arithmetic, or if the aggregation type is unsupported.