def previous_workday(dt):
    dt -= timedelta(days=1)
    while dt.weekday() > 4:
        # Mon-Fri are 0-4
        dt -= timedelta(days=1)
    return dt
Set the contents of the template used to draw the custom layout.
dataset/ETHPy150Open pydata/pandas/pandas/tseries/holiday.py/previous_workday--crossover with--dataset/ETHPy150Open rwl/muntjac/muntjac/ui/custom_layout.py/CustomLayout.setTemplateContents