DecimalDay: Convert the day of the year in decimal value

Description Usage Arguments Examples

Description

Return the decimal value of a day of the years. Take the leap year into account. The formula is (i-0.5)/n where i is the day of the year and n is the total number of days (365 or 366).

Usage

1

Arguments

x

Examples

1
2
3
4
5
6
DecimalDay(as.Date("2000-1-1")) ## leap year
DecimalDay(as.Date("2001-1-1"))
x <- as.Date("2001-5-13")
DecimalDay(x)
DecimalDay(x) * 365
format(x,'%j')

martindurocher/floodRFA documentation built on June 5, 2019, 8:44 p.m.