Exercise

Outputting pretty dates and times

An easy way to output dates is to use the stamp() function in lubridate. stamp() takes a string which should be an example of how the date should be formatted, and returns a function that can be used to format dates.

In this exercise you'll practice outputting today() in a nice way.

Instructions

100 XP
  • Create a stamp() based on the string "Saturday, Jan 1, 2000".
  • Print date_stamp. Notice it is a function.
  • Pass today() to date_stamp to format today's date.
  • Now output today's date in American style MM/DD/YYYY.
  • Finally, use stamp based on the finished string I've put in your workspace to format today().