I'm not sure I understand. Are there circumstances where your data includes entries for a date that doesn't occur on the calendar (like 2018-02-29)?
Your original approach, of plotting dates as if they were in 2020 (a leap year), seems to me the only kind of approach that will let you directly compare July 12 in one year to July 12 in another.
In my own experience looking at daily time series with a strong weekly pattern, it has been more important to preserve day-of-week alignment than date name alignment. For instance, when looking at Thursday 2018-7-12, I'm usually more interested in how it compares to Thursday 2017-07-13 than I am in comparing it to Wednesday 2017-07-12.
To do that, I've employed a function like below, which finds the closest shift (+/- 3 days) that brings the date into alignment with a given year:
date_align <- function(date, year = 2018) {
date_wday_align = floor_date(date, "1 year") %>% wday()
trgt_wday_align = ymd(paste(align_yr, "0101")) %>% wday()
adjustment = ((date_wday_align - trgt_wday_align + 3) %% 7) - 3
aligned_date = ymd(paste(align_yr, month(date), day(date))) + adjustment
}
While this changes most dates' appearance (in many cases into different months, sometimes even into different years), it more often results in more apples-to-apples comparisons on a weekly scale.
d = tibble(day = sample(1:7, n, replace = TRUE),
month = sample(c(1,1), n, replace = TRUE),
year = sample(2010:2020,n, replace = TRUE) %>% factor,
date = paste(day, month, year, sep = '-') %>% dmy,
value = rnorm(n),
date_x2 = dmy(paste(day, month, align_yr)),
date_align = date_align(date, 2018),
# Diagnostics
name_adj = yday(date_align) - yday(date),
wday_error = wday(date_align) - wday(date)
)