JDay_count function

Count days between two Julian dates

Count days between two Julian dates

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.

Returns

Boolean result (TRUE/FALSE) of the comparison.

Examples

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

Author(s)

Eike Luedeling

  • Maintainer: Eike Luedeling
  • License: GPL-3
  • Last published: 2024-11-14

Useful links