Learn R Programming

tidytuesdayR (version 1.2.0)

last_tuesday: Find the most recent tuesday

Description

Identify the most recent 'TidyTuesday' date relative to a specified date.

Usage

last_tuesday(date = today(tzone = "America/New_York"))

Value

The TidyTuesday date in the same week as the specified date, using Monday as the start of the week.

Arguments

date

A date as a date object or character string in YYYY-MM-DD format. Defaults to today's date.

Examples

Run this code
last_tuesday() # get last Tuesday relative to today's date
last_tuesday("2020-01-01") # get last Tuesday relative to a specified date

Run the code above in your browser using DataLab