createCalendarLikeMicrosoft: Create a calendar with weeks that match what the...

Description Usage Arguments Details Value Author(s)

View source: R/createCalendarLikeMicrosoft.R

Description

This function takes a starting year and a sub-group of year (i.e. week, month, quarter) and returns every date between that start year and today with a DateGroup.

Usage

1
createCalendarLikeMicrosoft(startYear, yearSubGroup)

Arguments

startYear

is a numeric value that is a real year

yearSubGroup

is a sub-group of a year, i.e. 'Week', 'Month', or 'Quarter'

Details

This function takes in a startYear and yearSubGroup and returns a data frame containing all the dates from the start of the startYear through today along with the year and yearSubGroup number. If the yearSubGroup is 'Week', then the function will return week numbers consistent with Microsoft's Excel WEEKNUM and SQL DATEPART(ww, ) functions.

Value

a data frame of dates starting at Jan 1 of the startYear and ending today, which the corresponding year and DateGroup (e.g. 2015-01 for Week 1 of 2015 if yearSubGroup = 'Week')

Author(s)

Aimie Faucett


BioAimie/dateManip documentation built on May 5, 2019, 3:46 p.m.