I have data like this:
sample_data <- c("Sun 11.30am", "Tues 01.00pm", "Mon 10.00am", "Sun 01.30am", "Thurs, 02.30pm")
I want to return the year/month/day/time based on the weekdays, assuming the weekday is the next occurrence of the day (desired data is based on the date I posted this question, friday March 17):
desired_data <- c("2023-03-19 11:30AM", "2023-03-21 01:00PM", "2023-03-20 10:00AM","2023-03-19 01:30AM","2023-03-23 02:30PM")
Is there an easy R function to do this? Thanks!