transDate.Rd 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. % Generated by roxygen2: do not edit by hand
  2. % Please edit documentation in R/transDate.R
  3. \name{transDate}
  4. \alias{transDate}
  5. \title{MODIS Date Conversion and Testing}
  6. \usage{
  7. transDate(begin = NULL, end = NULL)
  8. }
  9. \arguments{
  10. \item{begin, end}{\code{character} or \code{Date}. Begin (end) date of MODIS
  11. time series, see Note. If not provided, this defaults to \code{"1972-01-01"}
  12. (\code{Sys.Date()}).}
  13. }
  14. \value{
  15. A \code{list} of begin and end dates formatted according to 'YYYY-MM-DD'
  16. (first two slots; class \code{Date}) and 'YYYYDDD' (second two slots; class
  17. \code{character}).
  18. }
  19. \description{
  20. This function converts a sequence of input dates to 'YYYY-MM-DD' and
  21. 'YYYYDDD'.
  22. }
  23. \note{
  24. If input dates are supplied as \code{character}, this function either expects
  25. 7-digit strings in the MODIS intrinsic form \code{'\%Y\%j'} or, alternatively,
  26. 10-digit strings in the form \code{'\%Y-\%m-\%d'} where the two field separators
  27. need to be uniform (see Examples).
  28. }
  29. \examples{
  30. transDate()
  31. transDate(begin = "2009.01.01") # ends with current date
  32. transDate(end = "2009.01.01") # starts with Landsat 1
  33. transDate(begin = c("2009-01-01", "2010-01-01"), end = "2011.03.16")
  34. }
  35. \seealso{
  36. \code{\link{strptime}}.
  37. }
  38. \author{
  39. Matteo Mattiuzzi, Florian Detsch
  40. }