transDate: MODIS Date Conversion and Testing

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/transDate.R

Description

This function converts a sequence of input dates to 'YYYY-MM-DD' and 'YYYYDDD'.

Usage

1
transDate(begin = NULL, end = NULL)

Arguments

begin, end

Date or character. Begin and end date of MODIS time series, see Note. If not provided, this defaults to "1972-01-01" (Sys.Date()).

Value

A list of begin and end dates formatted according to 'YYYY-MM-DD' (first two slots; class Date) and 'YYYYDDD' (second two slots; class character).

Note

If input dates are supplied as character, this function either expects 7-digit strings in the MODIS intrinsic form '%Y%j' or, alternatively, 10-digit strings in the form '%Y-%m-%d' where the two field separators need to be uniform (see Examples).

Author(s)

Matteo Mattiuzzi, Florian Detsch

See Also

strptime.

Examples

1
2
3
4
5
transDate()
transDate(begin = "2009.01.01") # ends with current date
transDate(end = "2009.01.01") # starts with Landsat 1
transDate(begin = c("2009-01-01", "2010-01-01"), end = "2011.03.16")
               

MODIS documentation built on Nov. 12, 2020, 5:06 p.m.