pandas.tseries.holiday.nearest_workday

pandas 3.1.1 · Date offsets and frequencies · function

Observe a Saturday holiday on Friday and a Sunday holiday on Monday.

Call syntax

holiday.nearest_workday(dt)

Run the example

Edit the example and select Run Python to see the result.

Parameters

ParameterRequirementAccepted values and behavior
dt Required
Positional or keyword
datetime

Provide the date or datetime for the boundary or offset calculation.

Returns

datetime