date_diff | R Documentation |
Determine the number of years between two dates
date_diff(date1, date2 = tidyged::date_current(), minimise = TRUE)
date1 |
A date string from the tidyged object. |
date2 |
A date string from the tidyged object. If no date is given, today's date is used. |
minimise |
If date ranges or periods are used in the dates, whether to choose the bounds which assume the minimum date difference. If this is FALSE, the maximum date difference is assumed. |
Doesn't yet handle dual years or BCE dates.
A numeric value giving the number of years. A numeric value less than zero means no determination could be made.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.