get_date_info: Get date information (year, month, mday, yday)

Description Usage Arguments Value Examples

View source: R/get_date_info.R

Description

Get date information (year, month, mday, yday)

Usage

1
get_date_info(.date, .output = "list")

Arguments

.date

(vector of dates)

Value

list with named entries with information extracted from the date, e.g. year, month, day of month and year day. If a year is a leapyear all dates after 29th February will have a yday minus 1, so e.g. 1.March will have the same yday independent if it is leapyear or not.

Examples

1
2
3
4
5
6
get_date_info(c("2013-05-04", "2016-01-09"))
get_date_info(c(NA, "2016-03-09"))

# Behaviour for leap years
get_date_info("2016-03-01")
get_date_info("2017-03-01")

markusdumke/lepidisthelper documentation built on Oct. 21, 2019, 3:54 a.m.