truncateCalendar
fn
Series truncateCalendar(Series s, CalendarUnit unit)Truncates each value to a calendar boundary (ADR-2026-10-30-02): YEAR, QUARTER, MONTH, WEEK (Monday-anchored, the ISO convention) or DAY, in UTC. On DATETIME the time of day clears to midnight (DAY) or the boundary instant; on DATE the day floors to the boundary day. Nulls propagate.
Parameters
s | the DATETIME or DATE Series |
unit | the calendar boundary |
Returns
the truncated Series (same kind).
Throws
DataFrameException on non-calendar kinds.