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.
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.