%!demo
%! ## `dateshift` snaps a datetime to a calendar boundary — the start or end of
%! ## a unit such as the month.
%!
%! t = datetime (2024, 3, 15, 10, 30, 0)
%! dateshift (t, 'start', 'month')
%! dateshift (t, 'end', 'month')

%!demo
%! ## The `'dayofweek'` mode moves to the next occurrence of a weekday, keeping
%! ## the time of day.
%!
%! t = datetime (2024, 3, 15, 10, 30, 0)
%! dateshift (t, 'dayofweek', 'Monday')
