I have list of days when wages are taken
e.g. wages_days <- "Tuesday,Thursday"
I want to compare wages between the two days
for example if we run wages today 17/05/2022 which is a tuesday I want to know the previous date in the list which will of course be Thursday 12/05/2022
So if we know the date which is todays date which we can calculate is a tuesday using R how do we find the date for the previous thursday
the list could change
ie e.g. wages_days <- "Monday,Tuesday,Thursday"
Thanks