Description Usage Arguments Details Value Examples
View source: R/days_since_month.R
An a-historical method to calculate pentades by calculating distance from a given calendar month.
1 | days_since_month(date, start_month = 7)
|
date |
A 'date' object. This can be a single date or a vector of dates. |
start_month |
An integer between 1 and 12 (inclusive) that indicates the month you want to measure distance in days from. Default is 7. |
This functions assumes that all years are 365 days. Necessary corrections for leap years are made.
This function returns an integer between 1 and 365 indicating the number of days elapsed since the first of the month indicated in 'start_month'
1 2 3 4 5 6 | # single date conversion example
days_since_month(date = as.Date('2018-09-14'), start_month = 7)
# multiple dates conversion examples
sequence_of_dates <- c(as.Date("2019-01-01"), as.Date("2019-03-19"))
days_since_month(date = sequence_of_dates, start_month = 6)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.