knitr::opts_chunk$set(echo = TRUE)
on_count
and on_repeat
on_wday()
really need start
? (NO IT DOESNT. There are always 7 days in a week. The 6th day of the week is always the same as the -2 day. Also, it would never make sense to do Sunday + start=FALSE, as that would look at Saturday?)week_start
on_year(<int>)
on_isoyear(<int>)
on_epiyear(<int>)
On the semester
on_semester_of_year(<int>)
on_semester()
Restrict to 1:2
On the quarter
on_quarter_of_year(<int>)
on_quarter(fiscal_start = 1)
Restrict to 1:4
On the month of the year
on_month_of_year(<int/chr>)
on_month()
on_ymonth()
on_month_of_quarter(<int>)
on_qmonth(<int>)
On the week of the year
on_week_of_year(<int>)
on_week()
on_yweek()
on_week_of_quarter(<int>)
on_qweek(<int>, start = FALSE/TRUE)
on_week_of_month(<int>)
on_mweek(<int>, start = FALSE/TRUE)
On the day of the year
on_day_of_year(<int>)
on_yday()
on_day_of_quarter(<int>)
on_qday()
on_day_of_month(<int>)
on_day()
on_mday(<int>, start = TRUE/FALSE)
on_day_of_week(<int>)
on_wday()
On the date
on_date(<date>)
Maybe these
on_hour_of_day(<int>)
on_hour()
On minute of the hour
on_minute_of_hour(<int>)
on_minute()
on_hminute()
on_minute_of_day()
on_dminute()
These are nice because you can say after_mday(15)
and not have to worry about
where the end of the month is. Or say after_mday(2, start = FALSE)
and again
be able to start from 2 days prior to the end of the month, wherever that is.
All of these functions should have an inclusive
boolean parameter as well.
Before the year
before_year(<int>)
before_isoyear(<int>)
before_epiyear(<int>)
Before the quarter
before_quarter_of_year(<int>)
before_quarter(fiscal_start = 1)
Restrict to 1:4
Before the month of the year
before_month_of_year(<int/chr>)
before_month()
before_ymonth()
before_month_of_quarter(<int>)
before_qmonth()
Before the week of the year
before_week_of_year(<int>)
before_week()
before_yweek(<int>, start = FALSE/TRUE)
before_week_of_quarter(<int>)
before_qweek(<int>, start = FALSE/TRUE)
before_week_of_month(<int>)
before_mweek(<int>, start = FALSE/TRUE)
Before the day of the year
before_day_of_year(<int>)
before_yday(<int>, start = FALSE/TRUE)
before_day_of_quarter(<int>)
before_qday(<int>, start = FALSE/TRUE)
before_day_of_month(<int>)
before_day(<int>, start = FALSE/TRUE)
before_mday(<int>, start = TRUE/FALSE)
before_day_of_week(<int>)
before_wday(<int>, start = FALSE/TRUE)
Before the date
before_date(<date>)
between_years(<int>, <int>)
between_isoyears(<int>, <int>)
between_epiyears(<int>, <int>)
Between two quarters
between_quarters(<int>, <int>)
Between two months in a year
between_months(<int/chr>, <int/chr>)
between_ymonths(<int/chr>, <int/chr>)
between_qmonths(<int>, <int>)
Between two weeks in a year
between_weeks(<int>, <int>)
between_yweeks(<int>, <int>, start = TRUE/FALSE)
between_qweeks(<int>, <int>, start = TRUE/FALSE)
between_mweeks(<int>, <int>, start = TRUE/FALSE)
Between two days in a year
between_days(<int>, <int>)
between_ydays((<int>, <int>)
between_qdays(<int>, <int>)
between_mdays(<int>, <int>, start = TRUE/FALSE)
between_wdays(<int>, <int>)
Allow normalizing
Between two dates
between_dates(<date>, <date>)
"Between 12th of January and 25th of October"
Shortcuts
on_weekdays()
on_weekends()
On N-th occurance of event
within the within
on_count()
On N-th repeat of event
since the since
value
on_repeat()
Note:
on_repeat(event, n, from, to)
on_repeat()
would be on_repeat(from = since, to = NULL)
on_count()
would be like on_repeat(from = "month_start", to = "month_end")
on_repeat(from = "2000-01-01", to = ~max(.x))
on_repeat(from = ~floor_date(.x, "month"), to = ~ceiling_date(.x, "month"))
Hopefully not required, and replaceable with on_wday()
and on_mweek()
"On the second monday of the month"
on_wday("Monday") & on_mweek(2)
"On the last Thursday of the month"
on_wday("Thursday") & on_mweek(1, start = FALSE)
"On the first Thursday of the quarter"
on_wday("Thursday") & on_qweek(1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.