% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/unit_conv.R
\name{doy2date}
\alias{doy2date}
\alias{date2doy}
\title{Converts from doy to date}
\usage{
doy2date(x, year = 2001, inverse = FALSE)

date2doy(x, year = 2001, inverse = FALSE)
}
\arguments{
\item{x}{either an integer 1-366 or a \sQuote{Date}}

\item{year}{year}

\item{inverse}{if TRUE it goes from doy to \sQuote{Date}}
}
\value{
an object of class \sQuote{Date} or a numeric if inverse equals TRUE.

an numeric or an object of class \sQuote{Date} if inverse equals TRUE.
}
\description{
Given a day of the year as julian (1-366) it converts to \sQuote{Date}

Given a \sQuote{Date} it converts to julian day (1-366) or day of the year
}
\examples{
doy2date(120)
date2doy("04-30")

}
