Given a date, figure out which weekday it was, then write a positive message.
weekday_praise(date = Sys.Date())
A base::Date
object or a character()
in a format that can be
converted to a base::Date
object with base::as.Date()
.
Returns a character(1)
with a message praising the weekday of the
input date
.
## Praise the current weekday
weekday_praise()
#> [1] "Tuesday: You are hunky-dory!"
## Praise the date we started teaching
weekday_praise("2024-06-09")
#> [1] "Sunday: You are epic!"
## Praise the current weekday in a reproducible way
set.seed(20240610)
weekday_praise()
#> [1] "Tuesday: You are wondrous!"
## Verify that it's reproducible
set.seed(20240610)
weekday_praise()
#> [1] "Tuesday: You are wondrous!"