days_in_fq | R Documentation |
For working with KH03, quarters are in format "yyyyq". Want number of days per quarter and this varies by leap year. This method takes leap year into account.
days_in_fq(x)
x |
A financial year quarter in format "yyyyq" |
Note: This function must be used in conjunction with rowwise
from dplyr or sapply
.
The number of days in the quarter, accounting for leap years.
days_in_fq("20131")
days_in_fq("20134")
# 2016 is a leap year, should have 91 days in quarter 1 (i.e. 20154)
days_in_fq("20154")
x <- data.frame(fyear = c(20151, 20152, 20153, 20154))
x$days <- days_in_fq(x$fyear)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.