yday_dbl: Compute the fraction of the year (days)

View source: R/time_categories.R

yday_dblR Documentation

Compute the fraction of the year (days)

Description

This function computes the Julian day on inputted times/dates as a fraction of the total number of days in each year.

Usage

yday_dbl(time)

Arguments

time

A vector of time(s) of class Date or DateTimeClasses.

Value

The function returns a number for each element in time which is the Julian day as a fraction of the total number of days in that year.

Author(s)

Edward Lavender

Examples

# Compare the start of a non-leap and leap year:
yday_dbl(as.Date("2015-01-01"))
yday_dbl(as.Date("2016-01-01"))
# The end of the year
yday_dbl(as.Date("2015-12-31"))
yday_dbl(as.Date("2015-12-31"))

edwardlavender/Tools4ETS documentation built on Nov. 29, 2022, 7:41 a.m.