Description Usage Arguments Examples
This function takes a vector of dates and returns either the fiscal year, month, or week, or months, weeks, or days since the start of the fiscal year.
1 | ToFiscalDate(date, start.month = 7, output = "year")
|
date |
Dates to be parsed |
start.month |
Starting month number of the fiscal year; defaults to 7 (July) |
output |
Output format, including |
1 2 3 4 5 6 7 8 9 10 11 | (dts <- ToDate(paste("2012", 1:12, 1, sep="-")))
ToFiscalDate(dts)
# Return fiscal year by default
ToFiscalDate(dts, start.month=9, output="month")
# Return fiscal month number
ToFiscalDate(dts, start.month=1, output="week")
ToFiscalDate(dts, start.month=1, output="weeks")
# 'week' returns week number while 'weeks' returns weeks elapsed
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.