dates: date manipulation

Description Usage Arguments Value Examples

Description

Helper functions for manipulation of dates, includding conversion between (day of year) (DOY) to date and back, and extraction of parts of a date.

Usage

1
2
3
4
5
6
7

Arguments

doy

integer. Day of the year (1..365) or (1..366) for leap years

year

integer. Year, e.g. 1982

date

Date object or character formatted 'yyyy-mm-dd', e.g. '1982-11-23'

Value

integer or Date

Examples

1
2
3
4
5
6
7
8
9
doy <- 88
year <- 1970
date <- dateFromDoy(doy, year)
date
dateFromDoy(-15, 2000)
doyFromDate(date)
isLeapYear(2000)
daysInYear(2000)
daysInYear(1999)

Example output

[1] "1970-03-29"
[1] "1999-12-16"
[1] 88
[1] TRUE
[1] 366
[1] 365

meteor documentation built on May 2, 2019, 4:52 p.m.