dates: date routines

Description Usage Arguments Value Examples

Description

Simple helper functions for conversion between day of year number to date and back, and extraction of parts of a date.

Usage

1
2
3
4
5
6
7

Arguments

doy

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

year

year, e.g. 1982

date

date (Date or character class) as 'yyyy-mm-dd', e.g. '1982-11-23'

Value

Day of the year 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)

weather documentation built on May 2, 2019, 4:56 p.m.