R/ydays.R

Defines functions ydays

Documented in ydays

#' @title Calculate the number of days in a given year
#'
#' @description
#' Calculate the number of days in a given year.
#'
#' @param year A given year, vectorization parameter passing is supported.
#'
#' @return Days in a given year.
#'
#' @examples
#' ydays(2025)
#'
#' @export

#------------------------------------------------------------------------------#

ydays = function(year) {
  365 + leap_year(year)
}

#------------------------------------------------------------------------------#

Try the CNID package in your browser

Any scripts or data that you put into this service are public.

CNID documentation built on April 4, 2025, 5:22 a.m.