JDay_count: Count days between two Julian dates

View source: R/before_after_JDay.R

JDay_countR Documentation

Count days between two Julian dates

Description

This function counts the days between two Julian dates, taking into account whether the season extends past the end of a calender year and whether the count is to be done for a leap year.

Usage

JDay_count(start_date, end_date, season = NA, leap_year = FALSE)

Arguments

start_date

integer ranging from 1 to 366, indicating a Julian date. This is the start date of the interval of interest.

end_date

integer ranging from 1 to 366, indicating a Julian date. This is the end date of the interval of interest.

season

integer vector of length 2, specifying the beginning and end of the phenology season, respectivcely. If this is not specified, the start_date and end_date are used to define the season.

leap_year

either a Boolean parameter indicating whether the count should be done for a leap year, or an integer specyfing the year, for which the calculation is to be done. The function then determines automatically, whether this is a leap year.

Value

Boolean result (TRUE/FALSE) of the comparison.

Author(s)

Eike Luedeling

Examples


JDay_count(start_date=320,end_date=20,season=c(305,59),leap_year=2004)


chillR documentation built on Nov. 28, 2023, 1:09 a.m.