vali_dates: vali_dates

View source: R/vali_dates.R

vali_datesR Documentation

vali_dates

Description

This function ensures that functions have valid start and end dates. If onlydateStart is provided, endDate will be for 1 year later. If year is provided, dateStart and dateEnd will be Jan 1 and Dec 31 of that year, respectively.

Usage

vali_dates(dateStart = NULL, dateEnd = NULL, year = NULL, quietly = TRUE)

Arguments

dateStart

default is 'NULL'. This can be a date in the format of 'YYYY-MM-DD' or 'YYYY' (which will then become Jan 1st).

dateEnd

default is 'NULL'. This can be a date in the format of 'YYYY-MM-DD' or 'YYYY' (which will then become Dec 31st).

year

default is 'NULL'.

quietly

default is TRUE. When TRUE, no output will be shown.

Author(s)

Mike McMahon, Mike.McMahon@dfo-mpo.gc.ca

See Also

Other datesAndTimes: simple_date()


Maritimes/Mar.utils documentation built on Feb. 12, 2024, 11:38 p.m.