Berserk Docs
Scalar FunctionsMath Functions

bin

Round values down to a bin of a given bin size.

Syntax

bin(value, round_to)

Parameters

Prop

Type

Returns: dynamic

Examples

Example 1

print bin(datetime(2024-06-08 14:30:00), 1d) // bin the Lindisfarne raid to the day
print_0 (datetime)
2024-06-08T00:00:00Z

On this page