truncateCalendar

fnSeries 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

sthe DATETIME or DATE Series
unitthe calendar boundary

Returns

the truncated Series (same kind).

Throws

DataFrameException on non-calendar kinds.