Skip to main content

truncate_date

Function truncate_date 

Source
pub fn truncate_date(days: i64, unit: &str) -> Option<i64>
Expand description

Truncate a date to the start of a unit (openCypher date.truncate(unit, …)): millennium/century/decade round the year down; year/month/quarter → the first day of that period; weekYear → the Monday of ISO week 1; week → the Monday of the date’s week; day → the date itself. The optional override map is applied afterwards via project_date. None for an unknown unit. (#920)