def nearest_workday(dt):
if dt.weekday() == <NUM_LIT:5>:<EOL><INDENT>return dt - timedelta(<NUM_LIT:1>)<EOL><DEDENT>elif dt.weekday() == <NUM_LIT:6>:<EOL><INDENT>return dt + timedelta(<NUM_LIT:1>)<EOL><DEDENT>return dt<EOL>
If holiday falls on Saturday, use day before (Friday) instead;
if holiday falls on Sunday, use day thereafter (Monday) instead.